errors running pt-table-sync as non-root
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Toolkit moved to https://jira.percona.com/projects/PT |
Triaged
|
Undecided
|
Unassigned |
Bug Description
I am running into an issue that was mentioned at the end of http://
I am using pt-table-sync to sync 2 tables in a nightly cronjob and would prefer to run it as a non-root user. The 2 tables/databases are not using replication so I'm not concerned with the binary log in this particular scenario. When I run the following:
pt-table-sync --dry-run --execute h=localhost,
I receive the error:
---
DBD::mysql::db do failed: Access denied; you need (at least one of) the SUPER privilege(s) for this operation at /usr/bin/
Issuing rollback() for database handle being DESTROY'd without explicit disconnect().
---
To get around it, I commented out line 8676 in /usr/bin/
---
Access denied; you need (at least one of) the SUPER,REPLICATION CLIENT privilege(s) for this operation [for Statement "SHOW SLAVE STATUS"] at line 6165 while doing db2.table1 on localhost
---
I can get around that too by commenting out lines, but is there a better workaround or could something be built into pt-table-sync to support this use case?
This is not an issue of running as the root system user but an issue of the MySQL user not having the required privileges. The MySQL user used to run pt-table-sync needs pretty much all privs because it reads and writes (updates) data.
What privs does the MySQL user you're using have?