Server Gigabit Guide

Database using Mysqldump

You are here:
Estimated reading time: < 1 min

Below are mysqldump commands for backup and restore mysql database:

WINDOWS:

Backup:
C:\mysql\bin> mysqldump -u username -p password database > dumbfile.sql

Restore:
C:\mysql\bin>mysql -u username -p password database < dumpfile.sql


UNIX / LINUX

Method A (followed by the user database username and password)
=======
Backup:

mysqldump -u username -p password database > dumbfile.sql

Restore:
mysql -u username -p password database < dumbfile.sql

Method B (backup and restore with root access)
========
Backup:
mysqldump databasename > dumpfile.sql

Restore:
mysql newdatabasename < dumpfile.sql

Backup:
Notes:
– dumbfile.sql contains SQL command for creating tables and data. (CREATE,INSERT,DROP etc.)

If you found this guide useful during the backup. Please share it with other users going through the same process.

 

Please refer to the following article to know more. 
Knowledge Base: MySQL Trigger and View

 

Was this article helpful?
Dislike 0
Views: 58