"command denied to user" error when calling a database

Updated at:

This topic describes the possible causes of and solutions for the 'XXX command denied to user' error, which can occur when a website application fails to call a database.

Symptoms

After you set up a website with Web Hosting, your application may fail to call the database and return the 'XXX command denied to user' error. This error typically occurs during insert and update operations.

Database error: Invalid SQL: update wen_news_con set cl=cl+1 where id='325'
MySQL Error: 1142 (UPDATE command denied to user 'hdml4' for table 'wen_news_con')
#0 dbbase_sql->halt(Invalid SQL: update wen_news_con set cl=cl+1 where id='325') called at [/data/home/hxxxxtdocs/includes/db.inc.php:65] #1 dbbase_sql->query(update {P}_news_con set cl=cl+1 where id='325') called at [/data/home/hxxxxdocs/news/module/NewsContent.php:80] #2 NewsContent() called at [/data/home/hixxxxics/includes/common.inc.php:551] #3 printpage() called at [/data/home/xxxxdocs/news/html/index.php:13]

Possible cause

The database storage is full.

Solution

  1. Log on to the Web Hosting console.

  2. Find the Web Hosting instance that is causing the error and click manage in the actions column.

  3. In the left-side navigation pane, click database information.

  4. On the database information page, check whether the database storage is full.

    Based on the result, take one of the following actions:

    • If the database storage is not full, submit a ticket.

    • If the database storage is full:

      • If you need less than 1 GB of database storage, upgrade your Web Hosting instance. For more information, see Upgrade Web Hosting.

      • If you need more than 1 GB of database storage, use ApsaraDB RDS for MySQL. For more information, see ApsaraDB RDS for MySQL.