mysql backup restore

How to Backup a MySQL Database using mysqldump

One of the most common ways of backing up with MySQL is to use a command called “mysqldump“.

Backing Up

The basic syntax of the command to backup mysql with mysqldump is:

Restoring Dumped Data

To restore a database backup we created with mysqldump, we have to point the file into MySQL again.

First, log into MySQL by typing:

Second, we need to create a blank database to restore the data into. The command below create a new database which will hold all of the data that will dumped and then exit out of the MySQL prompt:

Next, we can restore the dump database file into the newly created database by using the command below:

Your should have all your information restored to the database you’ve created.

 Image source: Kinamo

Clemence Ayekple

Let's grab a cup of coffee and talk about programming

Add comment

Follow us

Don't be shy, get in touch. We love meeting interesting people and making new friends.

Most discussed

%d bloggers like this: