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

can users be assigned privileges to a certain number of mysql databases and a different number of postgresql databases?
No. However, packages allow you to set the maximum number of databases an user can create...
how do I remove a mysql user from a database?
Login to cPanel. Locate and click on the "MySQL Databases" icon within the "Databases"...
what is mysql?
MySQL is a database management system based on SQL – Structured Query Language. The app is used...
how do I add a user to a mysql database?
Login to cPanel. Locate and click on the "MySQL Databases" icon under the "Databases"...