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:

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 as well, thanks to the magic of sed: […]

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:

The problem is, what happens when you want to backup the permissions associated with these databases? Well, here are a few queries to help you out.

Then, re-loading the permissions onto the […]