How do I export a database over SSH on cPanel?

Exporting a database over SSH using cPanel

In case exporting a database through phpMyAdmin didn't work you’ll export your database using SSH. Here are the steps:

Step 1 - Preparation

First, you’d need to gather your database’s parameters, including the password.


Step 2 – Connecting

  •  Connect to your hosting account via SSH.
  •  Make sure you’re in your required directory (the database will be exported to your current directory). To navigate between directories, use cd and ls commands.


Step 3 - Export

Use this command to export the database:



 If the parameters of your database are:

  •  MySQL Database name: user_database
  • MySQL Username: user_admin


And you would like to save lots of the database as backup.sql, then the command will appear as if this:

 

 

 After that you’ll get to enter the database password - the exporting process will start. The export will take a while counting on the dimensions of your database. When it’s completed, a replacement line will appear:




This line means the exporting process is completed, you’ll see your database file appear in File Manager.

 

That’s it! Now you know the way to export your MySQL database.

 

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How can I change a database password on cPanel?

Changing MySQL database password via cPanel You can change your database’s password by...

How can I change my PHP version on cPanel?

Changing PHP version via cPanel Your Hosting Account's PHP version can be changed at any time,...

How can I create a new MySQL database in cPanel?

Creating a new MySQL database at Servers GATE using cPanel   You can easily create a new MySQL...

How can I locate my MySQL database details on cPanel?

Locating your MySQL database details via cPanel You can easily locate your MySQL databases...

How can I set up a redirect on cPanel?

Creating a redirect on cPanel Your hosting redirects can be easily managed with the assistance...