This site utilizes JavaScript to function correctly. Looks like it's disabled on your browser. Please enable it for your best experience.

For instructions on enabling JavaScript, click here

Skip to main content

Just Host Web Hosting Help

Unable to Load Data INFILE/OUTFILE

The commands for LOAD DATA INFILE/OUTFILE, are not allowed on our servers for security reasons. In order for you to use these functions you must use Load Data please use "LOAD DATA LOCAL"

The difference between the two 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 (eg the customer's script, phpmyadmin, or the customer connecting from ssh etc) is what does the loading and then passes the data to mysql. As such, there is no special permissions needed for customers to do a "LOAD DATA LOCAL"

There are some alternatives to this, if you're trying to import or export a databases 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
Knowledgebase Article 83,369 views bookmark tags: data export import infile load outfile


Was this resource helpful?

Did this resolve your issue?


Please add any other comments or suggestions about this content:





Recommended Help Content

I need to Export or Import a MySQL database
Knowledgebase Article 332,436 views tags: mysql phpmyadmin ssh

If you have a WordPress blog hosted on WordPress.com, you can easily export it and import it to WordPress that is installed on your hosting account with justhost. Login to the WordPress Data
Getting Started Article 489,589 views tags: blog export file import wordpress

This article will show a few MySQL errors along with explanations as to why they might be occurring.
Knowledgebase Article 53,217 views tags: errors mysql

Related Help Content

How do I import a backup of my database (.sql file) using phpMyAdmin?
Knowledgebase Article 491,033 views tags: database mysql phpmyadmin

How do I grant permissions to cPanel for my MySQL database administrator without giving them the domain password?
Knowledgebase Article 137,542 views tags: access grant mysql password permission

How to export your database in phpMyAdmin..
Knowledgebase Article 138,490 views tags: database export myphpadmin

I get the following database connection error: Warning: mysql_connect() [function.mysql-connect]: Host 'host#.Justhost.com' is blocked because of many connection errors; unblock with 'mysqlad
Knowledgebase Article 152,674 views tags: blocked connection host localhost mysql

I would like to dump the Table Structure for my MySQL Database, but none of the data.
Knowledgebase Article 204,851 views tags: dump mysql ssh structure table

This article will instruct you how to export a database from the command line (SSH).
Knowledgebase Article 697,429 views tags: database mysql ssh

Here is a good list of basic SSH commands.
Knowledgebase Article 338,047 views tags: commands ssh

A repository of information on how you can manage your database by using the phpMyAdmin interface.
Knowledgebase Article 256,323 views tags: commands database mysql phpmyadmin

** Google ad credits are only available to customers in the United States, Canada, and the United Kingdom at this time.

¹ VAT (Value Added Tax) is not included in our advertised price and will be charged separately and itemized on invoices and billing information. Standard VAT rates based on EU Member State regulations may apply. Learn more.