登录CWP控制面板的roundcude邮箱,出现以下错误提示 ▼
DATABASE ERROR: CONNECTION FAILED! Unable to connect to the database! Please contact your server-administrator.
检查roundcude 数据库错误问题
请检查roundcude错误日志文件 ▼
/usr/local/cwpsrv/var/services/roundcube/logs/errors
如果你的错误看起来像这样 ▼
[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/)
检查roundcube 配置文件
检查roundcube 配置文件中设置的密码 /usr/local/cwpsrv/var/services/roundcube/config/config.inc.php
grep db_dsnw /usr/local/cwpsrv/var/services/roundcube/config/config.inc.php
输出将像这样 ▼
$config['db_dsnw'] = 'mysqli://roundcube:[email protected]/roundcube';
现在让我们在MySQL中设置相同的值 ▼
mysql -e "SET PASSWORD FOR 'roundcube'@'localhost' = PASSWORD('42Etn3fd7skc');" mysql -e "FLUSH PRIVILEGES;"
检查roundcube是否有效?
现在,再次检查roundcube是否有效?
如果出现此错误 ▼
[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/)
运行此命令 ▼
mysql -u root 'roundcube' < /usr/local/cwpsrv/var/services/roundcube/SQL/mysql.initial.sql
就是这样,享受你的 roundcude (圆角立方体)。
另外, 还有一种错误跟以上错误不同,解决和修复方法,请浏览下方文章链接 ▼
解决DB Error: [1286] Unknown storage engine ‘InnoDB’
查看CWP控制面板的 roundcube 的错误日志 ▼/usr/local/cwpsrv/var/services/roundcube/logs/errors出现MySql数据库或 MariaDB数据库错误提示 ▼DB Error: [1286] Unknown storage engin……