Backup/restore mysql with command line via SSH

To backup:

mysqldump -u[user] -p [db name] > file.sql

Example: mysqldump -ujoe -p joesdb > file.sql

Notes there is no space between “-u” and “user”.

To restore:

mysql -u [user] -p [db name] < file.sql Example: mysql -u joe -p joesdb < file.sql

Caruman TAKAFUL serendah RM15, manfaat sehingga RM2 juta. Promosi hujung tahung, ending soon!
Wasap SEKARANG!

One thought on “Backup/restore mysql with command line via SSH

Leave a Reply

Your email address will not be published. Required fields are marked *