Import error: The used command is not allowed with this MySQL version

mysql logoIf you are getting Mysql Error: #42000

Import error: The used command is not allowed with this MySQL version

Such type of error generally occurs when you are trying to import data from a file into MySQL using LOAD DATA LOCAL INFILE.

To solve this problem, you will have to make changes in the my.cnf file on the server. It is generally located at /etc in Linux.

# vi /etc/my.cnf

  • Search for line local-infile
  • If local-infile is set to 0 (zero) then change it to 1 (one) i.e enable LOAD DATA LOCAL INFILE.
  • Save the file
  • Restart MySQL service

# /etc/init.d mysql restart

  • Refresh the error page

That's it.. the error is gone now !

If any feedback, queries are always welcome!

Share on Facebook0Share on Google+0Tweet about this on TwitterShare on StumbleUpon0Share on LinkedIn1Share on Tumblr0Pin on Pinterest0Email this to someonePrint this page

About Abhijit Sandhan

Abhijit Sandhan
Loves Linux, Blogging, Traveling, Hiking and sharing Knowledge!

2 comments

  1. thanx a lot. how if no root access on shared hosting?

  2. @Toko Bunga
    It requires a server root access. If you do not have root access on shard hosting then contact your hosting provider.

Leave a Reply

Your email address will not be published. Required fields are marked *