Exporting MySQL database in SSH
Servers without a control panel (such as cPanel, Plesk, or Simple Control Panel) do not have phpMyAdmin installed. To manage databases without a control panel, you need to use the SSH command line to import .SQL backup files.
- Connect to your server or shared hosting account with SSH
- Locate your database information:
- Find your database hostname.
- Now that you have your database hostname you can get your database name, username, and password by viewing your database
details (
cPanel / Web Hosting ).
- Connect to MySQL using the following command:
$ mysqldump -p -h hostname -u username database > dbname.sql
- Enter your database information:
- -p : Password
- -h : Hostname
- -u : Username
- database : Database name
- dbname.sql : Give your backup file a name
- Enter your database information:
- When you see Enter password:, enter your password for that MySQL user.
- Your database is exported to the file dbname.sql and is ready for you to download to your local computer.
More info
- Return to Import or export WordPress database .
- Importing MySQL Databases via SSH.
- For more information about our premium support for WordPress, please visit our WordPress Premium Support Catalog.