In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Let's learn about MySQL mysqldump and mysqlbinlog backup and restore tutorials, I believe you will benefit a lot after reading, the text in the essence is not much, hope that MySQL mysqldump and mysqlbinlog backup and restore tutorials this short content is what you want.
1. Use mysqlbinlog to make continuous backups of binary logs:
Mysqlbinlog-u root-p-R-host='localhost'-- raw-- stop-never mysql_bin.000001
two。 Use mysqldump to create dump files as snapshots of CVM data, and execute mysqldump commands periodically to create updated snapshots as needed:
Mysqldump-u root-p-- host='localhost'-B test-- events-- routines-- master-data=2 > test.sql
3. Insert data:
Insert into person (name) values ('Gao Yu'), ('Bruce Lee'), ('giant')
4. Simulated CVM crashes and test database data is lost
Stop continuously backing up log binaries and delete test libraries
Drop database test
5. Restore the data using the latest dump file:
Mysql-- host='localhost'-u root-p < test.sql
6. Use a binary log backup to re-execute events written after the coordinates listed in the dump file. Suppose the coordinates in the file are as follows:
Cat test.sql
Mysqlbinlog-- start-position=11125 mysql_bin.000001 | mysql-- host='localhost'-u root-p
View data: select * from peison
After reading this article on MySQL mysqldump and mysqlbinlog backup and restore tutorials, many readers will want to know more about it. For more industry information, you can follow our industry information section.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.