I'm setting up up a new MySQL server and I'd like to give it the same set of usernames, allowed hosts, and passwords as an existing server (which is going away).
Would it work to just do a dump of the users table and then load it on the new server?
Is there a better way than that?
You can't use locks with log tables. Is there any work around for this? – Despertar Feb 06 '13 at 03:21mysqldump mysql user > mysql.sql– Minras Mar 18 '13 at 15:04unknown database flush privileges. What worked for me:mysqladmin reload. I suppose thatservice mysql reloadorrestartwould also do the job. – Feb 18 '15 at 18:41SHOW GRANTS FOR ...to extract the current privieges and then GRANT them on the new host. – caponica Mar 27 '16 at 10:40