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 24-May-2017 15:30 by Hyve Support
G’day (anonymous guest) My Prefs
  • View Page Source
  • This clear IPSec security association,
    clear ipsec sa peer X.X.X.X
    

All Pages

Page views: 2138

Private Tomcat

Linux

MySQL

Email

SQL Server

ASP

JSP

C#

Web Mail

Windows Plesk

Linux Plesk

PHP

Gaming

ASP.NET

Persits ASPUpload

Wiki Help

Referring Pages:
...nobody

JSPWiki v2.8.1