In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly tells you how to restore drop table db1.tb1 caused by misoperation of MySQL5.7. You can check the relevant professional terms on the Internet or find some related books to supplement them. We will not dabble here, so let's go straight to the topic. I hope this article on how to restore drop table db1.tb1 caused by misoperation of MySQL5.7 can bring you some practical help.
0. Stop writing business data. [ban on iptables]
1. Pull the latest complete file from the backup CVM, restore it to a temporary CVM, decompress and start mysqld.
2. Execute the following command on this new slave:
2.1 configure the replication relationship and change master to to the current misoperated CVM, but do not start the replication process. [similar to the following command]
> CHANGE MASTER TO MASTER_HOST='172.16.20.73',MASTER_USER='rpl',MASTER_PASSWORD='rpl',master_log_file='master-bin.000005',master_log_pos=245
2.2 perform replication filtering on the new slave:
> CHANGE REPLICATION FILTER REPLICATE_WILD_DO_TABLE = ('db1.tb1')
2.3 enable slave replication and stop before the problem occurs
> start slave io_thread; > start slave sql_thread until master_LOG_FILE='mysql-bin.000010',master_LOG_POS=10020;-- the displacement point that is executed to the last time there is no problem
2.4 Skip this misoperated transaction on slave
> set GTID_NEXT='56bc2f04-7556-11e8-b3b6-000c29ba98ceambigu1492';-- this is the transaction that should be skipped (the gtid number can be found in the binlog of the main database)
> begin
> commit
> set GTID_NEXT= "AUTOMATIC"
> start slave
> show slave status\ G to view replication
2.4.Exporting the db1.tb1 from the library through mysqldump, and then pouring it into the instance of online misoperation. [for large tables, you can back up a single table with xtrabackup, and then pour import into the tablespace to complete the data inversion]
MySQL5.7 misoperation led to the emergence of drop table db1.tb1 recovery first to tell you here, for other related issues you want to know can continue to pay attention to our industry information. Our section will capture some industry news and professional knowledge to share with you every day.
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.