This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit

eZ Community » Forums » eZ Publish 5 Platform » Unable to connect to the database...

Unable to connect to the database server 'localhost' Error #0: 500 Internal Server Error - eZDBNoConnectionException

Unable to connect to the database server 'localhost' Error #0: 500 Internal Server Error - eZDBNoConnectionException

Thursday 09 October 2014 3:50:14 pm - 8 replies


This error is make me crazy !

I'm sure of the login information I entered to the database. I test with the same in cli, and with an other php file and it's ok.

This is a know error ?


 I use epzublish 2014.07 and mysql

Modified on Thursday 09 October 2014 4:00:22 pm by Johann Roc

Friday 10 October 2014 8:52:53 am

Hi Johann

This exception come from legacy... Can you please show your config ?

Friday 10 October 2014 9:16:24 am

This is my configuration from legacy (in override folder)

The database configuration is not mentionned in siteaccess's files.

And i use the same configuration and other PC's and on a server and it's ok :/

Modified on Friday 10 October 2014 9:20:18 am by Johann Roc

Friday 10 October 2014 9:29:20 am

So it's pure legacy stack ? Is your document root on ezpublish_legacy/ folder ?

Friday 10 October 2014 11:57:21 am

I have the same error on front with ez5 stack. 


Friday 10 October 2014 3:58:03 pm

Have you an idea ?

Saturday 11 October 2014 7:37:49 am

Hi Johann,
Are you using php 5.5 with php5-mysql? I just installed a new vserver with mariadb/nginx/php5-fpm, and had exactly the same problem.
After a lot of searching for me the solution was the suggestion here:
So remove php5-mysql and installing php-mysqlnd. With php5-mysql Ez Publish throws an exception because of the reported mismatch on creating the connection (maybe only in DEV mode).
At first it looked very much an issue with running dual stack ip4v/ipv6. I could however connect using mysqli_connect, and with the ez publish credentials, from a simple php test page. But if php-mysqlnd makes no difference it's the next step to look in to.

Modified on Saturday 11 October 2014 7:38:46 am by Stefan de Bruijn

Monday 13 October 2014 8:52:35 am


Yes i use php 5.5 with php5-mysql on the last debian.
I will test your solution today.

Thanks for the tips happy.gif Emoticon

Modified on Monday 13 October 2014 8:53:03 am by Johann Roc

Monday 13 October 2014 9:44:33 am

Thank you very much ! it's ok for me happy.gif Emoticon


You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from