# pt-table-sync error The server specified as a master has no connected slaves

**URL:** <https://forums.percona.com/t/pt-table-sync-error-the-server-specified-as-a-master-has-no-connected-slaves/2874>\
**Category:** Percona Toolkit\
**Created:** [August 12, 2013, 1:36pm UTC](https://forums.percona.com/t/pt-table-sync-error-the-server-specified-as-a-master-has-no-connected-slaves/2874 "2013-08-12T13:36:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dokhebi](https://avatars.discourse-cdn.com/v4/letter/d/97f17d/32.png) [@dokhebi](https://forums.percona.com/u/dokhebi)\
**Post date:** [August 12, 2013, 1:36pm UTC](https://forums.percona.com/t/pt-table-sync-error-the-server-specified-as-a-master-has-no-connected-slaves/2874/1 "2013-08-12T13:36:59Z")

</div>

I have four MySQL databases in a sandbox for testing set up as follows:

M → S1  
M → S2  
S1 → S3

(Master localhost:5999 , Slave1 localhost:5998, Slave2 localhost:5997, Slave3 localhost:5996)

I deleted 1,000 rows from a table in Slave3 so I can test pt-table-sync to restore the rows from Slave1. I execute the command as follows:

```auto
pt-table-sync --execute --sync-to-master localhost --port=5996 --user=<username> --ask-pass --socket=/tmp/mysql_sandbox5996.sock --verbose

```

But I get the error message

> [@](#):
>
> The server specified as a master has no connected slaves at /usr/local/bin/pt-table-sync line 6213, line 1.

Reading the documentation it looks like if I use --sync-to-master then I specify the slave connection information. I tried it by specifying the master information with the options and the slave as a DSN and it doesn’t look at the slave at all.

Is there a way to explicitly declare --master= --slave= and still have it ask for the password?

Thanks in advance,

Edward Hooper

---

<div class="post-metadata">

**Author:** ![dim0](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/dim0/32/950_2.png) [@dim0](https://forums.percona.com/u/dim0)\
**Post date:** [August 13, 2013, 6:42am UTC](https://forums.percona.com/t/pt-table-sync-error-the-server-specified-as-a-master-has-no-connected-slaves/2874/2 "2013-08-13T06:42:57Z")

</div>

Hi Edward,

I tried replicating your issue to no avail for the moment. What version are you currently using of the percona toolkit. Could you give me the full output of the command? Does the user in place have the right to the see the replication status (replication\_client)?

---

<div class="post-metadata">

**Author:** ![dokhebi](https://avatars.discourse-cdn.com/v4/letter/d/97f17d/32.png) [@dokhebi](https://forums.percona.com/u/dokhebi)\
**Post date:** [August 13, 2013, 3:56pm UTC](https://forums.percona.com/t/pt-table-sync-error-the-server-specified-as-a-master-has-no-connected-slaves/2874/3 "2013-08-13T15:56:01Z")

</div>

It couldn’t connect to the other host because Perl::DBI needs the socket when the hostname is localhost. I only knew how to pass the socket for one of the connections and not both so it defaulted to /var/lib/mysql/mysql.sock (or what ever the default is) and it doesn’t exist.

When I started using the actual hostname of the server for the connection information the problem went away. But I had to set the hostname everywhere to make it work.

If there are any devs reading, I’d like to request an update to the tools with the following options:

–master-socket=  
–slave-socket=[, …]
