Please follow the below steps to restore a single database from a Full Servers Mysqldump backup.
1. First take the backup of all databases using the mysqldump.
mysqldump -u root -p --all-databases > /data/dbbackup.sql
2. Now drop a single Database name monkey.
Drop database monkey;
Drop database monkey;
3. Connect to MySQL. Create a database with the name that was deleted in mysql.
Create Database monkey;
Create Database monkey;
4. Now restore the database with whole dump.
mysql -u root -p monkey < /data/dbbackup.sql
5. Now the database name monkey will be restored. And we can check the data present in all the tables.
No comments:
Post a Comment