Page 2 of 3

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

Posted: Tue Jun 09, 2015 2:30 pm
by skurudo
KeiroD wrote: The problem exists on Ubuntu as well. Methinks something somewhere is not working properly because I can consistently reproduce this issue.
With new version too?

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

Posted: Thu Jun 11, 2015 8:17 pm
by KeiroD
skurudo wrote:
KeiroD wrote: The problem exists on Ubuntu as well. Methinks something somewhere is not working properly because I can consistently reproduce this issue.
With new version too?
Not sure. Haven't spun up a new vps to try the new installer. I'll probably do that soon and report back.

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

Posted: Fri Jun 12, 2015 11:15 pm
by cmroanirgo
On Ubuntu 14.04 I found that I needed to change 'localhost' to '127.0.0.1' in /var/lib/roundcube/config/db.inc.php

Code: Select all

$rcmail_config['db_dsnw'] = 'mysql://roundcube:<YOURPASSWORD>@127.0.0.1/roundcube';
Then, voila!

EDIT: I found that editing /etc/mysql/my.cnf and adding "bind-address=127.0.0.1" fixes a range of problems. See my comment in this post: viewtopic.php?f=14&t=7500&p=28124#p28169 for more info.

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

Posted: Thu Jul 30, 2015 2:19 pm
by mhh2
cmroanirgo wrote:On Ubuntu 14.04 I found that I needed to change 'localhost' to '127.0.0.1' in /var/lib/roundcube/config/db.inc.php

Code: Select all

$rcmail_config['db_dsnw'] = 'mysql://roundcube:<YOURPASSWORD>@127.0.0.1/roundcube';
Then, voila!

EDIT: I found that editing /etc/mysql/my.cnf and adding "bind-address=127.0.0.1" fixes a range of problems. See my comment in this post: viewtopic.php?f=14&t=7500&p=28124#p28169 for more info.
Same, no Roundcube database on fresh install 14.04
I tried to open the webmail but then I saw this error message:

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


try resolve problems but not work.
I wanted to know the root password is the password that must be inserted or not?

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

Posted: Thu Jul 30, 2015 2:43 pm
by skurudo
mhh2 wrote:I tried to open the webmail but then I saw this error message:
DATABASE ERROR: CONNECTION FAILED!
Unable to connect to the database!
Please contact your server-administrator.

try resolve problems but not work.
I wanted to know the root password is the password that must be inserted or not?
It's work fine ;-)

Code: Select all

$rcmail_config['db_dsnw'] = 'mysql://roundcube:<YOURPASSWORD>@127.0.0.1/roundcube';
You can use your root mysql password, but it's not secure (but you can)
Check in phpmyadmin or mysql console:
1) roundcube db - if doesn't exist, add
2) roundcube user - if doesn't exist, add
3) roundcube user password

Then add those date in line above.

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

Posted: Thu Jul 30, 2015 5:11 pm
by mhh2
Thank you very much.

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

Posted: Thu Dec 17, 2015 8:23 pm
by 7777777
hi everyone!

I got a OVH SSD VPS with this problem (ubuntu 15.10), I have tried pretty much everything you posted here but no progress...

is there any log file I can paste here so you can have a look?

thanks in advance

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

Posted: Sun Dec 27, 2015 9:23 am
by librash
in my case , i was running out of space ....server was using 99.8% of disk space, cos of that some services was not able to start ..... i just increased the volume size ...& everything works normal

hope this will help

thx

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

Posted: Thu Sep 01, 2016 6:49 am
by skurudo
7777777 wrote:hi everyone!
I got a OVH SSD VPS with this problem (ubuntu 15.10), I have tried pretty much everything you posted here but no progress...is there any log file I can paste here so you can have a look?
Check in phpmyadmin or mysql console:
1) roundcube db - if doesn't exist, add
2) roundcube user - if doesn't exist, add
3) roundcube user password
and rigth password should be in config ->

Code: Select all

$rcmail_config['db_dsnw'] = 'mysql://roundcube:<YOURPASSWORD>@127.0.0.1/roundcube';
librash wrote:server was using 99.8% of disk space, cos of that some services was not able to start
Nice advice!

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

Posted: Sun Nov 06, 2016 12:28 am
by vth
Thanks Skurudo, I find his instruction is the quickest and simplest way to solve this problem.

However, I would like to clarify how to change the password as per Skurudo instruction for whom may have similar problem because it took me few hours to try and finally understood a his tip coz my knowledge with Linux is very limited.

1. Open /var/lib/roundcube/config/db.inc.php or (db.inc.php.dpkg-bak)
and look for the password in the command
$rcmail_config['db_dsnw'] = 'mysql://roundcube:password@localhost/roundcube';

2. copy that password only

3. Open /etc/roundcube/debian-db.php

4. find $dbpass='wrongpassword';

5. Paste to replace 'wrongpassword' with the correct password.

That's all! very simple.

Hope it helps!

Thanks Skurudo again