Connecting from a shell account
- Log in to your DreamHost account from your local computer.
[local]$ ssh -l USERNAME example.com
- Replace 'example' with your domain name.
- Log in to your MySQL database. You can find the necessary hostname, username, password, and database names in the Control Panel under (Panel > 'Goodies' > 'MySQL Databases').
- Make sure to use your actual credentials for the following variables:
- DBdomain.example.com - Your mysql hostname URL
- DBuser - Your database username
- DBpassword - Your database username's password
- DB - Your database name
[server]$ mysql -h DBdomain.example.com -u DBuser -p DB
- Optionally, include your password in the command (do not include a space after "-p").
[server]$ mysql -h DBdomain.example.com -u DBuser -pDBpassword DB
You cannot use "localhost" to connect to your database, as DreamHost's MySQL servers are separate from the regular web site servers.
- MySQL overview
- Finding your database login credentials
- How do I restore my database in the panel?
- How do I manage my database?
- How do I connect to my database using a third-party program?
- How do I connect to my database using SQLyog?
- Troubleshooting your MySQL database
- Additional MySQL resource information
- SSH overview