Control Web Panel

WebPanel => MySQL => Topic started by: Administrator on May 17, 2017, 08:13:17 PM

Title: Instructions for fixing roundcube issues
Post by: Administrator on May 17, 2017, 08:13:17 PM
If you get this error message on your roundcube link:
Code: [Select]
DATABASE ERROR: CONNECTION FAILED!
Unable to connect to the database!
Please contact your server-administrator.

Check roundcube logs in file: /usr/local/cwpsrv/var/services/roundcube/logs/errors

In case that your error looks like this
Code: [Select]
[17-May-2017 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-2017 20:18:11 +0000]: <gv4343g> DB Error: SQLSTATE[HY000] [1045] Access denied for user 'roundcube'@'localhost' (using password: YES) (GET /roundcube/)

Check the password set in roundcube config in file /usr/local/cwpsrv/var/services/roundcube/config/config.inc.php
Code: [Select]
grep db_dsnw /usr/local/cwpsrv/var/services/roundcube/config/config.inc.php
Output will be like this
Code: [Select]
$config['db_dsnw'] = 'mysqli://roundcube:42Etn3fd7skc@localhost/roundcube';** This means that your password is 42Etn3fd7skc

Now lets set the same in mysql.
Code: [Select]
mysql -e "SET PASSWORD FOR 'roundcube'@'localhost' = PASSWORD('42Etn3fd7skc');"
mysql -e "FLUSH PRIVILEGES;"

Now again check if roundcube works.

In case you get this error:
Code: [Select]
[17-May-2017 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
Code: [Select]
mysql -u root 'roundcube' < /usr/local/cwpsrv/var/services/roundcube/SQL/mysql.initial.sqlthat is it, enjoy your roundcube.
Title: Re: Instructions for fixing roundcube issues
Post by: fredo on May 24, 2017, 02:42:56 PM
If you get this error message on your roundcube link:
Code: [Select]
DATABASE ERROR: CONNECTION FAILED!
Unable to connect to the database!
Please contact your server-administrator.

Check roundcube logs in file: /usr/local/cwpsrv/var/services/roundcube/logs/errors

In case that your error looks like this
Code: [Select]
[17-May-2017 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-2017 20:18:11 +0000]: <gv4343g> DB Error: SQLSTATE[HY000] [1045] Access denied for user 'roundcube'@'localhost' (using password: YES) (GET /roundcube/)

Check the password set in roundcube config in file /usr/local/cwpsrv/var/services/roundcube/config/config.inc.php
Code: [Select]
grep db_dsnw /usr/local/cwpsrv/var/services/roundcube/config/config.inc.php
Output will be like this
Code: [Select]
$config['db_dsnw'] = 'mysqli://roundcube:42Etn3fd7skc@localhost/roundcube';** This means that your password is 42Etn3fd7skc

Now lets set the same in mysql.
Code: [Select]
mysql -e "SET PASSWORD FOR 'roundcube'@'localhost' = PASSWORD('42Etn3fd7skc');"
mysql -e "FLUSH PRIVILEGES;"

Now again check if roundcube works.

In case you get this error:
Code: [Select]
[17-May-2017 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
Code: [Select]
mysql -u root 'roundcube' < /usr/local/cwpsrv/var/services/roundcube/SQL/mysql.initial.sqlthat is it, enjoy your roundcube.

HI, Iīve ran the command # mysql -u root 'roundcube' < /usr/local/cwpsrv/var/services/roundcube/SQL/mysql.initial.sql
but i get..
ERROR 1146 (42S02) at line 8: Table 'roundcube.session' doesn't exist

how can I fix this?
Thanks (Im using Centos 6.8 CWP 0.9.8.239 (with mysql not maria db)

Title: Re: Instructions for fixing roundcube issues
Post by: fredo on May 26, 2017, 01:58:14 PM
If you get this error message on your roundcube link:
Code: [Select]
DATABASE ERROR: CONNECTION FAILED!
Unable to connect to the database!
Please contact your server-administrator.

Check roundcube logs in file: /usr/local/cwpsrv/var/services/roundcube/logs/errors

In case that your error looks like this
Code: [Select]
[17-May-2017 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-2017 20:18:11 +0000]: <gv4343g> DB Error: SQLSTATE[HY000] [1045] Access denied for user 'roundcube'@'localhost' (using password: YES) (GET /roundcube/)

Check the password set in roundcube config in file /usr/local/cwpsrv/var/services/roundcube/config/config.inc.php
Code: [Select]
grep db_dsnw /usr/local/cwpsrv/var/services/roundcube/config/config.inc.php
Output will be like this
Code: [Select]
$config['db_dsnw'] = 'mysqli://roundcube:42Etn3fd7skc@localhost/roundcube';** This means that your password is 42Etn3fd7skc

Now lets set the same in mysql.
Code: [Select]
mysql -e "SET PASSWORD FOR 'roundcube'@'localhost' = PASSWORD('42Etn3fd7skc');"
mysql -e "FLUSH PRIVILEGES;"

Now again check if roundcube works.

In case you get this error:
Code: [Select]
[17-May-2017 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
Code: [Select]
mysql -u root 'roundcube' < /usr/local/cwpsrv/var/services/roundcube/SQL/mysql.initial.sqlthat is it, enjoy your roundcube.

HI, Iīve ran the command # mysql -u root 'roundcube' < /usr/local/cwpsrv/var/services/roundcube/SQL/mysql.initial.sql
but i get..
ERROR 1146 (42S02) at line 8: Table 'roundcube.session' doesn't exist

how can I fix this?
Thanks (Im using Centos 6.8 CWP 0.9.8.239 (with mysql not maria db)


Iīve fix the roundcube issue... it turned out that although roundcube database existed in the server.. I couldnīt access to any of itīs tables.. so Iīve erased the rondcube table, then created a new one and the I executed the script..mysql -u root 'roundcube' < /usr/local/cwpsrv/var/services/roundcube/SQL/mysql.initial.sql

and voila! now it's working! hope this update help others...

Cheers!
Title: Re: Instructions for fixing roundcube issues
Post by: stkontra on January 07, 2020, 09:33:08 AM
This was the solution for me:
mysql -u root 'roundcube' < /usr/local/cwpsrv/var/services/roundcube/SQL/mysql.initial.sql
Title: Re: Instructions for fixing roundcube issues
Post by: DNA on January 07, 2020, 10:24:13 AM
Check all roundcube solution for CWP
https://www.awsmonster.com/p/roundcube-configuration_12.html