By doughboy
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: mysqli_real_connect(): (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).
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Yeah…not sure how to delete this one…but it turns out that in the process of migrating servers and upgrading to PHP7.3 I had a recursive script issue and it was trying to connect and was timing out after 30 seconds. If a Mod can kill this topic I don’t think there is any benefit for anyone else.
tldr; Yes, you can connect droplets across projects within your account. I am not sure if they all need to be in the same data center, but I would assume so.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.