Troubleshooting your MySQL database

Problems logging in

 

Updating 'Allowable hosts'

Also, make sure that your current IP address is added to the database's allowable hosts. You can manage this setting on the (Panel > 'Goodies' > 'MySQL Databases') page. To the right of your database, click the username. On the next page you can see the 'Allowable hosts' field.

allowable hosts.png

In the image above, you would replace xxx.xxx.xxx.xxx with your computer's IP address. You can find it on a site such as whatismyipaddress.com. The panel also displays your current IP address in this section.

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');

PERL DBI

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 .