My sql Load Data in file
I have a VPS. In one of my domains, under public_html I have an admin directory. The admin directory contains a data directory and that contains the file 'file.txt'. file.txt contains comma-separated values to insert into my db.
I have already created a db and can, through php, access it OK (e.g., connect, create table, rename table, etc.) However, when I do a LOAD DATA INFILE 'data/file.txt' I get 'access denied' into the database. I also tried LOAD DATA LOCAL INFILE 'data/file.txt', and I get 'data/file.txt' not found.
Any idea on how I can get this to work? Do I need to use the LOCAL or not, and if I do need to use LOCAL, what is the correct path so the file can be found?
Thanks
I have already created a db and can, through php, access it OK (e.g., connect, create table, rename table, etc.) However, when I do a LOAD DATA INFILE 'data/file.txt' I get 'access denied' into the database. I also tried LOAD DATA LOCAL INFILE 'data/file.txt', and I get 'data/file.txt' not found.
Any idea on how I can get this to work? Do I need to use the LOCAL or not, and if I do need to use LOCAL, what is the correct path so the file can be found?
Thanks
In order to run that successfully, you will need to use the MySQL root user. VPS servers do not have MySQL root set up by default so if you have not requested it, you will need to contact support to have it set up. Its different than Root Access so this has to be in a ticket.
Please contact support by emailing [email protected]. Let us know you need MySQL root and that systems has to set it up. Include the current AMP password in the email or the last 4 of the credit card number, and we can get systems to set up MySQL root ASAP. Sorry for the inconvenience.
Best regards
James R