Command Denied Errors


When applying an update to WHMCS, a Command denied to user error displays. For example:

Unable to complete incremental updates: Unable to import the 8.0.0  Alpha1 database file. Unable to import  /path/to/whmcs/resources/sql/upgrade800alpha1.sql:  SQLSTATE[42000]: Syntax error or access violation: 1142 INDEX command denied to user 'dbuser'@'localhost' for table  'tblactivitylog'


The MySQL® user has insufficient privileges in the WHMCS database to perform the schema changes that the update process requires.

In the above examples, the dbuser user does not have the CREATE and INDEX privileges. A system administrator has restricted the database user’s privileges.


To resolve this issue, update the database user to include the required privileges.

For example, in cPanel & WHM, you could perform the following steps:

  1. In the cPanel interface, navigate to Databases > MySQL® Databases.
  2. Click the Privileged Users link that corresponds to the WHMCS database.
  3. Check the missing privileges or check ALL PRIVILEGES.
  4. Click Save.
  5. In WHMCS, attempt the update process again.

Last modified: May 29, 2024