pt-show-grants doesn't work with NO_AUTO_CREATE_USER sql_mode

Bug #821711 reported by Daniel Nichter
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Percona Toolkit moved to https://jira.percona.com/projects/PT
Triaged
Low
Unassigned

Bug Description

Imported from http://code.google.com/p/maatkit/issues/detail?id=1203

Quoting the original:

A grant will implicitly create a user. This is what mk-show-grants uses.

mk-show-grants is used a lot to copy permissions from one server to oneother.

This however stops working if you set the NO_AUTO_CREATE_USER sql_mode.

This could be a solution:
Create a '--show-create-user' switch which will show the required 'CREATE USER 'user'@'host' IDENTIFIED BY...'

Changed in percona-toolkit:
importance: Undecided → Low
Brian Fraser (fraserbn)
Changed in percona-toolkit:
status: New → Triaged
Revision history for this message
Michael Wang (xw73) wrote :

A temporary solution is this:

/usr/bin/pt-show-grants --ask-pass | perl -pe 's/^GRANT USAGE ON \*\.\* TO /CREATE USER /'

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-750

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.