Knowledgebase

how can I backup a mysql database?  Print this Article

Run one of the following commands:

 

  • /path/to/bin/mysqldump -u $mysqlusername -p$mysqlpassword $mysqldatabasename > backup.sql
  • mysqldump -u user -p database > backup_file

There is no space after the -p . If the password was hello, enter -phello

Was this answer helpful?

Also Read

how can I search the databases?
Write what are you looking for in the Search field. Click Go.
why the mysql version shows a different version in phpinfo than installed on the server?
The API version you see in phpinfo is the built-in MySQL API that is included in PHP. If the...
how do I add a user to a mysql database?
Login to cPanel. Locate and click on the "MySQL Databases" icon under the "Databases"...
how do I create a mysql database?
Login to cPanel. Locate and click on the "MySQL Databases" icon in the "Databases" category....
how do I export a mysql database?
Login to cPanel. Locate and click on the "phpMyAdmin" icon under the "Databases" category....