Bug #51718 A good way to copy a user's permission doesn't exist
Submitted: 4 Mar 2010 12:05 Modified: 4 Mar 2010 15:14
Reporter: Tobias Asplund Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Security: Privileges Severity:S4 (Feature request)
Version:5.1.44 OS:Any
Assigned to: CPU Architecture:Any

[4 Mar 2010 12:05] Tobias Asplund
Description:
Since there is not a functionality for roles or groups, often you will end up having to copy privileges from existing users to new users.
Something like CREATE USER user@host LIKE user@host would be a great addition to this task.

How to repeat:
Feature request

Suggested fix:
CREATE USER ... LIKE ... IDENTIFIED BY '...'

Could just take the output from SHOW GRANTS FOR ... and replace the account and password and create the new user.
[4 Mar 2010 15:14] Valeriy Kravchuk
Thank you for the feature request.
[2 Dec 2014 20:32] Daniƫl van Eeden
There is a tool in MySQL Utilities which does this:
http://dev.mysql.com/doc/mysql-utilities/1.6/en/mysqluserclone.html