Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Błąd przy LOAD DATA INFILE, nieperawidłowy user???
slimboj
post
Post #1





Grupa: Zarejestrowani
Postów: 31
Pomógł: 0
Dołączył: 6.01.2008

Ostrzeżenie: (0%)
-----


Witam,
Stworzyłem zapytanie do bazy uploadujące dane z pliku do tabeli "test". Niestety przy wykonywaniu skryptu pojawia się komunikat:
Cytat
Error: Access denied for user '*****'@'%' (using password: TAK) Error no.: 1045

Nie wiem za bardzo co z tym fantem zrobić, gdyż połączenie z bazą jest wykonywane i wszystkie inne zapytania wykonują się dobrze.
Przeszukałem forum, ale nie znalazłem odpowiedzi na taki problem jak mój.
Aha, chmod dla pliku test.txt i dla skryptu ustawione są na 777.
P.S. Nie wiem czy to ma znaczenie, ale serwer jest hostingowy.
Kod:
  1. <?
  2. include "db_data.php";
  3. include "db_connect.php";
  4.  
  5. $load="LOAD DATA INFILE 'test.txt' INTO TABLE test FIELDS TERMINATED BY ';'";
  6. $q_load=mysql_query($load);
  7. if($q_load)
  8.  {
  9.   echo"Upload successfull...<br />";
  10.  }
  11. else
  12.  {
  13.   echo"Upload failed...<br />";
  14.   echo "Error: <b>".mysql_error()."</b>&nbsp;&nbsp;&nbsp;Error no.: <b>".mysql_errno()."</b>";
  15.  }
  16. ?>


Ten post edytował slimboj 20.10.2008, 15:16:56
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
nevt
post
Post #2





Grupa: Przyjaciele php.pl
Postów: 1 595
Pomógł: 282
Dołączył: 24.09.2007
Skąd: Reda, Pomorskie.

Ostrzeżenie: (0%)
-----


bez tych uprawnień możesz użyć klauzuli LOCAL i załadować plik ze swojego kompa, maual:
Cytat
LOAD DATA [LOW_PRIORITY | CONCURRENT] [LOCAL] INFILE 'file_name' ...

...
The LOCAL keyword, if specified, is interpreted with respect to the client end of the connection:

  • If LOCAL is specified, the file is read by the client program on the client host and sent to the server. The file can be given as a full pathname to specify its exact location. If given as a relative pathname, the name is interpreted relative to the directory in which the client program was started.
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 26.12.2025 - 09:05