当前位置:网站首页>Automatic backup of MySQL database
Automatic backup of MySQL database
2022-06-28 03:39:00 【Bright in snow】
「 Blog move 」 New address : Simple books
MySQL In the database , It is useful to realize the function of automatic backup by day for specified tables .
1. Preconditions
- Installed correctly MySQL And it can start up and run automatically
- The MySQL Add the tool to the environment variable of the system .
2. Operation method
New batch file , The content is :
rem *******************************Code Start *****************************
@echo off
mysqldump -u " user name " --password=" password " " Database name " > " The absolute address of the saved file and the saved file name "
@echo on
rem ******************************* Code End *****************************
My configured .bat The content of the document is :
rem *******************************Code Start *****************************
@echo off
set "Ymd=%date:~,4%%date:~5,2%%date:~8,2%"
mysqldump -u root --password=lml manager > C:\MySQLBackup\manager_%Ymd%.sql
@echo on
rem ******************************* Code End *****************************
3. Put this .bat File is added to the system planning task
open “ Control panel ” -> “ Plan the task procedure ” -> “ Create basic tasks ”
You can set a fixed time every day to run this .bat file , It can realize automatic checking of MySQL Database backup
4. Reference material
边栏推荐
- 新手开哪家的证券账户是比较好?股票开户安全吗
- 文档问题
- Anaconda command usage
- composition api在项目中的使用总结
- 【PaddleDetection】ModuleNotFoundError: No module named ‘paddle‘
- Hot! Yolov6's fast and accurate target detection framework is open source (with source code download)
- Etcd database source code analysis -- network layer server rafthandler between clusters
- In the digital era, enterprises must do well in user information security
- Go speed
- STM32外设SDIO和SD卡的配置
猜你喜欢
随机推荐
嵌入式软件开发中必备软件工具
crond BAD FILE MODE /etc/cron.d
Anaconda command usage
What is the best and safest software to download when buying stocks?
新手开哪家的证券账户是比较好?炒股开户安全吗
composition api在项目中的使用总结
Idea auto generate code
mysql获取当前时间是一年的第多少天
WARN: SQL Error: …
数据库系列之MySQL中的执行计划
Is it better for a novice to open a securities account? Is it safe to open a stock trading account
在牛客中使用JS编程题【split】
Extensible database (I)
Tardigrade: Trino's solution to ETL scenarios
2022安全员-C证考试题库模拟考试平台操作
The same is MB. Why is the gap so large?
Scalable storage system (I)
Huawei equipment WLAN basic service configuration command
云应用、服务的“5层”架构
How to write concise code? (upper)