Monthly Archives: May 2021

How to backup and restore MySQL databases on Linux

1. Back up the database using the following command:

mysqldump -u [username] –p[password] [database_name] > [dump_file.sql]

The parameters of the said command as follows:

[username] – A valid MySQL username.

[password] – A valid MySQL password for the user.

[database_name] – A valid Database name you want to take backup.

[dump_file.sql] – The name of backup dump file you want to generate.

Continue reading