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

Summary of MySQL5 green version installation under Windows (recommended)

1 Download MySQL Download address: http://downloa...

Detailed explanation of creating and calling MySQL stored procedures

Table of contents Preface Stored Procedure: 1. Cr...

HTML form tag tutorial (5): text field tag

<br />This tag is used to create a multi-lin...

Use Grafana+Prometheus to monitor MySQL service performance

Prometheus (also called Prometheus) official webs...

React event binding details

Table of contents Class component event binding F...

CentOS 6-7 yum installation method of PHP (recommended)

1. Check the currently installed PHP packages yum...

Basic use of subqueries in MySQL

Table of contents 1. Subquery definition 2. Subqu...

Simple implementation method of Linux process monitoring and automatic restart

Purpose: Under Linux, the server program may be d...

Linux Operation and Maintenance Basic System Disk Management Tutorial

1. Disk partition: 2. fdisk partition If the disk...

MySQL 5.7 mysql command line client usage command details

MySQL 5.7 MySQL command line client using command...

How to view the IP address of the Docker container

I always thought that Docker had no IP address. I...

Practice of implementing custom search bar and clearing search events in avue

Table of contents 1. Customize the search bar con...