Unable to Load Data INFILE/OUTFILE
What Causes the "Unable to Load INFILE/OUTFILE" Error?
For security reasons, our servers do not allow the commands for LOAD DATA INFILE/OUTFILE. If you are unable to load data INFILE/OUTFILE, follow the troubleshooting guide below.
Troubleshooting "Unable to Load INFILE/OUTFILE" Errors
To use these functions, you must use "LOAD DATA LOCAL". The difference is that without the LOCAL keyword, the command requests the server to find the file and load data from it. With the LOCAL keyword, the MySQL client (for example, the customer's script, phpMyAdmin, or the customer connecting from SSH, etc.) loads the data and then passes it to MySQL. As such, no special permissions are needed for customers to do a "LOAD DATA LOCAL".
There are some alternatives to this. If you're trying to import or export a database, please use the following:
- LOAD DATA INFILE ALTERNATIVE FROM SSH:
$ echo "source databasefile.sql" | mysql -u user -ppassword databasename - LOAD DATA OUTFILE ALTERNATIVE FROM SSH:
$ mysql -u user -ppassword databasename > outputfile.sql
Further reading on the issue can be found in MySQL's documentation on LOAD DATA: http://dev.mysql.com/doc/refman/5.0/en/load-data.html
If you need further assistance, feel free to contact us via Chat or Phone:
- Chat Support - While on our website, you should see a CHAT bubble in the bottom right-hand corner of the page. Click anywhere on the bubble to begin a chat session.
- Phone Support -
- US: 888-401-4678
- International: +1 801-765-9400
You may also refer to our Knowledge Base articles to help answer common questions and guide you through various setup, configuration, and troubleshooting steps.