Overview
You can access and log in to a DreamHost database before pointing your nameservers to DreamHost. Two options make this possible: pointing your mysql A record to DreamHost, or using the mysql hostname of another domain already hosted at DreamHost.
When should I use these options?
The following should be used if your domain's DNS records are not yet pointing to DreamHost. This is because the MySQL hostname created in your panel for your domain does not function until its DNS record resolves to DreamHost.
The mysql hostname is a URL that is used to access your DreamHost database. This hostname is commonly a subdomain of your primary domain. For example, if your domain is example.com, you can create a subdomain such as mysql.example.com to connect to your database server.
How do I access a DreamHost database?
When migrating a website, it's common to have the nameservers remain pointing to the old hosting company. This ensures the website remains online during the migration. The following two options allow you to log in to your database before pointing your nameservers to DreamHost.
Option 1 — Point your mysql A record to DreamHost (Recommended)
The best option is to log into your current hosting company's panel and point your mysql A record to DreamHost.
Locate your mysql A record in your DreamHost panel, which is a numerical IP address. See this article for more information.
Log in to your current hosting company's panel and point the mysql A record for your domain to the DreamHost IP address.
Wait a few hours for the DNS to update online.
Once the DNS has updated, you'll be able to connect to your mysql subdomain (mysql.example.com) with a MySQL client such as MySQL Workbench or via SSH.
Do not use the IP address to connect to your database in your website's configuration file. Although rare, this IP is subject to change over time. To avoid potential downtime, make sure to only use the hostname to connect.
Option 2 — Use another domain's hostname
If you have other domains hosted at DreamHost, you can use their mysql hostname instead. This is because your MySQL server (which hosts all of your databases) is accessible from any subdomain you assign to it within your DreamHost account.
For example, if you have another domain like dreamhostexample.com and its nameservers are pointing 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.