How can I backup and restore database?

You can use mysqldump to create a simple backup of your database using the following syntax:

Backup: 

mysqldump -u [username] -p[password] -h[host]  [databasename] > [backupfile.sql]

Restore:

 mysql -u [username] -p[password] -h[host]  [databasename] < [backupfile.sql]



Article ID: 226
Last updated: 19 Jul, 2018
Revision: 3
HowTo, Tips & Tricks -> PHP & MySQL -> How can I backup and restore database?
https://www.kbpublisher.com/kb/how-can-i-backup-and-restore-database_226.html