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

一键备份MySQL数据库_MySQL

WBOY
Release: 2016-06-01 13:52:21
Original
1148 people have browsed it

将如下代码另存为.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 


 

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template