当前位置:网站首页>Scheduled backup of MySQL database under Windows system
Scheduled backup of MySQL database under Windows system
2022-07-28 20:24:00 【Code slave was born to know only to move forward~】
Catalog
2、 Create timed task execution
2.3 Fill in the trigger and task execution time
We all know that data is priceless , If the data is not backed up , It's like letting data run naked , Once the server goes wrong , Only cry . The following is an introduction to mysql Automatic backup of database , You can choose where to store the backup data according to the situation .
1、 Create script
Create a new one txt file , Then change the suffix to bat, The name is backupDB.bat
@echo off
set h=%time:~0,2%
set h=%h: =0%
set hhmiss=%date:~0,4%%date:~5,2%%date:~8,2%%h%%time:~3,2%%time:~6,2%
set "folder=%date:~0,4%%date:~5,2%%date:~8,2%"
:: Automatically create the current day folder (dbBack This folder needs to be created by yourself )
if not exist D:\dbBack\%folder% (md D:\dbBack\%folder%)
::(mysql route )\bin\mysqldump --opt -u Database account -p Database password Database name > Output address
C:\"Program Files"\MySQL\"MySQL Server 5.7"\bin\mysqldump --opt -uroot -proot tqf_test > D:\dbBack\%folder%\tqf_test_%hhmiss%.sql
@echo on
:: The formal operating environment pause Get rid of , Otherwise cmd The black window will remain
::pauseThe actual situation of the storage path , You can double-click directly bat File run , You can see that the database is backed up to the file of the day
2、 Create timed task execution
2.1 Enter computer management

2.2 Create tasks
2.3 Fill in the trigger and task execution time

2.4 Add execution script file

边栏推荐
- [C language] function
- Const pointer of C language and parameter passing of main function
- C language - pointer
- Solve the brick stacking problem (DP)
- Raspberry pie CM4 -- using metartc3.0 to integrate ffmpeg to realize webrtc push-pull streaming
- 9. Pointer of C language (3) classic program, exchange the value of two numbers for deep analysis, (easy to understand), are formal parameters and arguments a variable?
- 跨区域网络的通信学习静态路由
- Maximum exchange [greedy thought & monotonic stack implementation]
- 9. Pointer of C language (2) wild pointer, what is wild pointer, and the disadvantages of wild pointer
- Common commands of raspberry pie
猜你喜欢

Array out of bounds

Communication learning static routing across regional networks

The privatized instant messaging platform protects the security of enterprise mobile business
![[C language] header file of complex number four operations and complex number operations](/img/f9/b389fe5367f1fa6cd18aaac856bc0d.png)
[C language] header file of complex number four operations and complex number operations
![[C language] advanced pointer exercise 1](/img/ee/c62919330edb4a0b5a2a4b027e5b5c.png)
[C language] advanced pointer exercise 1

跨区域网络的通信学习静态路由
![[C language] simulation implementation of strlen (recursive and non recursive)](/img/73/e92fe714515491f1ea366d6924c9ec.png)
[C language] simulation implementation of strlen (recursive and non recursive)

ssm中项目异常处理
![[C language] guessing numbers game](/img/ac/81a82404618487861b67e35f18d13f.png)
[C language] guessing numbers game
![[C language] function](/img/81/c185e2bb5eccc13433483f9558f52a.png)
[C language] function
随机推荐
DSACTF7月re
C language data 3 (2)
[C language] guessing numbers game
NEIL: Extracting Visual Knowledge from Web Data
Pytorch model parameter assignment - tensor.copy_ () method
[C language] Fibonacci sequence [recursion and iteration]
MySQL startup error 1607 unexpected process termination
Implementation of strcat in C language
数据挖掘(数据预处理篇)--笔记
Implementation of strstr in C language
C语言数据 3(1)
Find the memory occupied by the structure
有哪个老哥知道flinksql 日志很大要怎么解决吗
Circular linked list OJ question
GRU神经网络
七种轮询介绍(后附实践链接)
[C language] Pointer elementary knowledge points
flask_ Mail source code error
robobrowser的简单使用
C language - pointer
