dcsimg
 

Submitted by: M S Sridhar(sridhar.ms@gmail.com)

Tuesday May 29th 2018 by M S Sridhar

Language: SQL, Expertise: Intermediate - Learn how to easily backup and restore data to a new database in MySQL.

Command to backup:

mysqldump databaseName  backupFilename.sql

Where mysqldump is the command, databaseName is the name of the database and backupFilename is the name of the file in which the data will be backed up.

In case you want to backup multiple databases, you can use the command:

mysqldump --databases databaseName1 databaseName2  backupFilename.sql

Command to restore:

mysql-prompt use databaseName  
mysql-prompt source backupFilename.sql
Home
Mobile Site | Full Site
Copyright 2018 © QuinStreet Inc. All Rights Reserved