Add default database "mysql" to mysql_user

Since permissions are stored in the "mysql" database anyway this should not change the behaviour of the module. But replication / binlog filters which rely on the current database will be able to filter the statements correctly afterwards. Prior to this change they were not executed in any database context and could not be filtered in any way by the existing methods in MySQL.
This commit is contained in:
Daniel Rupp 2021-12-22 17:22:40 +01:00 committed by GitHub
commit 4b9d56f49a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -365,7 +365,7 @@ def main():
ssl_key = module.params["client_key"]
ssl_ca = module.params["ca_cert"]
check_hostname = module.params["check_hostname"]
db = ''
db = 'mysql'
sql_log_bin = module.params["sql_log_bin"]
plugin = module.params["plugin"]
plugin_hash_string = module.params["plugin_hash_string"]