Skip to content

Commit 099de10

Browse files
committed
Specify root_plugin for root user in mysql
1 parent 183415e commit 099de10

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

manifests/server.pp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@
5656
# `create_root_my_cnf` are assumed to be false --- that is, the MySQL root user and `/root/.my.cnf` are not created.
5757
# Password changes are supported; however, the old password must be set in `/root/.my.cnf`. Effectively, Puppet uses the old
5858
# password, configured in `/root/my.cnf`, to set the new password in MySQL, and then updates `/root/.my.cnf` with the new password.
59+
# @param root_plugin
60+
# Specifies which plugin the root user should use. Defaults to 'mysql_native_password'.
5961
# @param service_enabled
6062
# Specifies whether the service should be enabled. Valid values are `true`, `false`. Defaults to `true`.
6163
# @param service_manage
@@ -114,6 +116,7 @@
114116
Optional[String[1]] $mycnf_owner = undef,
115117
Optional[String[1]] $mycnf_group = undef,
116118
Variant[String, Sensitive[String]] $root_password = 'UNSET',
119+
String[1] $root_plugin = 'mysql_native_password',
117120
Variant[Boolean, String[1]] $service_enabled = true,
118121
Variant[Boolean, String[1]] $service_manage = true,
119122
String[1] $service_name = $mysql::params::server_service_name,

manifests/server/root_password.pp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
mysql_user { 'root@localhost':
3434
ensure => present,
3535
password_hash => Deferred('mysql::password', [$mysql::server::root_password]),
36+
plugin => $mysql::server::root_plugin,
3637
require => Exec['remove install pass'],
3738
}
3839
}

0 commit comments

Comments
 (0)