We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 29138e0 commit 4e48ee5Copy full SHA for 4e48ee5
lib/puppet/provider/mysql_user/mysql.rb
@@ -235,7 +235,11 @@ def plugin=(string)
235
end
236
elsif newer_than('mysql' => '5.7.6', 'percona' => '5.7.6', 'mariadb' => '10.2.0')
237
sql = "ALTER USER #{merged_name} IDENTIFIED WITH '#{string}'"
238
- sql += " AS '#{@resource[:password_hash]}'" if string == 'mysql_native_password'
+ if string == 'mysql_native_password'
239
+ sql += " AS '#{@resource[:password_hash]}'"
240
+ elsif string == 'caching_sha2_password'
241
+ sql += " AS X'#{password_hash[2..-1]}'"
242
+ end
243
else
244
# See https://bugs.mysql.com/bug.php?id=67449
245
sql = "UPDATE mysql.user SET plugin = '#{string}'"
0 commit comments