加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
backup_mysql_win.bat 787 Bytes
一键复制 编辑 原始数据 按行查看 历史
RForest 提交于 2020-11-04 12:05 . update backup_mysql_win.bat.
@echo off
rem ****MySQL Backup Start****
set "mysql_home=F:\mysql-5.7.28-winx64"
set "mysql_backup=D:\backup"
set "date_fmt=%date:~,4%%date:~5,2%%date:~8,2%"
set "datetime_fmt=%time:~0,2%%time:~3,2%%time:~6,2%"
set "database_name=n-jeecg-boot"
set "user=root"
set "password=123456"
set "host=127.0.0.1"
set "port=3307"
forfiles /p %mysql_backup% /m %database_name%_backup_*.sql -d -7 /c "cmd /c del /f @path"
"%mysql_home%\bin\mysqldump" --opt --single-transaction=TRUE --user=%user% --password=%password% --host=%host% --protocol=tcp --port=%port% --default-character-set=utf8 --hex-blob --routines --events %database_name% > "%mysql_backup%\%database_name%_backup_%date_fmt%_%datetime_fmt%.sql"
rem ****MySQL Backup End****
@echo on
pause
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化