×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Trouble uploading/importing files to MySQL server

Trouble uploading/importing files to MySQL server

Trouble uploading/importing files to MySQL server

(OP)
I keep getting an error message that the file I'm trying to upload cannot be found. Could someone please reply with an example using the proper syntax for importing data using the LOAD DATA command?

I tried:

LOAD DATA LOCAL INFILE 'test_db.csv' INTO TABLE admintest
FIELDS TERMINATED BY ',' ENCLOSED BY '"'
LINES TERMINATED BY '\r';

RE: Trouble uploading/importing files to MySQL server

Are you trying to get the data from a file on the local hard drive, or from another data source?

RE: Trouble uploading/importing files to MySQL server

(OP)
I'm trying to get the file from one of my local drives and send it via telnet to a remote server where I have a MySQL database hosted. It may be to that the version of MySQL on the server isn't recent enough. The MySQL documentation says LOAD DATA LOCAL works with version 3.22.6, whereas the version on the server is MySQL 3.22.21.

RE: Trouble uploading/importing files to MySQL server

If you telnetted to the remote host where your mysql server lives, and ran "mysql" there, it will only find files on that machine (not the one you're telnetting from). Try ftp'ing the file up to the remote machine first, or try a client like XmySQL, which I've found useful for one-off type admin/access stuff (loading data, creating db's etc). You may also be able to run mysql monitor on your local machine and connect to the remote db. In fact, I'm sure you can, but I've never had to, so I don't really know how :-)

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close