Home > Database > Mysql Tutorial > MySql自动备份

MySql自动备份

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-07 15:46:32
Original
1060 people have browsed it

创建一个批处理文件。例:mysql_db_bakcup.bat 添加如下语句: @echo off c: cd C:\Program Files\MySQL\MySQL Server 5.5\bin set Ymd=%date:~,4%%date:~5,2%%date:~8,2% mysqldump --opt -u smoon --password=smoon smoon D:\db_backup\samoon_%Ymd%.sql @

创建一个批处理文件。例:mysql_db_bakcup.bat

添加如下语句:

@echo off


c:

cd C:\Program Files\MySQL\MySQL Server 5.5\bin
set "Ymd=%date:~,4%%date:~5,2%%date:~8,2%"
mysqldump --opt -u smoon --password=smoon smoon > D:\db_backup\samoon_%Ymd%.sql


@echo on


说明:1.我的MySql的安装位置是C:\Program Files\MySQL\MySQL Server 5.5,其他人根据安装目录自行修改。

     2.我的备份路径是D:\db_backup,其他人自行修改

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
Latest Issues
MySQL stops process
From 1970-01-01 08:00:00
0
0
0
Error when installing mysql on linux
From 1970-01-01 08:00:00
0
0
0
phpstudy cannot start mysql?
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template