Skip to main content

Unable to add user to database

Comments

6 comments

  • kodeslogic
    Assuming you have root-level access. The first thing to check if there is an error in the file /usr/local/cpanel/logs/error_log
    when you do that.
    0
  • cPRex Jurassic Moderator
    +1 on checking the cPanel error log, as that is where I'd expect any interface issues or timeouts to show up.
    0
  • dipendra.chaudhary
    same issue. It shows " User "aniket_testuser" could not be added to the database "aniket_testdb". The request failed. (Error ID: ww9ydv) Ask your hosting provider to research this error in cPanel & WHM"s main error log."
    0
  • cPRex Jurassic Moderator
    If you don't have root access to the server, you'll need to speak with your host. If you do have root access, we'd also be happy to take a look if you submit a ticket to our team.
    0
  • dipendra.chaudhary
    Assuming you have root-level access. The first thing to check if there is an error in the file /usr/local/cpanel/logs/error_log
    when you do that.

    Here is the error log ``` [2021-06-01 04:42:05 +0100] info [] Quota file /home/beautyst/etc/beautystorenepal.com/quota does not exist; skipping [2021-06-01 04:42:58 +0100] info [] Quota file /home/beautyst/etc/beautystorenepal.com/quota does not exist; skipping [2021-06-01 04:43:02 +0100] info [cpwrapd] Creating MySQL database beautyst_testdb for user beautyst [2021-06-01 04:43:04 +0100] info [] Quota file /home/beautyst/etc/beautystorenepal.com/quota does not exist; skipping [2021-06-01 04:44:32 +0100] info [cpwrapd] Creating MySQL virtual user beautyst_testuser for user beautyst [2021-06-01 04:44:32 +0100] warn [cpwrapd] Error from MySQL query: (XID 88z7fx) The system received an error fromthe "MySQL" database "mysql": ER_CANNOT_USER (Operation CREATE USER failed for 'beautyst_testuser'@'rs12uk.01cloud.com') at /usr/local/cpanel/Cpanel/Mysql/Basic.pm line 363. Cpanel::Mysql::Basic::sendmysql(Cpanel::Mysql=HASH(0x398c0b0), "CREATE USER 'beautyst_testuser'\@'RS12UK.01cloud.com' IDENTIFI"...) called at /usr/local/cpanel/Cpanel/Mysql/Passwd.pm line 160 Cpanel::Admin::Base::DB::CREATE_USER(Cpanel::Admin::Modules::Cpanel::mysql=HASH(0x34fb998), "beautyst_testuser", "xxxxxxxx") called at /usr/local/cpanel/Cpanel/Admin/Base.pm line 717 [2021-06-01 04:44:32 +0100] warn [cpwrapd] GRANT statement "CREATE USER 'beautyst_testuser'@'RS12UK.01cloud.com' IDENTIFIED BY 'xxxxxxxx';" failed: at /usr/local/cpanel/Cpanel/Mysql/Passwd.pm line 160. Cpanel::Admin::Base::DB::CREATE_USER(Cpanel::Admin::Modules::Cpanel::mysql=HASH(0x34fb998), "beautyst_testuser", "xxxxxxxx") called at /usr/local/cpanel/Cpanel/Admin/Base.pm line 717 [2021-06-01 04:44:36 +0100] info [] Quota file /home/beautyst/etc/beautystorenepal.com/quota does not exist; skipping Cpanel::Exception::Database::Error/(XID rm6ztn) The system received an error from the "MySQL" database "mysql": ER_CANNOT_USER (Operation CREATE USER failed for 'beautyst_testuser'@'rs12uk.01cloud.com') Cpanel::Mysql::_do_addusertodb(Cpanel::Mysql=HASH(0x2863128), "beautyst_testuser", "beautyst_testdb", "ALL") called at /usr/local/cpanel/Cpanel/Mysql.pm line 626 Cpanel::Mysql::addusertodb_literal_privs(Cpanel::Mysql=HASH(0x2863128), "beautyst_testuser", "beautyst_testdb", ARRAY(0x28651d0)) called at /usr/local/cpanel/Cpanel/Admin/Modules/Cpanel/mysql.pm line 194 Cpanel::Admin::Modules::Cpanel::mysql::SET_USER_PRIVILEGES_ON_DATABASE(Cpanel::Admin::Modules::Cpanel::mysql=HASH(0x34ffbb0), "beautyst_testuser", "beautyst_testdb", ARRAY(0x28651d0)) called at /usr/local/cpanel/Cpanel/Admin/Base.pm line 717 [2021-06-01 04:46:17 +0100] info [] Quota file /home/beautyst/etc/beautystorenepal.com/quota does not exist; skipping ```
    0
  • cPRex Jurassic Moderator
    That's interesting - it might be worth checking the MySQL log on the server around the time timeframe to see if there are other issues there.
    0

Please sign in to leave a comment.