HAproxy mysql - what is username and password for php app
I followed the tutorials here: https://www.digitalocean.com/community/tutorials/how-to-use-haproxy-to-set-up-mysql-load-balancing–3
and successfully create HAproxy for a Master-Master Mysql
However, I am not able to find any correct way to connect a php app to the database through HAProxy
netstat -tlpn | grep 3306 and got the following result:
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 946/haproxy
however, when trying
mysql -h <IP of HAProxy Droplet> -u root -p
I could not connect because of incorrect password. My passwords are exactly as the ones in the tutorials and I have tried all of them but it doesn’t work.
Any help is really appreciated. Thank you in advanced
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.