I have the following grants for a user/database
mysql> SHOW GRANTS FOR 'username'@'localhost'; +---------------------------------------------------------------------------+ | Grants for username@localhost | +---------------------------------------------------------------------------+ | GRANT USAGE ON *.* TO 'username'@'localhost' IDENTIFIED BY PASSWORD 'xxx' | | GRANT ALL PRIVILEGES ON `userdb`.* TO 'username'@'localhost' | +---------------------------------------------------------------------------+ To enable external access to the database, I need to change localhost to %. One way to do this is REVOKE all permissions and set it again. The problem is, that there is a password set which I don't know, so if I revoke the permission, I can't set it back.
Is there a way to change the hostname localhost to % (and back again) without revoking the permission itself?