You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Change grant provider to ignore grants for non existing users.
In the grant provider users are fetched by querying mysql.user table. Grants
for those users are fetched using show grants for... syntax. This can lead to
errors, when some of the users in mysql.user table do not have currently
active grants.
This happens at least when MySQL is started with --skip-name-resolve option,
when there are users with the hostname part specified as a FQDN. Such users are
created by mysql_install_db. This leads to problems if mysql::account_security
is included for the node and skip-name-resolve is specified in override_options
hash for mysql::server.
Includes acceptance test for the change.
expect(shell("mysql -NBe \"SHOW GRANTS FOR [email protected]\"",{:acceptable_exit_codes=>1}).stderr).tomatch(/There is no such grant defined for user 'test' on host 'fqdn.com'/)
366
+
end
367
+
it'finds ipv4'do
368
+
shell("mysql -NBe \"SHOW GRANTS FOR 'test'@'192.168.5.7'\"")do |r|
369
+
expect(r.stdout).tomatch(/GRANT ALL PRIVILEGES ON `test`.* TO 'test'@'192.168.5.7'/)
0 commit comments