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?

Related Articles

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 delete a mysql database?
Login to cPanel. Locate and click on the "MySQL Databases" icon under the "Databases"...
how do I remove a mysql user from a database?
Login to cPanel. Locate and click on the "MySQL Databases" icon within the "Databases"...
how do I delete a mysql user?
Login to cPanel. Locate and click on the "MySQL Databases" icon under the "Databases"...
how do I add a user to a mysql database?
Login to cPanel. Locate and click on the "MySQL Databases" icon under the "Databases"...