Bug #519 | LOAD LOCAL FILE from windows client does not work loading to a RedHat LINUX dat | ||
---|---|---|---|
Submitted: | 27 May 2003 12:03 | Modified: | 27 May 2003 19:39 |
Reporter: | Doug Barnes | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Command-line Clients | Severity: | S1 (Critical) |
Version: | 4.0.12 | OS: | Windows (win2000/RedHat linux) |
Assigned to: | CPU Architecture: | Any |
[27 May 2003 12:03]
Doug Barnes
[27 May 2003 12:09]
Guilhem Bichot
Hi, Windows files usually have different line terminators than Unix files : - Unix files lines finish with '\n' - Windows files lines finish with '\r\n' (two characters) or '\r' or '\n' (depending on the application which created the file). So I'd suggest explicitly specifying the line terminator, for example if this is a Windows file edited with Notepad you may use : LOAD DATA LOCAL INFILE this_file LINES TERMINATED BY '\r\n'; I heard Wordpad uses '\r'.
[27 May 2003 12:13]
Doug Barnes
Nope, I get a permission error even though I have EVERYTHING "Y" for rhis user on my subnet as well as my pc.
[27 May 2003 12:43]
Doug Barnes
Here are the 2 errors from win200, with and without the LOCAL: mysql> LOAD DATA INFILE "positionpro.txt" INTO TABLE snoopDogg FIELDS TERMINATED BY '<PTech>' LINES TERMINATED by '</PTe ch>\r\n'; ERROR 1045: Access denied for user: 'feed_base@169.207.238.227' (Using password: YES) mysql> LOAD DATA LOCAL INFILE "positionpro.txt" INTO TABLE snoopDogg FIELDS TERMINATED BY '<PTech>' LINES TERMINATED by '</PTech>\r\n'; ERROR 1148: The used command is not allowed with this MySQL version mysql>
[27 May 2003 19:39]
MySQL Verification Team
This issue was already fixed from release version 4.0.13. Below I did it with Win2K Server MySQL client -> UnitedLinux box running MySQL 4.0.13 server. c:\mysql\bin>mysql -h192.168.0.66 -uusertest -p test Enter password: ****** Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 2 to server version: 4.0.13-debug-log Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> load data local infile "c:/mysql/myfile.txt" into table myload; Query OK, 320 rows affected (0.13 sec) Records: 320 Deleted: 0 Skipped: 0 Warnings: 0
[28 May 2003 6:25]
Doug Barnes
4.0.13 client on Win2000 fixed this problem-thanks alot!!