# pt-table-sync can't connect

**URL:** <https://forums.percona.com/t/pt-table-sync-cant-connect/3084>\
**Category:** Percona Toolkit\
**Created:** [November 13, 2013, 5:27pm UTC](https://forums.percona.com/t/pt-table-sync-cant-connect/3084 "2013-11-13T17:27:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cperisho](https://avatars.discourse-cdn.com/v4/letter/c/71c47a/32.png) [@cperisho](https://forums.percona.com/u/cperisho)\
**Post date:** [November 13, 2013, 5:27pm UTC](https://forums.percona.com/t/pt-table-sync-cant-connect/3084/1 "2013-11-13T17:27:50Z")

</div>

I have two mysql test servers set up; 10.10.51.2 and 10.10.51.3.  
They aren’t replicating or anything they are just regular old default mysql servers.  
I can connect to either of them from the first one by using

with ‘test’ being the database I want to connect to. This works for both 10.10.51.2 and 10.10.51.3 same password and everything.

I want to sync the ‘TEST’ table in the ‘test’ database using pt-table-sync. I type in the following which I think should work:

I get back:

DBI connect(‘test;host=10.10.51.3;mysql\_read\_default\_g roup=client’,‘root’,…) failed: Access denied for user ‘root’@‘10.10.51.2’ (using password: YES) at /bin/pt-table-sync line 2220

I feel like it has something to do with the login @ host combo but I’m unsure what to do about it.

edit: fixed P for port to cap.

---

<div class="post-metadata">

**Author:** ![cperisho](https://avatars.discourse-cdn.com/v4/letter/c/71c47a/32.png) [@cperisho](https://forums.percona.com/u/cperisho)\
**Post date:** [November 13, 2013, 6:53pm UTC](https://forums.percona.com/t/pt-table-sync-cant-connect/3084/2 "2013-11-13T18:53:44Z")

</div>

Never mind. There were some strange characters in my password that I wasn’t escaping properly. Still didn’t figure out how to escape a bang in a password, but changing the password to not include the ! fixed my issue…

Anybody know the proper way to escape a ! in a password?

---

<div class="post-metadata">

**Author:** ![mirfan](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/mirfan/32/16890_2.png) [@mirfan](https://forums.percona.com/u/mirfan)\
**Post date:** [November 14, 2013, 3:55pm UTC](https://forums.percona.com/t/pt-table-sync-cant-connect/3084/3 "2013-11-14T15:55:43Z")

</div>

Try single quotes around password and check if it works.  
Example:  
Password: !123

Try it with “!123”
