Home  >  Article  >  Database  >  一键备份MySQL数据库_MySQL

一键备份MySQL数据库_MySQL

WBOY
WBOYOriginal
2016-06-01 13:52:211091browse

将如下代码另存为.bat文件

@echo off
echo.
echo      MySQL数据库备份

echo *****************************
echo.
echo 今天是 %date%
echo 时间是 %time%
echo.
echo *****************************


set "Ymd=%date:~,4%%date:~5,2%%date:~8,2%"

md "D:/%Ymd%"

"C:/Program Files/MySQL/MySQL Server 5.1/bin/mysqldump" --opt -Q -uroot -proot --default-character-set=gbk mysql > "D:/%Ymd%/mySQLteble.sql"

echo.

echo MySQL数据库备份完成,请进行检查。。。

echo.
echo.
pause 


 

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn