• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Roundcube can't connect to mysql

Status
Not open for further replies.

Xav2c

Basic Pleskian
Hi,

After a bad move, i accidently overwrite my /usr/share/psa-roundcube/config/db.inc.php

With one from another server. Now roundcube does not want to connect to mysql anymore, i tried to edit this line:
$rcmail_config['db_dsnw'] = 'mysql://roundcube:randompassword@localhost/roundcubemail';

i then used a MD5 generator to input the hash in the password field of the roundcube user in mysql, with no luck

I even tried to delete roundcube user from mysql, then remove psa-roundcube, then go through the plesk update manager and install roundcube again, did not change nothing, it didn't even create the roundcube user.

Is there anyway i can reinstall roundcube from scratch?

PPP 11.5 up to date on ubuntu 12.04

Thank you

here is what i get in the logs :
Code:
[05-Oct-2013 14:03:54 +0200]: 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 /)
[05-Oct-2013 12:03:56 UTC] MDB2 Error: connect failed (-24): _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)]

I also tried :
Code:
mysql> update user set password=password("whatever_password_i_put_in_the_db.inc.php") where user="roundcube";
 
Last edited:
Try to remove plesk-roundcube package and install Roundcube back with autoinstaller.
 
I have the same issue, i tried IgorG option to install-component roundcube with autoinstaller but the same error happens.

I tried to swith to horde, i can login with email account but none folder exist. So something is broken.

Any advice?
 
I dont know how, but i replied to this email a few days ago, and the message was not published, probably another joke from the ultra aggressive plesk forum spamfilter.

What i did to fix my issue was to
  1. uninstall roundcube from plesk,
  2. activate horde by default in control panel,
  3. activate horde on a random customer account,
  4. login to horde, everything worked from here,
  5. go back to update manager, disable horde,
  6. reinstall roundcube,
  7. enable roundcube by default in control panel,
  8. enable rouncube in a random customer account,
  9. log in roundcube,
and it worked.
If you have zero folder, check with imap on the account that it actually has some folders, and you can check in /usr/share/psa-roundcube/config/main.inc.php that the option
// automatically create the above listed default folders on first login
$rcmail_config['create_default_folders'] = true;
is correctly set.

Good luck
 
Did you try to reset your mysql password?
Edit the /usr/share/psa-roundcube/config/db.inc.php
change this line setting up a strong password :
$rcmail_config['db_dsnw'] = 'mysql://roundcube:yourpasswordhere@localhost/roundcubemail';

log in to phpmyadmin
Select "mysql" table
select "user" table
locate the "roundcube" user
edit the "roundcube" user
in the password field put the exact (case sensitive) password you set before (yourpasswordhere)
in the function field, set the scroling menu to "password" it will automaticaly hash the password
save, and try to open roundcube again
 
Did you try to reset your mysql password?
Edit the /usr/share/psa-roundcube/config/db.inc.php
change this line setting up a strong password :


log in to phpmyadmin
Select "mysql" table
select "user" table
locate the "roundcube" user
edit the "roundcube" user
in the password field put the exact (case sensitive) password you set before (yourpasswordhere)
in the function field, set the scroling menu to "password" it will automaticaly hash the password
save, and try to open roundcube again

Roundcube user didn't exist. I created and gave him privileges for DATABASE roundcube.

But another error occured after that, missing database roundcubemail. I created this one too, giving privileges to user roundcube.

Roundcube works, thanks a lot Trollface.

Because i did all that in a manual way, is there any shortcut for that, to create databases and configure properly.
 
Status
Not open for further replies.
Back
Top