Troubleshooting your MySQL database

If you're having problems logging in

  • If you receive numerous username/password error messages, and you're certain that you keyed them correctly, then try deleting the cache.
  • Make sure that your current IP address is added to the database's allowable hosts. You can manage this setting in the panel under Goodies > MySQL > Database Username > Allowable hosts.

Error messages

"The used command is not allowed with this MySQL version"

This error may occur when using the "LOAD DATA LOCAL INFILE" statement on Ubuntu 12.04 webservers. A change in the mysql library from Debian to Ubuntu requires code changes to work around this error and allow your statement to execute.

  • mysql command line
Add the --local-infile flag to your mysql connection statement, such as:
[server]$ mysql --local-infile -h HOSTNAME -u USERNAME -pPASSWORD DATABASENAME
  • PHP mysql_connect()
Add 2 extra params to mysql_connect, a false for "new link" and then a client flag of 128 or CLIENT_LOCAL_FILES:
mysql_connect('HOSTNAME','USERNAME','PASSWORD', false, 128);
  • PHP mysqli_connect()
Initialize mysqli first via mysqli_init, and use mysqli_options() to specify local infile as true before connecting to the mysql server:
$link = mysqli_init();
mysqli_options($link, MYSQLI_OPT_LOCAL_INFILE, true);
mysqli_real_connect($link, 'HOSTNAME','USERNAME','PASSWORD','DATABASENAME');
The mysql_local_infile param can be added to your data source name variable, or directly in DBI->connect:
$dbh = DBI->connect("DBI:mysql:database=DATABASENAME;host=HOSTNAME;mysql_local_infile=1", "USERNAME", "PASSWORD");

mysqldump: Couldn't execute 'SET OPTION SQL_QUOTE_SHOW_CREATE=1'

This error is caused by an incompatibility with DreamHost's older Debian operating system on dedicated and webserver VPS products when used with newer MySQL 5.6.x server version. If you see this error please contact support to discuss operating system upgrade options.

See also

Did this article answer your questions?

Article last updated .