Overview
This article outlines several options you can use to access a database before pointing your nameservers to DreamHost.
When to 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.
Accessing 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 three 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 visit your mysql subdomain (mysql.example.com) and log in.
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 the official phpMyAdmin URL
You can also use your data center's official phpMyAdmin hostname. Visit the Data Center page and scroll down to locate the data center where your MySQL services are located. 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:
- West Coast: https://west1-phpmyadmin.dreamhost.com
- East Coast: https://east1-phpmyadmin.dreamhost.com
Option 3 — 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.