Home » Categories » Servers » Latest Gen Dedicated Servers

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.

  1. Connect to your server or shared hosting account with SSH
  2. Locate your database information:
    1. Find your database hostname
    2. Now that you have your database hostname you can get your database name, username, and password by viewing your database details (cPanel / Web Hosting)
  3. Connect to MySQL using the following command:

    mysqldump -p -h hostname -u username database > dbname.sql

    1. Enter the database information for your database:
      -p : Password
      -h : Hostname
      -u : Username
      database : Database name
      dbname.sql : Name you want for the backup file
  4. When you see Enter password:, enter your password for that MySQL user
  5. Your database is now exported to the file dbname.sql and is ready for your to download to your local computer
0 (0)
Article Rating (No Votes)
Rate this article
  • Icon PDFExport to PDF
Related Articles
See my server resource usage and uptime
Added on Wed, Sep 2, 2020
Set up cPanel email accounts
Added on Wed, Sep 2, 2020
Set up my server
Added on Wed, Sep 2, 2020
Importing MySQL Databases via SSH
Added on Wed, Sep 2, 2020