Overview
A mysql hostname 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.
However, if your nameservers are not yet pointed to DreamHost, this URL will not function. This article gives you a few different options you can use to access the database before pointing your nameservers to DreamHost.
Accessing a DreamHost database
When migrating a website, it's common to have the nameservers remain pointed to the old hosting company. This ensures the website remains online during the migration. The following options allow you to log into 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. This will be a numerical IP address. View the following article for instructions:
- Log into 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 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.
- 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 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.