Error Drupal with Haproxy

Hello ,

I would like connect my web servers to the Haproxy which will distribute the request on my 3 nodes PXC.

But when I test my website I have this error :

After adding max_connections=10000 and max_connect_errors=10000 in mysql configuration file (/etc/my.cnf) ; and doing the following command mysqladmin -uroot -ppasswd flush-hosts I restart mysql service.

I get this following error when I test the website again :

Here is my haproxy conf

And web service configuration (settings.php)

Is that I forgot something on these configurations? How can I solve that . Thanks in advance for your help.

Are you sure Mysql credentials are correct…? check with command line… and see whether you are able to login on all nodes with same credentials.

mysql -u [COLOR=#252C2F]drupal-user -P’secret’

Madhusudan;

The credentials are ok. I change the port in settings.php to 3307. Now the system goes well . Thanks for your answer.

good… That means I guess some other process was occupying that port…?.

Hello Madhusudan;

The only process which use this port is haproxy . I configure it to listen on ports 3306 and 3307. But I did not install mysql client.

I saw in pxc with haproxy configuration that it is not necessary to do like that. Perhaps this is not the good solution.

I will continue to think about the question.