MySQL Forums
Forum List  »  Replication

how to tell if the GTID is working fine
Posted by: Adhika Widjaya
Date: February 27, 2014 10:19AM

Hi everyone,

I'm currently setting up a GTID replication on my test VMs.
here is my conf related to the GTID.

my hostnames and IP addresses:
mysql56-1.wrx4.vm 192.168.1.103
mysql56-2.wrx4.vm 192.168.1.104


my.cnf in mysql56-1
-------------------
binlog-format=ROW
log-slave-updates=true
gtid-mode=on
enforce-gtid-consistency=true
master-info-repository=TABLE
relay-log-info-repository=TABLE
sync-master-info=1
slave-parallel-workers=2
binlog-checksum=CRC32
master-verify-checksum=1
slave-sql-verify-checksum=1
binlog-rows-query-log_events=1
server-id=1
report-port=3306
port=3306
log-bin=mysql56-1-bin.log
report-host=mysql56-1.wrx4.vm


my.cnf in mysql56-2
-------------------
binlog-format=ROW
log-slave-updates=true
gtid-mode=on
enforce-gtid-consistency=true
master-info-repository=TABLE
relay-log-info-repository=TABLE
sync-master-info=1
slave-parallel-workers=2
binlog-checksum=CRC32
master-verify-checksum=1
slave-sql-verify-checksum=1
binlog-rows-query-log_events=1
server-id=2
report-port=3306
port=3306
log-bin=mysql56-2-bin.log
report-host=mysql56-2.wrx4.vm



then the next step was to start the replication:
mysqlreplicate --master=root:'password'@192.168.1.103:3306 --slave=root:'password'@192.168.1.104:3306


mysqlrplshow --master=root:'password'@192.168.1.103 --discover-slaves-login=root:'password'
# master on 192.168.1.103: ... connected.
# Finding slaves for master: 192.168.1.103:3306

# Replication Topology Graph
192.168.1.103:3306 (MASTER)
|
+--- mysql56-2.wrx4.vm:3306 - (SLAVE)



however, why does the mysqlfailover command does not show my slave?

mysqlfailover --master=root:'password'@192.168.1.103 --discover-slaves-login=root:'password'@192.168.1.104 --rediscover

WARNING: There are slaves that had connection errors.
# Checking privileges.
# Discovering slaves for master at 192.168.1.103:3306
Error connecting to a slave as root@mysql56-2.wrx4.vm: Cannot connect to the slave server.
Error Access denied for user 'root'@'mysql56-2.wrx4.vm' (using password: YES)

WARNING: There are slaves that had connection errors.

MySQL Replication Failover Utility
Failover Mode = auto Next Interval = Fri Feb 28 00:16:32 2014

Master Information
------------------
Binary Log File Position Binlog_Do_DB Binlog_Ignore_DB
mysql56-1-bin.000001 299

GTID Executed Set
dabf96c7-454d-11e3-86c8-080027ce8198:1

Replication Health Status
+----------------+-------+---------+--------+------------+---------+
| host | port | role | state | gtid_mode | health |
+----------------+-------+---------+--------+------------+---------+
| 192.168.1.103 | 3306 | MASTER | UP | ON | OK |
+----------------+-------+---------+--------+------------+---------+




I can login with that password to the mysql56-2.

$ mysql -u root -ppassword -h mysql56-2.wrx4.vm
Warning: Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 31
Server version: 5.6.14-enterprise-commercial-advanced-log MySQL Enterprise Server - Advanced Edition (Commercial)

Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>





Please help me solving this issue.

Thank you,
Adhika

Options: ReplyQuote


Subject
Views
Written By
Posted
how to tell if the GTID is working fine
2292
February 27, 2014 10:19AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.