How to get MySQL password for RoundCube webmail

Refers to:

  • Plesk 12.5 for Linux
  • Plesk 11.5 for Linux
  • Plesk 12.0 for Linux

Created:

2016-11-16 13:17:23 UTC

Modified:

2017-02-18 23:45:02 UTC

1

Was this article helpful?


Have more questions?

Submit a request

How to get MySQL password for RoundCube webmail

Symptoms

Roundcube does not work. In the log file /var/log/plesk-roundcube/errors we see the following error:

DB Error: _doConnect: [Error message: Access denied for user 'roundcube'@'localhost' (using password: YES)]

[Native code: 1045]

[Native message: Access denied for user 'roundcube'@'localhost' (using password: YES)]

** mysql(mysql)://roundcube:xxx@localhost/roundcubemail in /usr/share/psa-roundcube/program/include/rcube_mdb2.php on line 107 (GET /roundcube/index.php?_user=mailbox%40domain.tld)

Cause

Wrong password for 'roundcube' user in the MySQL table 'mysql.user'

Resolution

First, you need to find out version of RoundCube package on your server.

[root@server ~]# rpm -qa | grep roundcu
plesk-roundcube-0.9.5-cos6.build115131112.14.noarch

[root@server2~]# rpm -qa | grep roundcu
plesk-roundcube-1.0.0-cos6.build1200140626.18.noarch

For package version 0.9.5 , the password is stored as plain text in configuration file /usr/share/psa-roundcube/config/db.inc.php

For package version 1.0.0 and higher, the password is stored as plain text in configuration file /usr/share/psa-roundcube/config/config.inc.php

Open configuration and find the string alike:

$rcmail_config['db_dsnw'] = 'mysql://roundcube:<PASSWORD>@localhost/roundcubemail';

Update corresponding user in the mysql.user table:

mysql> USE mysql
mysql> BEGIN;
mysql> UPDATE user SET password=PASSWORD('<PASSWORD>') WHERE user='roundcube';
mysql> COMMIT;
mysql> FLUSH PRIVILEGES;
Have more questions? Submit a request
Please sign in to leave a comment.