Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to back up Mysql database manually and regularly

2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article is about how Mysql databases are backed up manually and regularly. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

Manual backup

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

For example, backup 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 do I use backup files to restore our data mysql console?

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

3) Screenshot of specific operation:

Timer backup

1) write the instructions for backing up the database to the bat file

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

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

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

2) then call the bat file regularly through the task manager, make mytask.bat into a task, and call it once a time

Step: control panel "Task schedule" to create basic tasks

Thank you for reading! This is the end of the article on "how to back up Mysql database manually and regularly". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it out for more people to see!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report