In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
GTID is the global transaction ID (global transaction identifier), and GTID is actually made up of UUID+TID. Where UUID is the unique identity of an MySQL instance. TID represents the number of transactions that have been committed on this instance, and increases monotonously as the transaction commits, so GTID can guarantee the execution of each MySQL instance transaction (the same transaction will not be repeated and transactions that have not been executed will be completed). Here is a concrete form of GTID:
1) Construction of replication environment: omitting
Mysql > show variables like'% gtid%'
There is no difference between the construction of master-slave environment and 5.5. the only thing to note is that you need to enable these three parameters to enable GTID:
[mysqld]
# GTID
Gtid_mode = on
Enforce_gtid_consistency = 1
Log_slave_updates = 1
If any parameter is not enabled, an error will be reported:
Binlog-do-db=oa_icore_db # specify the library
Uuid of each instance:
Mysql > select @ @ server_uuid
Use the master-slave change before 5.6:
Mysql > change master to master_host='127.0.0.1',master_user='rep',master_password='rep',master_log_file='mysql-bin3306.000001',master_log_pos=151,/*master_auto_position=1*/
Error report:
ERROR 1776 (HY000): Parameters MASTER_LOG_FILE, MASTER_LOG_POS, RELAY_LOG_FILE and RELAY_LOG_POS cannot be set when MASTER_AUTO_POSITION is active.
The MASTER_LOG_FILE,MASTER_LOG_POS parameter cannot be used when using the MASTER_AUTO_POSITION parameter.
Use the master-slave change after 5.6:
Mysql > change master to master_host='127.0.0.1',master_user='rep',master_password='rep',master_port=3306,master_auto_position=1
Viewing status from the database
Mysql > show slave status\ G
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.