Overview
Your database login credentials — the database name, username, password, and hostname — let you log into your database via SSH or with any MySQL client you like, such as MySQL Workbench. This article explains how to find each one.
Please be aware that any misconfiguration in your database could potentially cause your site to not operate properly. Only log into your database if you know exactly what you need to adjust.
How do I check my DNS settings?
Before proceeding, see this article to check where your DNS is pointing, as this will affect your ability to log in.
If your DNS is pointing to DreamHost
If your nameservers are hosted at DreamHost, you can proceed with the steps in the following section.
New WordPress installations
If you just installed WordPress using the DreamHost WordPress installer, you must wait a few hours for the new mysql subdomain to update. Once the DNS has propagated online, your site will connect to your database.
If your DNS is NOT pointing to DreamHost
If your nameservers are NOT pointing to DreamHost, you must create an A record (at your current hosting company) for your mysql.example.com hostname that points to your DreamHost MySQL A record. Only after this A record updates online will your mysql hostname work.
See this article for instructions on how to locate your DreamHost MySQL A record. You can then contact your current hosting company to add it to their system.
You only need to create the A record for your mysql subdomain, such as mysql.example.com.
Alternatively, see this article for other ways to access your database before your DNS updates.
How do I log in to my database?
Use the following steps to find your database credentials. You can then use these credentials to log in via SSH or with other software.
Find your database name
Visit the MySQL Databases page and scroll down to the section titled Databases on this server. Below you'll see a listing of your databases.
If you have multiple databases, you'll need to identify the one that corresponds to your website. This can usually be found in the site's configuration file, but every application puts this in a different location. Consult your application's knowledge base for configuration file locations and make a note of the database name.
Find your username
The specific username tied to the database is listed to the right of your databases.
Find your password
Click the username under the USERS ACCESS column. On the next page, click the Show button to view the user's password.
Find your hostname
Navigate back to the MySQL Databases page. Near the top, you'll see a section titled HOSTNAME. Look for the hostname that corresponds to your website. It most likely has the website's name in it.
Log in to your database
Use your hostname, username, and password to connect to your database via SSH or with a MySQL client such as MySQL Workbench. To connect from your own computer, first add its IP address to the user's Allowable Hosts. See this article for details.
Your MySQL hostname only works once its DNS resolves to DreamHost. You can do this in one of two ways:
Point your Nameservers to DreamHost, or
Point your A record to your DreamHost IP. For details on retrieving that IP address, see the DreamHost DNS records article.
If none of your hostnames are working, see this article to learn more about how to access the database before your DNS updates.