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

Install Linux rhel7.3 operating system on virtual machine (specific steps)

Install virtualization software Before installing...

Example code for element multiple tables to achieve synchronous scrolling

Element UI implements multiple tables scrolling a...

A brief description of the relationship between k8s and Docker

Recently, the project uses kubernetes (hereinafte...

How to package the project into docker through idea

Many friends have always wanted to know how to ru...

How to use vue-video-player to achieve live broadcast

Table of contents 1. Install vue-video-player 2. ...

How to handle images in Vue forms

question: I have a form in Vue for uploading blog...

Tutorial on migrating mysql from phpstudy to Linux

Project Purpose Migrate the data in MySQL 5.5.53 ...

Detailed explanation of vue page state persistence

Table of contents Code: Replenish: Summarize Requ...

Windows Server 2019 Install (Graphical Tutorial)

Windows Server 2019 is the latest server operatin...

Simply learn various SQL joins

The SQL JOIN clause is used to join rows from two...

Web Design Tutorial (4): About Materials and Expressions

<br />Previous Web Design Tutorial: Web Desi...

How to make an input text box change length according to its content

First: Copy code The code is as follows: <input...

How to query data from multiple unrelated tables and paging in Mysql

Mysql multiple unrelated tables query data and pa...

docker-maven-plugin packages the image and uploads it to a private warehouse

Table of contents 1. Introduction to docker-maven...

Vue3+script setup+ts+Vite+Volar project

Table of contents Create a vue + ts project using...