How can I backup a MySQL database?

 

/path/to/bin/mysqldump -u $mysqlusername -p$mysqlpassword $mysqldatabasename > backup.sql 
OR
mysqldump -u user -p —opt database > backup_file  
 
Not that there is no space after the -p . If the password was “pass” you would 
use -ppass

Your rating: None Average: 3 (1 vote)