Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to import into a table with a file

Status
Not open for further replies.

txwylde

Programmer
Jan 25, 2001
60
US
Our Database server has moved off of the local machine and is by itself. When I try to run:


load data local infile '/Users/test/Documents/CC.txt' into table bi_kinkead.new_macbook;
test.reseller_cc

I get an error because the file is not located locally. It is locaed on a server called Pluto. What is the formating to use so I can get this file imported?
Thanks!
Bill
 
What is the format of CC.txt? If it's a sql file, the format I use is...

mysql -u username -p password database_name < file_name

Mark
 
I got it. I did not realize I could move the local file over. I thought I had to do it on the same sever that the database was on. Thanks for your help.
take care
Bill
 
As long as the username has rights remotely in the database and the my.cnf file isn't blocking remote connections, you should be able to upload from anywhere (as long as the mysql client is loaded on the machine you're uploading from).

If you can get phpmyadmin loaded, it makes backup and restore much simpler.

Mark
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top