2

I have a small shared windows server on which i'have installed MySQL 5.1 engine for hosting my user's mysql databases.

I backup the complete MySQL databases each day by running this script as batch file in SCHEDULED TASKS:

"C:\Program Files\MySQL\MySQL Server 5.1\bin\mysqldump.exe" -uroot -p"**********" --force --flush-logs --all-databases > c:\dbbackup\alldatabases.sql

So alldatabases.sql will be a SQL file which contains the complete data of MySQL server which can be restored on cases that all of the databases are lost or migrating to another server.

I have never extracted one specific mysql database from this "alldatabases.sql" backup file and i don't have any clue on this.

**The must idiot solution is to restore this big backup file in another server and then simply create an individual backup from a specific database.

Could you help me on extracting one specific MySQL database from this big backup file? Lets say that MySQL database name is JOOMLAdb

** Also do you have any idea on changing my backup script, so instead of having a big backup file i may have individual backups for each database (Databases will increase/decrease through the time and we don't have a fix list of available databases) Thank you for your care

Best Regards

0

Your same question seems to be answered here:

https://stackoverflow.com/questions/2342356/import-single-database-from-all-databases-dump

And as far as an improved backup script, here's what I'm currently using for several years and it rocks:

http://sourceforge.net/projects/automysqlbackup/

-1

Idiot solution 1 Restore entire database(s) on some temporary machine, then dump on the single database.
Be sure to test the single database restores properly, can be issues with host/user permissions.

Solution 2, I just wrote a script that does the single database dump restore. It fairly simple to do. I would send you the code but i wrote it centos which most likely will not work on your windows.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.