How To Solve Permissions Issues With LOAD DATA

With MySQL, loading a file is much more efficient than performing a long list of insert statements. If you’re on a CPanel account, however, you may notice that you get error messages similar to the following when you try to load a file into MySQL.

ERROR 1045 (28000): Access denied for user ‘username’@’%’ (using password: YES)

Most probably you’ve already given that user all the possible permissions in CPanel’s database wizard, but there’s actually a file permission that isn’t reflected in the list. If you are affected by this error message, then here’s a simple fix. The statement that you are probably using looks like this:

LOAD DATA INFILE “bigTextFile.sql” INTO TABLE mytable;

Just change that by adding the “local” keyword, and your statement should now look like this:

LOAD DATA LOCAL INFILE “bigTextFile.sql” INTO TABLE mytable;

After that, you should no longer face those error messages!

CPanel offers a great way to streamline managing your server by offering you a simple, easy-to-use Graphical User Interface. Vodien offers web hosting with CPanel in-built, and backs it up with 24/7 SuperSupport.


BILL POH

Senior Tech Writer for Vodien Internet Solutions

Bill Poh is the Senior Tech Writer at Vodien and he covers web hosting, online marketing, social media, business and the latest tech innovations. When not writing, he’s busy pursuing his passion for photography, graphic design, and creative arts.

Here are some of the other pages created by Bill Poh:

Facebooktwittergoogle_pluslinkedinmail

Leave a Reply

Articles in Picture

Singapore’s Best

Vodien offers the best Singapore web hosting experience around with the best shared web hosting plans, dedicated servers, and VPS plans.
Vodien SuperSupport