Database error: Connection failed!
Hello,
Every thing is ok except roundcube could you please provide us the solution.
DATABASE ERROR: CONNECTION FAILED!
Unable to connect to the database!
Please contact your server-administrator.
Thank you
-
Have you tried forcing a reinstall? upcp --force Seems to fix most of the issues we've ever encountered with Cpanel over the years. Works almost everytime 0 -
Hello, Do you see any errors in /usr/local/cpanel/logs/error_log or /var/lib/mysql/hostname.err ? (replace hostname with your actual hostname). 0 -
Hello, I had the same error message from Roundcube. SOLUTION: In my case the error was caused by moving an account from a very old cpanel server to a new one. (Both servers use sqlite databases for roundcube user settings) On RHEL 4 the version of sqlite is sqlite2 and on RHEL 6 it is sqlite3. sqlite3 cannot read the format of sqlite2 databases which causes the error. On this page it is described how to convert between formats: [url=http://www.sqlite.org/version3.html]SQLite Version 3 Overview sqlite OLD.DB .dump | sqlite3 NEW.DB
I wrote a script sqlite2to3.sh that takes account name as the argument and converts all sqlite2 Roundcube databases. It will not convert the databases if it is already in version 3 format. On Centos 6 the version 2 sqlite was missing so I installed it from here: [url=http://pkgs.org/centos-6/remi-x86_64/sqlite2-2.8.17-5.el6.remi.x86_64.rpm.html]sqlite2-2.8.17-5.el6.remi.x86_64.rpm CentOS 6 Download#!/bin/bash if [ ! $# -eq 1 ] then echo "USAGE: `basename $0` " exit fi user=$1 if [ ! -d /home/$user/etc ] ; then echo "/home/$user/etc not found!" exit fi cd /home/$user/etc for i in `find . -name '*rcube.db'`; do echo "Converting $i" sqlite $i .dump > /dev/shm/sqlite2to3-$$ OUT=$? if [ $OUT -eq 0 ]; then mv $i $i-oldformat sqlite3 $i < /dev/shm/sqlite2to3-$$ chown $user.mail $i chmod 600 $i fi done rm -f /dev/shm/sqlite2to3-$$
Hope it helps someone.0 -
you can try to repair roundcube db [QUOTE]mysqlcheck -r roundcube 0 -
Try the script /usr/local/cpanel/bin/update-roundcube --force Which will update roundcube 0 -
Check whether you are able to connect to the roundcube db using the credentials present in the configuration file /usr/local/cpanel/base/3rdparty/roundcube/config/config.inc.php The credentials are given as $config['db_dsnw"> = 'mysql://roundcube:@localhost/roundcube'; If not, try after resetting it. If that too fails proceed with reinstall after taking the db backup 0 -
[quote="iserversupport, post: 1675852">Try the script /usr/local/cpanel/bin/update-roundcube --force Which will update roundcube
Hi there, This is quite a simple question for any of you to answer but a tough one for me: I have the same problem as the OP posted, so how or where do I input this command? cPanel web address, some file in my computer? Consider I'm a newbie in this subject. Thanks in advance0 -
Unless you have root level access to that server, you'll need to contact your Hosting Provider about this. Website owners would not have access to run that command. 0 -
Thanks Infopro. I'll contact support. 0 -
I got same error and what fixed it was editting ****/roundcube/db.inc.php file, i fixed mysql password which was there, but was incomplete. then it started working 0 -
[quote="postcd, post: 1768912">I got same error and what fixed it was editting ****/roundcube/db.inc.php file, i fixed mysql password which was there, but was incomplete. then it started working
Thanks, where do I find this file?0 -
I did this command via linux commandline to find it: find / -type f -name "db.inc.php" 0 -
[quote="postcd, post: 1769272">I did this command via linux commandline to find it: find / -type f -name "db.inc.php"
What about windows? thanks for the info.0 -
[quote="Ekon, post: 1769502">What about windows? thanks for the info.
im using RoundCube on Linux, maybe Windows has an Search function or manually browse roundcube directories and ensuring you have acurate mysql details there0 -
[quote="postcd, post: 1769531">im using RoundCube on Linux, maybe Windows has an Search function or manually browse roundcube directories and ensuring you have accurate mysql details there
Got it. Thanks a lot. The thing is, these issues kinda solve themselves regardless of what I try, luckily.0
Please sign in to leave a comment.
Comments
15 comments