Transferring grants from one mysql DB to another
An easier way is to use pt-show-grants.

On source server: 

$ pt-show-grants -uroot -p &gt; grants.sql


Destination server: 

$ mysql -uroot -p &lt; grants.sql
$ mysql -uroot -p -e "FLUSH PRIVILEGES;"