September 15th, 2000, 11:15 AM
I have a database of at 2,000 records that I need to load into my database table in MySql. I'm using the following command and getting the following error.
LOAD DATA INFILE '/home/mywww/dealer.txt' INTO TABLE dealerlist;
ERROR 1045 at line 1: Access denied for user: 'teac26@localhost' (Using password: YES)
From what I can tell this is my ISP blocking access because of security issues. I've talked to my host and they offer a file input solution. to do this, I will have to go into my text file and input individual commends in front of every record and field. this is not a time saving solution for 2,000 records.
Does anyone know a way around this? Please keep in mind, i am a complete newcomer to MySQL and need as detailed an explanation as possible. Thanks in advance for your expert advice!
September 15th, 2000, 04:50 PM
I would be happy to look at the file and see if I can make the changes for you.
It might be a simple matter of writting a small perl program to do the job.
Just e-mail me
September 17th, 2000, 10:19 AM
Are you trying to copy a database from one location, to another? or is that all you have is a comma-delimited text file from another source?
Usually if you don't have 'file' access, it'll tell you when it says access denied. If i try alter, i'll get something like alter command not allowed. i would think it's the same for files.
Can you write a PHP script (or perl) that will read the file and do inserts for each line?
or, like my first question said, is this just moving a database from one place to another? if so, look at mysqldump. dump the first database into a text file of SQL statements. then just run
mysql -uuser -p your_database < your_file
Hope that helps...email me if you have a question, i don't wander onto the msyql forum to much...
October 3rd, 2000, 08:56 AM
LOAD DATA LOCAL INFILE '/home/mywww/dealer.txt'
INTO TABLE dealerlist;