I have several thousand MySQL users all set to allow access from a specific host. The problem is that now I'm going to have two machines (more in the future) which will need to use the same account to access each of their databases.
I'd like to a quick and easy (as automated as possible) way to run through and modify the host portion of each user account to fit an internal network wildcard. For example:
'bugsy'@'internalfoo' has access to the 'bugy' DB.
I want to now allow bugsy access from anywhere on the internal network
'bugsy'@'10.0.0.%' has access to the 'bugsy' DB.
I tried to cheat and use phpmyadmin for one, copy the syntax, rinse repeat for the other several thousand users, but the phpmyadmin way of doing it seems overly complicated. It creates a new user with the same permissions (different host access) and then deletes the old one. This would require me to know what every users password is, which isn't a realistic option for me at this time. I'd simply like to modify the existing users host access.
If anyone has any tips, I'd be very appreciative! :) -Nick