Page 1 of 1

PhpMyAdmin insert textfile error..

Posted: Tue Mar 25, 2003 3:54 pm
by grassmole
I have looked for a fix and see many similar posts, but none that make any sense. I am trying to insert a text file in to MySql using PhpMyAdmin and get this error:
==================
Error

SQL-query :

LOAD DATA LOCAL INFILE '' INTO TABLE `tek` FIELDS TERMINATED BY ';' ENCLOSED BY '"' ESCAPED BY '\'' LINES TERMINATED BY '\r\n'

MySQL said:


File '' not found (Errcode: 2)
============
Cant seem to upload any text files. Looks like my file that I specified is not being passed either.

PHP Version: 4.2.3
MySql api version: 3.23.39
Apache Version: Apache/1.3.24

PLEASE HELP?

Thanks,
Mole

Posted: Wed Mar 26, 2003 2:59 am
by twigletmac
I'm having the exact same problem - there must be a bug in phpMyAdmin somewhere.

It's been annoying me but I haven't looked for a fix yet (have you tried the latest version of phpMyAdmin?), I've just been opening the file selecting all the info and pasting it into the SQL box in phpMyAdmin.

Since this is pointless I'll try upgrading my version see if that helps and if it doesn't I'm sure there must be a fix...

Just out of interest are you on Windows or *nix?

Mac

I think I am getting somewhere

Posted: Wed Mar 26, 2003 10:33 am
by grassmole
I used an installer package to load php, mysql and apache. In phpinfo(), it said my mysql version was 3.2. Not the case, it was 4.1. I unloaded it and reloaded mysql 4.0, and now do not get the error, just a bad upload. This is good cause one more error and Im pitching the whole project, not really.....

I am on win 2k.

Final: I think this error is a mysql 4.1 error, having to do with the way backslashes are recognized in php?


MoLe

Posted: Wed Mar 26, 2003 11:28 am
by grassmole
ok, looks like I got a fix. Here is what I had to do:
1. clear mysql 4.1, load mysql 4.0
2. save textfile as csv.
3. Use phpmyadmin with [ Fields terminated by ","].

Upload works....

Mole