This site is hosted and sponsored by hyve.com specialists in Cloud Hosting UK and VMware Hosting. If you are interested in our services please call us for chat on 0800 612 2524
Backup All MySQL Databases and Output To Seperate Files
Run this script from a bat file, update the paths as required.#
//--- Begin Batch File ---// :: Creates a backup of all databases in MySQL and puts them in seperate .sql files. :: By Jon Lucas. :: Name of the database user set dbuser=root :: Password for the database user set dbpass=xxxxx :: Switch to the data directory to enumerate the folders pushd "C:\Program Files\MySQL\MySQL Server 5.0\data" echo "hello" :: Loop through the data structure in the data dir to get the database names FOR /D %%F IN (*) DO ( "C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqldump.exe" --user=%dbuser% --password=%dbpass% --databases %%F > "C:\Program Files\MySQL\MySQL Server 5.0\backup\%%F.sql" )
Back to MySQL
Add new attachment
Only authorized users are allowed to upload new attachments.
«
This page (revision-1) was last changed on 09-Feb-2011 13:41 by Hyve Support