Report this

What is the reason for this report?

IP of my database?

Posted on January 6, 2021

After installing software on my droplets, and installing things inside the software, it asked for a MySQL database. So I made a Digital Ocean database cluster, and make a new database, but it asks for the database IP? Where can I find the database’s address?



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!

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.

Hi there @callmehSpear,

The DigitalOcean Managed Databases come with a hostname rather than an IP address.

You can use the hostname of your Managed Database and your application would work fine as well.

You just need to keep in mind that the Managed Databases come with a custom port rather than the default one for MySQL so you need to make sure that you specify the correct port.

Regards, Bobby

Use nslookup and it will give you the server IP, in this example it would be 1.2.3.4

bash-5.1#  nslookup "mydbname-do-user-12345678-0.b.db.ondigitalocean.com"
Server:   192.168.0.1
Address:  192.168.0.1:53

Non-authoritative answer:
Name: "mydbname-do-user-12345678-0.b.db.ondigitalocean.com"
Address: 1.2.3.4

** server can't find "mydbname-do-user-12345678-0.b.db.ondigitalocean.com": NXDOMAIN

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.