Extracting a Database From a mysqldump File

Restoring a single database from a full dump is pretty easy, using the mysql command line client’s –one-database option: mysql> mysql -u root -p –one-database db_to_restore < fulldump.sql But what if you don’t want to restore the database, you just want to extract it out of the dump file? Well, that happens to be easy […]

Backing up permissions for individual databases

Sometimes, you want to backup individual databases in MySQL to move to a different server. This part is easy using mysqldump: shell> mysqldump -u root -p –databases db1 db2 … > backup.sql The problem is, what happens when you want to backup the permissions associated with these databases? Well, here are a few queries to […]