cPanel Roundcube cannot connect with database

98 views
0

I have cPanel server (root access). When I access any email account from Roundcube interface, I get database error:

DATABASE ERROR: CONNECTION FAILED! Unable to connect to the database!Please contact your server-administrator.

Other webmail interfaces are working without any problem. I checked error log and found following:

warn [cpses_tool] Error while connecting to MySQL: Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’ (2) at /usr/local/cpanel/Cpanel/DBAdmin.pm line 168. Cpanel::DBAdmin::_log_error_and_output_return(Cpanel::Mysql=HASH(0x2c4de68), “Error while connecting to MySQL: [_1]”, “Can’t connect to local MySQL server through socket ‘/tmp/mysq”…) called at /usr/local/cpanel/Cpanel/Mysql.pm line 168 Cpanel::Mysql::_get_dbh(Cpanel::Mysql=HASH(0x2c4de68), CPANEL_HIDDEN, CPANEL_HIDDEN, CPANEL_HIDDEN, 3306) called at /usr/local/cpanel/Cpanel/Mysql.pm line 112 Cpanel::Mysql::new(“Cpanel::Mysql”, HASH(0x2c4dee0)) called at bin/cpses_tool.pl line 175 bin::cpses_tool::action_CLEANUPSESSIONS(“bin::cpses_tool”, HASH(0x2c4dd48)) called at bin/cpses_tool.pl line 64 bin::cpses_tool::process_request(HASH(0x2c4dd48)) called at bin/cpses_tool.pl line 51 bin::cpses_tool::script(“bin::cpses_tool”) called at bin/cpses_tool.pl line 27 Error while connecting to MySQL: Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’ (2) at /usr/local/cpanel/Cpanel/Mysql.pm line 168.

How can I fix this?

1

Please check the following steps:

  • Make sure that mysql service is up and running.
  • Make sure that roundcube database is existed. You can check it from WHM -> phpMyAdmin. There should be a database named roundcube.
  • If roundcube database is existed, make sure that tables are not corupted. If they are corrupted, you may need to restore it from backup
Bloom Email Optin Plugin