App not connecting to MySQL database after installing certs

We are using node server for app and MySQL both running on the same CentOS system. We use HAProxy as reverse proxy server and also LetsEncrypt to enable https to access the WebServer.

Once LetsEncrypt was installed and haproxy config file updated to use the certs, the app is launching using https but is NOT connecting to the database (MySQL).

Question: are there any additional configuration required on the node or MySQL as part of implementing Lets Encrypt?

This is unrelated to Let’s Encrypt and certificate usage in general.


It’s a connection issue between your php and mysql-server.

There should be no impact when you install any SSL certificate to your web server.

Thank you & Good Luck.

I don’t think so or if it is, it is caused by Let’sencrypt. Reason being if I restore my haproxy.cfg to the previous version without the certificate entries, everything works fine.

Add those entries back and restart haproxy, it fails.

Do you use the same domain name for website and database?

It might cause some problem (However I’m not sure how haproxy works)

What i know is don’t use same domain name for website and database. (Exactly same)

Could you please paste all these entries here?
There must be a mistake in that configuration.

Not domain name but same server but the database has its own IP address and the web server has a different one.

Again this is working without the letsencrypt setup.


Then i have no idea. sry.

frontend www-https
bind (public IP>:443 ssl crt /etc/haproxy/certs/
reqadd X-Forwarded-Proto:\ https
acl letsencrypt-acl path_beg /.well-known/acme-challenge/
use_backend letsencrypt-backend if letsencrypt-acl
default_backend www-backend

backend www-backend
mode http
redirect scheme https if !{ ssl_fc }
balance roundrobin
option httpclose
option forwardfor
server mydomain check

backend letsencrypt-backend
server letsencrypt

Please show the output of the command:

netstat -lpn | grep mysql [2]# netstat -lpn | grep mysql
tcp 0 0 :::3306 :::* LISTEN 4232/mysqld
unix 2 [ ACC ] STREAM LISTENING 76968 4232/mysqld /var/lib/mysql/mysql.sock

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.