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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using PHPMyAdmin to insert a text file

Status
Not open for further replies.

Zych

IS-IT--Management
Apr 3, 2003
313
US
I am new to PHPMyAdmin and want to upload a text file. How do I do this? Do I use the following statement (This is what I used to upload to a local MySQL database in the past.)

LOAD DATA INFILE 'C:\WebInfo\eva1-18-05.txt' INTO TABLE egov
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
LINES TERMINATED BY '\r\n'
(ID, LSIPN , ManPN, DESCRIPTION, SPSCCode, UnitPrice, UnitM, LeadTime, ManufacturerName, PaymentTerm, MinimumOrder, MaximumOrder, ServiceAreas, Image, Generic, Remanufcatured);


However when I use this I get an access denied error. Do I need to move the text file local? If so how do I give the file path name on a linux system?

Thanks,

Zych
 
I forgto to give the full error message. Here it is: #1045 - Access denied for user: 'username@localhost' (Using password: YES)

To test to make sure that it is not a password issue how can I pass name and password info to the server in the SQL statement?

Thanks!
 
I got it fixed. I think I needed DATA LOCAL INFILE instead of DATA INFILE. I used the wizard that I did not see on the SQL panel. It gave me the same error that I had earlier so I tried the DATA LOCAL button and it worked.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top