Copy MySQL User but change HostName
You have to call SHOW CREATE USER 'username'@'localhost' and SHOW GRANTS FOR 'username'@'localhost' for all the users fetched by 

SELECT user, host 
  FROM mysql.user
 WHERE host = 'localhost'


and to replace all 'localhost' entries by '%' in the returned statements.