Uploaded image for project: 'Percona Toolkit'
  1. Percona Toolkit
  2. PT-958

LP #982381: errors running pt-table-sync as non-root



      **Reported in Launchpad by Ryan Brothers last update 29-11-2014 21:59:31

      I am running into an issue that was mentioned at the end of http://code.google.com/p/maatkit/issues/detail?id=95.

      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,P=3306,u=test,p=test,D=db1,t=table1 D=db2

      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/pt-table-sync line 8676.
      Issuing rollback() for database handle being DESTROY'd without explicit disconnect().

      To get around it, I commented out line 8676 in /usr/bin/pt-table-sync, but then I get a 2nd error:

      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?

        Smart Checklist


            Issue Links



                • Assignee:
                  carlos.salguero Carlos Salguero
                  lpjirasync lpjirasync (Inactive)
                • Votes:
                  0 Vote for this issue
                  7 Start watching this issue


                  • Created: