pt-show-grants ignore switch not working

Bug #1459431 reported by Franck
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Percona Toolkit moved to https://jira.percona.com/projects/PT
Confirmed
Undecided
Unassigned

Bug Description

[ ]$ pt-show-grants --ignore ganglia,truec -h xxxx.xxx.com

-- Grants for 'ganglia'@'localhost'
GRANT PROCESS, SUPER ON *.* TO 'ganglia'@'localhost' IDENTIFIED BY PASSWORD 'xxx'

-- Grants for 'truec'@'10.%'
GRANT USAGE ON *.* TO 'truec'@'10.%' IDENTIFIED BY PASSWORD 'xxx'
GRANT ALL PRIVILEGES ON `truecardev1`.* TO 'truec'@'10.%';

Revision history for this message
Franck (fleveneur-l) wrote :

pt-show-grants --ignore switch does not work, --only switch does !

Revision history for this message
Nilnandan Joshi (nilnandan-joshi) wrote :

Confirmed with 2.2.14

nilnandan@desktop:~$ pt-show-grants --version
pt-show-grants 2.2.14
nilnandan@desktop:~$

nilnandan@desktop:~$ pt-show-grants --ignore root -hlocalhost,u=root,p=root
-- Grants dumped by pt-show-grants
-- Dumped from server Localhost via UNIX socket, MySQL 5.6.24-72.2-log at 2015-06-01 15:07:12
-- Grants for 'debian-sys-maint'@'localhost'
GRANT ALL PRIVILEGES ON *.* TO 'debian-sys-maint'@'localhost' IDENTIFIED BY PASSWORD '*3568A19E0FBD049FCEE24502A2B5BBC7AAFDFA1D' WITH GRANT OPTION;
-- Grants for 'root'@'127.0.0.1'
GRANT ALL PRIVILEGES ON *.* TO 'root'@'127.0.0.1' IDENTIFIED BY PASSWORD '*81F5E21E35407D884A6CD4A731AEBFB6AF209E1B' WITH GRANT OPTION;
-- Grants for 'root'@'::1'
GRANT ALL PRIVILEGES ON *.* TO 'root'@'::1' IDENTIFIED BY PASSWORD '*81F5E21E35407D884A6CD4A731AEBFB6AF209E1B' WITH GRANT OPTION;
-- Grants for 'root'@'desktop'
GRANT ALL PRIVILEGES ON *.* TO 'root'@'desktop' IDENTIFIED BY PASSWORD '*81F5E21E35407D884A6CD4A731AEBFB6AF209E1B' WITH GRANT OPTION;
GRANT PROXY ON ''@'' TO 'root'@'desktop' WITH GRANT OPTION;
-- Grants for 'root'@'localhost'
GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY PASSWORD '*81F5E21E35407D884A6CD4A731AEBFB6AF209E1B' WITH GRANT OPTION;
GRANT PROXY ON ''@'' TO 'root'@'localhost' WITH GRANT OPTION;
nilnandan@desktop:~$

Changed in percona-toolkit:
status: New → Confirmed
Revision history for this message
Josh Watts (josh-sroz) wrote :

This appears to be a deficiency in the documentation: The --ignore option appears to only work on fully specified users:

pt-show-grants --ignore root@localhost,user@host

Counter to this, the --only argument accepts both username and username@hostname formats.

pt-show-grants --only root,user@host

Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PT-1284

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.