InMotion Hosting Support Center

My sql Load Data in file

Category: Databases

2012-11-11 1:36 pm EST

Hits: 655
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?


You must login before you can ask a follow up question.

You must login before you can submit an answer.



5,889 Points
2012-11-12 2:07 pm EST
Thank you for your question appsman!

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 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

You must login before you can post a comment about this answer.

Like this Question?

Support Center Login

Our Login page has moved, Click the button below to be taken to the login page.

Need more Help?


Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail:
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!