Question
Connect a webserver to a database server in a different project
I am at my whit’s end. I have 2 projects. Project #1 has a webserver and a database. I am trying to create another webserver in project #2 to connect to the database in project #1.
I am pretty sure everything is setup correctly…I am just getting the following error message: “PHP Warning: mysqlirealconnect(): (HY000/2002): Unknown error while connecting”.
What is weird is that I thought I had it working earlier today (following the exact same server setup scripts). So I don’t know if because I have had to redo this webserver so many times now the database server is refusing connections? I can telnet to it from the new webserver so that is likely not it (and I have flushed hosts).
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.
×