To access your MySQL database, you need a unique hostname (domain name) or IP address for your MySQL server. This hostname can be any name you wish, so long as you have registered it, but it is commonly a subdomain of your primary domain and is named "mysql.example.TLD".
For example, let’s say your domain is example.com: you can then create the subdomain mysql.example.com which is used to connect to your database server.
This arrangement is convenient to use with DreamHost's MySQL installations, as you can create and manage all of your databases from the MySQL Databases page.
What hostname should be used if DNS is not yet pointed to DreamHost?
If you have other domains hosted at DreamHost, you can use their hostname instead. This is because your MySQL server (which hosts all of your databases) is accessible from any subdomain that you assign to it within your DreamHost account.
For example, if you have another domain like dreamhostexample.com and its nameservers are pointed to DreamHost, you could create a mysql hostname titled mysql.dreamhostexample.com. You can then use this hostname to connect to ANY database in your DreamHost account.
What if I do not have any domains pointed to DreamHost?
If you do not have any domains hosted at DreamHost, you can still connect to your database. To do this, you must add a free dreamhosters.com subdomain. It would appear like 'example.dreamhosters.com'. You can then create a mysql hostname such as 'mysql.example.dreamhosters.com'. View the following article for instructions on how to create this subdomain:
You can also use the official phpMyAdmin hostname of your data center. First check the Data Center page. Scroll down to locate the data center your MySQL services are located in. It's either West coast or East coast. You can then use the following hostnames to connect depending on the location of your MySQL server.
Finding the IP address of your mysql hostname
You can also connect using the IP address of your hostname. View the following article for instructions on how to view your site's DNS records:
There will be a record in that list named 'mysql'. You can use the IP to the right of it to connect.