How to grant mysql server to get FILE Privilege?

Category: Databases

SeanL
Asked:
2012-11-02 9:59 am EST

Hits: 899
I'm using "LOAD DATA INFILE" in php to import csv file to mysql database and never success. I was able to do that from my previous hotsting provider. I did some research on MYSQL website and find this:

The FILE privilege gives you permission to read and write files on the server host using the LOAD DATA INFILE and SELECT ... INTO OUTFILE statements and the LOAD_FILE() function. A user who has the FILE privilege can read any file on the server host that is either world-readable or readable by the MySQL server. (This implies the user can read any file in any database directory, because the server can access any of those files.) The FILE privilege also enables the user to create new files in any directory where the MySQL server has write access. As a security measure, the server will not overwrite existing files.

Any help will be really appreciated!

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

You must login before you can submit an answer.

OTHER ANSWERS

0

jamesr
Staff
4,959 Points
2012-11-02 10:51 am EST
Thank you for your question SeanL!

From what you gave us for information, it appears the permissions on the user are not allowing it. Try removing the user and re-adding it to the database. Make sure all permissions are given to the user that you are using for the php script. If this does not work, we will need to test the script to see why its failing. Please email us at

support@inmotionhosting.com

Please include the location of the script on the server and any login credentials and steps to take to replicate the problem. You will need to verify the account in the email with the last 4 of the credit card number or the current AMP password and we can see why its failing. Sorry for the trouble.

Best Regards

James R

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

Like this Question?
Write New!
Do you want to publish a tutorial to our support center?

News / Announcements

SSL Certficate Warnings
Updated 2014-04-14 11:34 am EST
Hits: 2104
Heartbleed 0-day OpenSSL security bug
Updated 2014-04-14 04:43 pm EST
Hits: 5475

Related Articles

It looks like there are no related articles.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question

Need more Help?

Search

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: support@InMotionHosting.com
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!