Manual and scheduled backup steps for MySQL database

Manual and scheduled backup steps for MySQL database

Manual backup

1) cmd console: mysqldump -uroot -proot database name [table name 1, table name 2...] > file path

For example: back up the demo database to E:\test\demo.bak

mysqldump -uroot -p123456 demo > E:\test\demo.bak #123456 is the database password

If you want to back up the test1 table of the demo library

mysqldump -uroot -p123456 demo test1 > E:\test\demo.test1.bak

How to restore our data using the backup file mysql console?

2) MySQL console: source E:\test\demo.test1.bak

3) Specific operation screenshots:

insert image description here

insert image description here

insert image description here

Timer backup

1) Write the command to back up the database into the bat file

Create a mytask.txt file and insert the following content: F:\MySQL\bin\mysqldump -uroot -p123456 demo test1 > E:\test\demo.test.bak , then change the suffix to .bat

Note: The content of mytask.bat is "F:MySQL\bin" (for your own MySQL bin directory)

If your mysqldump.exe file path has spaces, be sure to use " " include

2) Then use the task manager to call the bat file regularly, make mytask.bat a task, and call it regularly

Steps: Control Panel>Task Schedule>Create Basic Task

insert image description here

insert image description here

insert image description here

insert image description here

insert image description here

insert image description here

insert image description here

insert image description here

The above is the details of the manual and scheduled backup techniques of MySQL database. For more information about manual and scheduled backup of database, please pay attention to other related articles on 123WORDPRESS.COM!

You may also be interested in:
  • Tensorflow implements AlexNet convolutional neural network and computing time evaluation
  • Tensorflow deep learning uses CNN to classify English text
  • Saving and reading Python deep learning TensorFlow neural network model
  • TensorFlow deep learning another programming style to implement convolutional neural network
  • TensorFlow tutorial Softmax logistic regression to recognize handwritten digits MNIST dataset
  • Detailed explanation of TensorFlow convolutional neural network AlexNet implementation example

<<:  Pitfall notes of vuex and pinia in vue3

>>:  CSS3 realizes the animation effect of lotus blooming

Recommend

Detailed explanation of Linux one-line command to process batch files

Preface The best method may not be the one you ca...

Some summary of MySQL's fuzzy query like

1. Common usage: (1) Use with % % represents a wi...

Implementing access control and connection restriction based on Nginx

Preface Nginx 's built-in module supports lim...

How to configure VMware multi-node environment

This tutorial uses CentOS 7 64-bit. Allocate 2GB ...

Vue keeps the user logged in (various token storage methods)

Table of contents How to set cookies Disadvantage...

js to achieve interesting countdown effect

js interesting countdown case, for your reference...

mysql creates root users and ordinary users and modify and delete functions

Method 1: Use the SET PASSWORD command mysql -u r...

Summary of commonly used operators and functions in MySQL

Let’s build the data table first. use test; creat...

How to clear the cache after using keep-alive in vue

What is keepalive? In normal development, some co...

MYSQL Left Join optimization (10 seconds to 20 milliseconds)

Table of contents 【Function Background】 [Raw SQL]...

Specific use of CSS front-end page rendering optimization attribute will-change

Preface When scroll events such as scroll and res...

Vue SPA first screen optimization solution

Table of contents Preface optimization SSR Import...

Summary of the dockerfile-maven-plugin usage guide

Table of contents pom configuration Setting.xml c...