Database Errors

From WHMCS Documentation

Revision as of 19:20, 16 August 2022 by SarahK (talk | contribs)

You may see the following errors when working with databases:

Down for Maintenance - An upgrade is currently in progress

This error indicates that the version of WHMCS's files does not match the version of your database. For example, you may have uploaded files for WHMCS 7.9 but, because the upgrade script has not run, the database is still set up for WHMCS 7.8.

To resolve this, upload the current version's WHMCS files again and perform the upgrade process. After the upgrade, you will be able to access the system again.

For more information, see Upgrading.

Critical Error - Unable to connect to the database

This error indicates that the system cannot connect to your database. Check and update the database connection details in the configuration.php file. For example, you may need to make corrections if you recently changed the password or renamed the database itself. This could also be an issue with MySQL® or an empty configuration.php file.

If you have confirmed that the database name, username, and password are correct, make certain that the MySQL user is assigned to the desired database and has full access. For help, contact your hosting provider or system administrator.

Error Message "Field xxx doesn't have a default value" during installation

This error indicates that you attempted to install WHMCS with MySQL Strict Mode enabled. WHMCS requires you to disable this before installation.

MySQL server has gone away

This error indicates that the MySQL server is closing the connection WHMCS is using for the current task. You may see this when upgrading WHMCS due to the large number of MySQL queries that upgrading performs. In most cases, this occurs because the timeout value is too low to allow all the upgrade tasks to finish.

To resolve this during generation operations, work with your system administrator or hosting provider to increase the wait_timeout and max_allowed_packet values in the MySQL configuration. If you were performing an upgrade, make certain to restore your pre-upgrade database backups before running the upgrade script again.