248497 CRC32 0xc9775906 GTID [commit=yes] SET @@SESSION.GTID_NEXT= '8b4227e8-b841-11e6-845c-448a5bf50581:269'/*!*/; # at 248497 #161202 14:46:59 server id 2759935033 end_log_pos 248590 CRC32 0x0892442a Query thread_id=179 exec_time=0 error_code=0 SET TIMESTAMP=1480657619/*!*/; BEGIN /*!*/; # at 248590 #161202 14:46:59 server id 2759935033 end_log_pos 248740 CRC32 0x83437cc8 Query thread_id=179 exec_time=0 error_code=0 SET TIMESTAMP=1480657619/*!*/; insert into tbl(col1) values ('Fri Dec 2 14:46:59 2016') /*!*/; # at 248740 #161202 14:46:59 server id 2759935033 end_log_pos 248771 CRC32 0x132b63f8 Xid = 1051 COMMIT/*!*/; 25
Master Master Master Master Master Master Master Master UPDATE t SET col = ‘B’ WHERE pk = 2 UPDATE t SET col = ‘B’ WHERE pk = 2 UPDATE t SET col = ‘A’ WHERE pk = 1 UPDATE t SET col = ‘A’ WHERE pk = 1
$ sudo yum install –y mysql-community-server.x86_64 mysql-shell $ sudo systemctl start mysqld $ vi /var/log/mysqld.log 2017-06-05T10:08:43.656338Z 1 [Note] A temporary password is generated for root@localhost: zEKw>tScc74o $ mysql –uroot –p Paasword: <初期パスワード> mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'Your_passw0rd';
mysqlsh –uroot –p --py mysql-py> dba.configure_local_instance() Please provide the password for 'root@localhost:3306': The configuration has been updated but it is required to restart the server. { "config_errors": [ { "action": "restart", "current": "OFF", "option": "enforce_gtid_consistency", "required": "ON“ mysql-py> <Ctrl-D>
password for 'root@gr01:3306': mysql-py> cluster = dba.create_cluster('devCluster'); A new InnoDB cluster will be created on instance 'root@gr01:3306'. Creating InnoDB cluster 'devCluster' on 'root@gr01:3306'... Adding Seed Instance... Cluster successfully created. Use Cluster.add_instance() to add MySQL instances. At least 3 instances are needed for the cluster to be able to withstand up to one server failure. <Cluster:devCluster>
を実行する 74 mysql-py> shell.connect('root@gr01:3306'); mysql-py> cluster = dba.get_cluster(); mysql-py> cluster.add_instance('root@ gr02:3306') A new instance will be added to the InnoDB cluster. Depending on the amount of data on the cluster this might take from a few seconds to several hours. Please provide the password for 'root@gr02:3306': Adding instance to the cluster ... The instance 'root@gr02:3306' was successfully added to the cluster.
• GTID + ROW ベースレプリケーション • トランザクション分離レベルはREAD-COMMITED • 複数の同じテーブルに対するDDLとDMLはサポート外 77 ERROR 3098 (HY000): The table does not comply with the requirements by an external plugin