Bobcares

WeSupport

Call Us! 1-800-383-5193
Call Us! 1-800-383-5193
Call Us! 1-800-383-5193

Need Help?

Emergency Response Time custom

Our experts have had an average response time of 11.06 minutes in March 2021 to fix urgent issues.

We will keep your servers stable, secure and fast at all times for one fixed price.

Plesk Roundcube ‘database error connection failed’

by | May 27, 2021

Wondering how to fix Plesk Roundcube ‘database error connection failed’ error? We can help you!

At times while trying to access the RoundCube webmail page it will turn out to be inaccessible displaying this database error.

Here at Bobcares, we often handle requests from our customers to fix similar Roundcube errors. Today we will see how our support engineers fix this for our customers as a part of our Server Management Services.

What causes Plesk Roundcube ‘database error connection failed’ error

When the RoundCube webmail page is not accessible we may get either of the following error messages:

DATABASE ERROR: CONNECTION FAILED DB Error: SQLSTATE[28000] [1045] Access denied for user ’roundcube’@’localhost’ (using password: YES) (GET /roundcube/index.php)

or

DATABASE ERROR: CONNECTION FAILED! Unable to connect to the database! Please contact your server-administrator.

Following are the common causes for this error:

  • MySQL Roundcube user is absent
  • The Roundcube user has an invalid password
  • Insufficient permissions.

Methods to fix Plesk Roundcube ‘database error connection failed’ error

Now we can see the ways that our support engineers fix this error.

1. Using Plesk interface

Following are the steps:

1. First, we have to log in to Plesk.

2. Then go to Tools & Settings and take Updates.

plesk roundcube database error connection failed

3. Now we can remove the component Roundcube and then install it again.

plesk roundcube database error connection failed


 

2. Using SSH connection

Next, we can see how to fix this error via SSH. However, the solution may be a bit complex.

1. Firstly, we have to connect to the server via SSH.

2. And create Plesk database backup. For this we can use the following command:

# plesk db dump > backup.sql

3. After that, depending on the RoundCube version. Furthermore, we have to check the database password in /usr/share/psa-roundcube/config/config.inc.php or /usr/share/psa-roundcube/config/db.inc.php using the following command:

# cat /usr/share/psa-roundcube/config/config.inc.php
$config['db_dsnw'] = 'mysqli://roundcube:password@localhost/roundcubemail';

4. Now copy the password and enter the Plesk database using the following command:

# plesk db

5. After that we can ensure that ’roundcubemail’ database exists:

ysql> show databa<"%roundcube%";
+------------------------+
| Database (%roundcube%) |
+------------------------+
| roundcubemail          |
+------------------------+
1 row in set (0.00 sec)

If we find the database missing, we must go to the first solution via the Plesk user interface and reinstall (remove/install) the RoundCube component. In case the database is present we can go to the next step.

6. Next, we must check whether the roundcube user is present. (Empty output means that the user is absent.)

We can use the following commands to check this:

mysql> use mysql;
mysql> select * from user where user='roundcube';

7. After that we have to create the user and assign a password (no need to create a user if already exists, simply generate the password).

We can use the following commands for this:

For MySQL 5.0/5.1/5.5/5.6 and MariaDB 10.1

mysql> CREATE USER 'roundcube'@'localhost';
mysql> update user set password=password('<password_from_config.inc.php>') where user ='roundcube';

For MySQL 5.7

mysql> CREATE USER 'roundcube'@'localhost';
mysql> SET PASSWORD FOR 'roundcube'@'localhost' = '<password_from_config.inc.php>';

8. Then we have to grant the necessary privileges using the following command:

mysql> GRANT USAGE ON roundcubemail.* TO 'roundcube'@'localhost';
mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER ON roundcubemail.* TO 'roundcube'@'localhost';
mysql> flush privileges;

If we get the “Can’t find any matching row in the user table” error while running the Grant command,  we can use the following command without the host:

mysql> GRANT USAGE ON roundcubemail.* TO 'roundcube';
mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER ON roundcubemail.* TO 'roundcube';
mysql> flush privileges;

[Need assistance? We can help you]

Conclusion

In short, we saw how our Support Engineers fix Plesk Roundcube’ database error connection failed’ for our customers.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF