Restore single mysql DB

Restore individual mysql db

It is necessary to be very careful when you go to restore individual mysql DB. databases in mysql.

I present a case: you have a db on your personal development, or on your local network and you want to reproduce the production environment that you have online.

Dangerous recovery attention

We run a serious risk: If the backup contained a full dump of the db, done with the Dumping Data in SQL Format with mysqldump, and you do a restore “non-selective”, upon completion you will have restored all the db contained in the backup, including users, passwords and access permissions from various hosts.

Take conscience, could be dangerous.

To restore a single database catalog:
# mysql-u root-p[root_password] [database_name]< dumpfilename.sql

Better yet, open the file in an editor and select, reduce the dump, the only part that you want to restore.

backup, mysql, restore, SQL

Leave a Reply

Your email address will not be published. Required fields are marked *

For Inspirations, Special Offers and Much More

Via Scoglio grosso 28
05100 Terni, Italy
+39 3388383150
venturini@ict360.it

cf: VNTFNC73P11L117N
p.iva: 00723880555

© 2018 Francesco Venturini. All Rights Reserved