Article directory
log inCWP Control Panelroundcude mailbox, the following error message appears ▼
DATABASE ERROR: CONNECTION FAILED! Unable to connect to the database! Please contact your server-administrator.

Check for roundcude database errors
Please checkroundcude error log file ▼
/usr/local/cwpsrv/var/services/roundcube/logs/errorsIf your error looks like this ▼
[17-May-2021 20:18:11 +0000]: <gv4343g> DB Error: SQLSTATE[HY000] [1045] Access denied for user 'roundcube'@'localhost' (using password: YES) in /usr/local/cwpsrv/var/services/roundcube/program/lib/Roundcube/rcube_db.php on line 173 (GET /roundcube/) [17-May-2021 20:18:11 +0000]: <gv4343g> DB Error: SQLSTATE[HY000] [1045] Access denied for user 'roundcube'@'localhost' (using password: YES) (GET /roundcube/)
Check the roundcube config file
Check the password set in the roundcube configuration file /usr/local/cwpsrv/var/services/roundcube/config/config.inc.php
grep db_dsnw /usr/local/cwpsrv/var/services/roundcube/config/config.inc.php
The output will be like this ▼
$config['db_dsnw'] = 'mysqli://roundcube:42Etn3fd7skc@localhost/roundcube';
- This indicates that the password is
42Etn3fd7skc
Let us nowMySQLset the same value in ▼
mysql -e "SET PASSWORD FOR 'roundcube'@'localhost' = PASSWORD('42Etn3fd7skc');"
mysql -e "FLUSH PRIVILEGES;"Check if roundcube works?
Now, check again if roundcube works?
If this error occurs ▼
[17-May-2021 20:29:09 +0000]: <gv91fd30g> DB Error: [1146] Table 'roundcube.session' doesn't exist (SQL Query: SELECT `vars`, `ip`, `changed`, now() AS ts FROM `session` WHERE `sess_id` = 'gv93bfdsfdffdfdj3') in /usr/local/cwpsrv/var/services/roundcube/program/lib/Roundcube/rcube_db.php on line 539 (GET /roundcube/)
run this command ▼
mysql -u root 'roundcube' < /usr/local/cwpsrv/var/services/roundcube/SQL/mysql.initial.sql
That's it, enjoy yours round cut (rounded cube).
In addition, there is another error that is different from the above error, the solution and repair method, please browse the article link below▼
Hope Chen Weiliang Blog ( https://www.chenweiliang.com/ ) shared "Solving and fixing roundcude DATABASE ERROR: CONNECTION FAILED!", which is helpful to you.
Welcome to share the link of this article:https://www.chenweiliang.com/cwl-1163.html
To unlock more hidden tricks🔑, welcome to join our Telegram channel!
If you like it, please share and like it! Your sharing and likes are our continuous motivation!
![Solve DB Error: [1286] Unknown storage engine 'InnoDB sheet 2 Solve DB Error: [1286] Unknown storage engine 'InnoDB sheet 2](https://img.chenweiliang.com/2021/05/innodb-is-off.jpg)