Page 1 of 3

[SOLVED] RoundCube: DATABASE ERROR: CONNECTION FAILED!

Posted: Wed Feb 11, 2015 3:03 pm
by godneyjeansus
Hello there. So it's my first post here. I decided to make an account here cuz I cant find any solution out there regarding my problem.

My server runs Ubuntu 14.04. Btw, I use the free trial Amazon EC2.

I wanted to create an mail account: info@mydomain.com from the VESTA CP

After that I tried to open the webmail but then I saw this error message:

Code: Select all

DATABASE ERROR: CONNECTION FAILED!

Unable to connect to the database!
Please contact your server-administrator.
I then checked the error log:

Code: Select all


[11-Feb-2015 14:55:44 +0000]: DB Error: SQLSTATE[28000] [1045] Access denied for user 'roundcube'@'localhost' (using password: YES) (GET /webmail/)
[11-Feb-2015 14:55:47 +0000]: DB Error: SQLSTATE[28000] [1045] Access denied for user 'roundcube'@'localhost' (using password: YES) in /usr/share/roundcube/program/lib/Roundcube/rcube_db.php on line 155 (GET /webmail/)
[11-Feb-2015 14:55:47 +0000]: DB Error: SQLSTATE[28000] [1045] Access denied for user 'roundcube'@'localhost' (using password: YES) (GET /webmail/)

I don't know how to solve this problem. Please help me.

Re: RoundCube: DATABASE ERROR: CONNECTION FAILED!

Posted: Thu Feb 12, 2015 10:27 am
by skurudo
I know man ;-)
You need to check password for user roundcube or change it.

Re: RoundCube: DATABASE ERROR: CONNECTION FAILED!

Posted: Thu Feb 12, 2015 10:29 am
by skurudo
Here:
/etc/roundcube/debian-db.php
$dbpass= ...

And there:
/var/lib/roundcube/config/db.inc.php
$rcmail_config['db_dsnw'] = ...

Re: RoundCube: DATABASE ERROR: CONNECTION FAILED!

Posted: Thu Feb 12, 2015 2:31 pm
by godneyjeansus
skurudo wrote:Here:
/etc/roundcube/debian-db.php
$dbpass= ...

And there:
/var/lib/roundcube/config/db.inc.php
$rcmail_config['db_dsnw'] = ...
HI there, thanks for the reply. Unfortunately I don't know the password of the user roundcube. Do you know how can I get the password from user roundcube?


By the way, because I don't know the password of this user roundcube. I decided to make a new user named admin_roundcube and also a new database named admin_roundcube

Then I changed /var/lib/roundcube/config/db.inc.php and /etc/roundcube/debian-db.php with new user and database.
But it doesnt solve my problem. Later I got this message:

Code: Select all


[12-Feb-2015 14:27:56 +0000]: DB Error: [1146] Table 'admin_roundcube.session' doesn't exist (SQL Query: SELECT vars, ip, changed FROM session WHERE sess_id = 'ae8dkd4rs70ld5mm2irebu1v41') in /usr/share/roundcube/program/lib/Roundcube/rcube_db.php on line 417 (GET /webmail/)
[12-Feb-2015 14:27:56 +0000]: DB Error: [1146] Table 'admin_roundcube.session' doesn't exist (GET /webmail/)
[12-Feb-2015 14:27:56 +0000]: DB Error: [1146] Table 'admin_roundcube.session' doesn't exist (SQL Query: INSERT INTO session (sess_id, vars, ip, created, changed) VALUES ('ae8dkd4rs70ld5mm2irebu1v41', 'dGVtcHxiOjE7bGFuZ3VhZ2V8czo1OiJlbl9VUyI7dGFza3xzOjU6ImxvZ2luIjs=', '172.31.44.1', '2015-02-12 14:27:56', '2015-02-12 14:27:56')) in /usr/share/roundcube/program/lib/Roundcube/rcube_db.php on line 417 (GET /webmail/)


Re: RoundCube: DATABASE ERROR: CONNECTION FAILED!

Posted: Thu Feb 12, 2015 5:20 pm
by godneyjeansus
Hi, guys. I finally solved it. Here are the steps that I've done


1. Log in to PhpMyAdmin
2. Create database named roundcube and user named roundcube MANUALLY
3. Go to localhost --> roundcube (database) --> SQL
4. and pasted this code: http://trac.roundcube.net/browser/githu ... a833535cd4 and run it
5. edit /etc/roundcube/db.inc.php, debian-db.php and /var/lib/roundcube/config/db.inc.php with new password (I also replaced localhost with 127.0.0.1
6. Create an email account. Eg. info@maindomain.com
7. Open webmail. Log in. DONE

Re: [SOLVED] RoundCube: DATABASE ERROR: CONNECTION FAILED!

Posted: Thu Feb 12, 2015 5:23 pm
by skurudo
So long way. But you made it! Good.

You needed only change password for user roundcube, if you don't have it and then change configs above.

Re: [SOLVED] RoundCube: DATABASE ERROR: CONNECTION FAILED!

Posted: Wed Apr 01, 2015 10:02 am
by mehargags
Well, I noticed the same bug on Debian and Today on Ubuntu 14.04 fresh install.

Infact, Roundcube Databse doesn't even exist after my VestaCP install.

on CentOS the Vesta installer install everything fine, but not on Ubuntu and Debian

Re: [SOLVED] RoundCube: DATABASE ERROR: CONNECTION FAILED!

Posted: Sun May 24, 2015 1:39 pm
by zorrobyte
Same, no Roundcube database on fresh install 14.04

Re: [SOLVED] RoundCube: DATABASE ERROR: CONNECTION FAILED!

Posted: Sun May 24, 2015 5:41 pm
by skurudo
mehargags wrote: on CentOS the Vesta installer install everything fine, but not on Ubuntu and Debian
I make many installation on Debian and don't see a problem, I think it's repository based problem, guys.

Re: [SOLVED] RoundCube: DATABASE ERROR: CONNECTION FAILED!

Posted: Mon Jun 08, 2015 7:51 pm
by KeiroD
skurudo wrote:
mehargags wrote: on CentOS the Vesta installer install everything fine, but not on Ubuntu and Debian
I make many installation on Debian and don't see a problem, I think it's repository based problem, guys.
The problem exists on Ubuntu as well. Methinks something somewhere is not working properly because I can consistently reproduce this issue.