I am using rename_database_with_user.sh script for moving a database from OLDUSER to NEWUSER.
For double checking, the OLDDAUSER_dbusername was used only for OLDDAUSER_dbname, so it didn't have any privileges for other databases.
I tried with different databases, the same result.
A bug in the script?
./rename_database_with_user.sh OLDDAUSER_dbname NEWDAUSER_dbname
Dumping+restoring OLDDAUSER_dbname -> NEWDAUSER_dbname...
Database has been renamed successfully: OLDDAUSER_dbname -> NEWDAUSER_dbname
Moving to a new user, granting new user/revoking old user permissions
'NEWDAUSER_dbusername'@'localhost' user does not exist. Creating...
'OLDDAUSER_dbusername'@'localhost' still has privileges for other databases. Not removing the user.
For double checking, the OLDDAUSER_dbusername was used only for OLDDAUSER_dbname, so it didn't have any privileges for other databases.
I tried with different databases, the same result.
A bug in the script?