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

Reported by Daniel Nichter on 2011-08-05
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Percona Toolkit
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) 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 /'

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

Other bug subscribers