Author Topic: Unable to connect to database  (Read 4681 times)

Offline MacSpezialist

  • Newbie
  • *
  • Posts: 3
Unable to connect to database
« on: December 16, 2015, 06:19:49 AM »
I have one installation of RoundCube done a while ago and it worked great. Now I am trying to install RoundCube on my production server with OS X El Capitain 10.11.2 and mySql 5.7.10 and RC 1.1.3

Everything got installed. I could create a RC Database and run the Install page from RC. After writing the config file I get the msg that the RC is unable to connect to the database.

I found out that RC didn't populate the database with tables. So I invoked it manually. Now all table are there and the user I use for access the mysql DB works perfectly if I connect via terminal and the mysql command.

But if I try to run RC i get the error. Have double checket the credentials etc ... seems all ok and similar to the other installation that is working ... any ideas where to look further?

thanks in advance.
Philip

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,876
    • SKaero - Custom Roundcube development
Re: Unable to connect to database
« Reply #1 on: December 16, 2015, 10:34:19 AM »
Its most likely a firewall blocking your connection or some odd OS X thing. What is the exact error that your getting? What MySQL host are you using?

Offline MacSpezialist

  • Newbie
  • *
  • Posts: 3
Re: Unable to connect to database
« Reply #2 on: December 16, 2015, 01:32:47 PM »
it is all on the same server round cube php and mysql internally referred to as localhost, so no DNS issues. A Firewall is not activ on the machine.

The Error msg is:

DATABASE ERROR: CONNECTION FAILED!

Unable to connect to the database!
Please contact your server-administrator.

If I look into the config file and use the line with the DB connect in terminal I am able to connect to mysql and look at the DB and the corresponding tables.

Any idea how to trouble shoot would be greatly appreciated.
Best
Philip


Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,876
    • SKaero - Custom Roundcube development
Re: Unable to connect to database
« Reply #3 on: December 16, 2015, 06:00:53 PM »
Try using 127.0.0.1 instead of localhost, I've seen that be a problem before. Otherwise you should check how mysql is setup, maybe it requires a socket connection.

Offline MacSpezialist

  • Newbie
  • *
  • Posts: 3
Re: Unable to connect to database
« Reply #4 on: December 17, 2015, 08:40:29 AM »
127.0.0.1 did it! Thank you so much.
philip