Troubleshooting the Database
On this page
If you encounter errors or issues while working with the database for your WHMCS installation, see the sections below to start troubleshooting and resolve the issue.
For more information, see Database Requirements.
General Issues
You may encounter the following common issues:
Error or Issue | Explanation | Next Steps |
---|---|---|
Could not connect to database or Critical Error - Unable to connect to the database | These errors indicate that the system cannot connect to your database. | Could Not Connect Errors Unable to Connect Errors |
Down for Maintenance (Err2) An upgrade is currently in progress | If an update is not currently in progress, this indicates a version mismatch between the PHP files and the MySQL® database. | Down for Maintenance Errors |
Error: SQLSTATE[HY000]: General error: 3988 Conversion from collation utf8mb3_unicode_ci into latin1_swedish_ci impossible for parameter (SQL: insert into tblticketmaillog... | MySQL® cannot convert the table in the error message into the indicated character set. | POP3 General Error 3988 Errors |
Field xxx doesn't have a default value | This error indicates that you attempted to install WHMCS with MySQL Strict Mode enabled. | Field Default Value Errors |
MySQL server has gone away | This error indicates that the MySQL® server is closing the connection that WHMCS is using for the current task. | MySQL Server Gone Away Errors |
Order Not Found...Exiting... | This error is due to an inability for the WHMCS software to write to the MySQL® database. | Order Not Found Errors |
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '0' for key 'PRIMARY' in /path/to/whmcs/vendor/illuminate/database/Connection.php | This error occurs when the primary key and auto_increment attributes are missing. | Duplicate Entry Errors |
SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'group_id' cannot be null (SQL: insert into tblproducts_slugs (group_id, group_slug, slug, active, product_id, updated_at, created_at) values (?, ?, , 1, 1, 2021-09-30 10:24:30, 2021-09-30 10:24:30)) | This indicates that there are orphaned products in the database. | Column group_id Null Errors |
SQLSTATE[42000]: Syntax error or access violation: 1142 INDEX command denied to user | The MySQL® user has insufficient privileges. | Command Denied Errors |
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'table_whmcs7.tbldomainpricing_premium' doesn't exist | This error occurs when a required table is missing from the WHMCS MySQL® database. | Base Table or View Not Found Errors |
TypeError: Argument 1 passed to Illuminate\Database\Connection::prepared() must be an instance of PDOStatement, bool given | The Module Log is enabled and the system is logging a large amount of data or the wait_timeout and interactive_timeout variables in the MySQL server configuration are too low. | Argument PDOStatement Errors |
Database Backups
For more information, see Database Backups.
You may encounter the following common issues:
Error or Issue | Explanation | Next Steps |
---|---|---|
SFTP Backup - Login Failed | This error indicates that the system reached the FTP server but it rejected the login details. | SQL Backup Login Errors |
(S)FTP Backup - Uploading Failed | This error indicates that the connection to the FTP server succeeded but the system could not navigate to the destination directory or did not have write permissions. | SQL Backup Uploading Errors |
(S)FTP: Unable to open for writing | This error indicates that WHMCS cannot open a test file in the PHP system directory (the sys_temp_dir PHP setting) via the PHP fopen function. | SFTP Unable to Open Errors |
(S)FTP: Unable to write to temp file | This error indicates that WHMCS cannot write to a test file in the PHP system directory (the sys_temp_dir PHP setting) via the PHP fwrite function. | SFTP Unable to Write Errors |
Last modified: October 29, 2024