0

I have one Master and Slave

OS : MySQL5.6 & RHEL 7.0

Replication Status : Running Fine

Everything working fine and correctly I want to check that the data is correctly replicated between servers (Master to Slave) and with the help of mysqlrplsync, i execute this command

 mysqlrplsync --master=repuser:123@localhost:3306 \ --slaves=repuser:123@192.168.10.11:3306,repuser:123@localhost:3306

but this command show that error

[root@master common]# mysqlrplsync --master=root:pass@host1:3306 \ --slaves=rpl:pass@host2:3306
WARNING: Using a password on the command line interface can be insecure.
Usage: mysqlrplsync --master=user:pass@host:port --slaves=user:pass@host:port \
[<db_name>[.<tbl_name>]]
mysqlrplsync: error: Option --discover-slaves-login or --slaves is required.

Note : Even i have tried by adding the database name in the above command

My this method to check Data synchronization is correct ?

If not then can you please guide me how to perform Synchronization of Data Step by Step ?

Best Regards

Mubashar Iftikhar

1 Answers1

0

This isn't a tool I've used myself (I use pt-table-sync) however, you do say

I have one Master and Slave

but go on to have two definitions in --slave.

The definition,

repuser:123@localhost:3306

then appears for both the --master and --slave. The second one cannot be correct, at least the port number must be different.

Also, you should lose the "\".

Paul Campbell
  • 1,906
  • 2
  • 12
  • 19
  • Dear Paul I'm doing first time this task & i am stuck here from last 3 days. So can you please give me the complete idea how i can check/synchronize my database with the help of you mentioned above method ( pt-table-sync ) ? – Mubashar Iftikhar Apr 19 '18 at 05:01
  • or share with me the complete syntax of using pt-table-sync – Mubashar Iftikhar Apr 19 '18 at 06:23
  • after running this command " ./pt-table-checksum -u root -p123456 " its shows that error " Cannot connect to h=slave.mysql.local,p=...,u=root Diffs cannot be detected because no slaves were found " – Mubashar Iftikhar Apr 19 '18 at 07:31
  • is that utility must be installed at slave side ?? – Mubashar Iftikhar Apr 19 '18 at 07:34
  • With the exception of the points I made above, the syntax of your original request looked like it was in-line with the requirements of the tool. If that's still not working then I'd check that you've correctly specified the host username/password combinations for master and slave instances. The h=hostname definition you've just used is completely different to the one you used originally. I think you just need to sort out the specifics of the hosts and replication accounts and you'll be fine. Note that mysqlrplsync has the --discover-slaves-login option that will do half the job for you. – Paul Campbell Apr 19 '18 at 07:44
  • Well Thank you Can you please provide me complete syntax of command, Any information about my configuration I'll provide you as needed waiting for your response. – Mubashar Iftikhar Apr 19 '18 at 08:15
  • Sorry, I haven't got time to debug your setup. The syntax for these commands is available using the --help switch, e.g. mysqlrplsync --help or pt-table-sync --help. All the user, password, host and port config details you need will be in the file /var/lib/mysql/master.info. – Paul Campbell Apr 19 '18 at 09:11