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

Bug #821711 reported by Daniel Nichter on 2011-08-05
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Percona Toolkit moved to

Bug Description

Imported from

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) on 2012-03-08
Changed in percona-toolkit:
status: New → Triaged
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 /'

Percona now uses JIRA for bug reports so this bug report is migrated to:

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

Other bug subscribers