IP of database Sub-domain

I am currently hosting a subdomain on dreamhost with the main domain being hosted elsewhere. I went to my DNS provider and changed the A record for the subdomain (subdomain.mydomain.com) to point to the IP address that I found in the domain manager within the dreamhost control panel.

Now I am tring to setup a mysql database and I am having some trouble. I created the database with the hostname subdomainb.mydomain.com. The problem is I don’t know what IP to enter in the A record like I did for the previous subdomain.

Do I enter the same IP as subdomain.mydomain.com or is there a different IP i have to use for subdomainb.mydomain.com?

How often will the IP’s change on these subdomains?

Thanks so much as I am pulling my hair out looking through forums and wikis for the above answers.

If the database is being accessed by “subdomain.com” you don’t need to edit anything.

If you’re trying to access the database from outside DreamHost you’ll have to whitelist the calling server’s IP here under database management. If I’m reading your post correctly, the address you’ll use to access the database will be http://subdomainb.mydomain.com, not an IP. (ie. where you’d input “localhost” in your outer-DH scripts, use the fully qualified database URL instead).

Maximum Cash Discount on any plan with MAXCASH

It appears that the issue is that the OP isn’t using DreamHost’s DNS.

If you go to the Panel here and click on “Account Status” in the upper right corner, you’ll get the Database server name you’re on. Then do a ‘host’ lookup for DBSERVER.dreamhost.com and test it out.