Author Topic: Database error: Connection failed!  (Read 5709 times)

Offline jrs665

  • Newbie
  • *
  • Posts: 2
Database error: Connection failed!
« on: November 18, 2008, 08:45:50 AM »
Roundcube gives the following error after setup when going to its url. The database is mysql 5.0.51 on openbsd 4.3 server.

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

The database and its tables are setup and can log in locally from console with username and password specified in db.inc.php

I assume the error is due to roundcube wanting to access mysql via a socket which openbsd cannot access as it runs apache in chroot jail. Is this the case and if so, can roundcube access mysql via the tcp port?

Offline anewark

  • Newbie
  • *
  • Posts: 1
What I dd...
« Reply #1 on: November 18, 2008, 11:47:04 PM »
I had this issue and then I went through and ensured that the user for roundcubemail DB had localhost set for Host and then added all privlages for only the roundcubemail DB (no permissions on any other DB). After doing that I  restarted Apache & MySQL.  Finally I reloaded the page for step 3 (http:////installer/index.php?_step=3) of the install and the message said the DB connected successfully.

Offline jrs665

  • Newbie
  • *
  • Posts: 2
Database error: Connection failed!
« Reply #2 on: November 19, 2008, 05:39:29 AM »
Quote from: anewark;15319
I had this issue and then I went through and ensured that the user for roundcubemail DB had localhost set for Host and then added all privlages for only the roundcubemail DB (no permissions on any other DB). After doing that I  restarted Apache & MySQL.  Finally I reloaded the page for step 3 (http:////installer/index.php?_step=3) of the install and the message said the DB connected successfully.


Won't work in my case as installer directory does not exist when installed from openbsd package. Database rights are correct as tested from command prompt.

Your are running roundcube on openbsd with chroot'ed apache?