Implement character_set. You can change the default server and
client character set
This commit is contained in:
parent
8000041e9f
commit
e3b6de2da2
2 changed files with 14 additions and 5 deletions
|
@ -19,6 +19,8 @@
|
|||
# [*default_engine] - configure a default table engine
|
||||
# [*root_group] - use specified group for root-owned files
|
||||
# [*restart] - whether to restart mysqld (true/false)
|
||||
# [*character-set] - You can change the default server and
|
||||
# client character set
|
||||
#
|
||||
# Actions:
|
||||
#
|
||||
|
@ -52,15 +54,16 @@ class mysql::config(
|
|||
$default_engine = 'UNSET',
|
||||
$root_group = $mysql::params::root_group,
|
||||
$restart = $mysql::params::restart,
|
||||
$purge_conf_dir = false
|
||||
$purge_conf_dir = false,
|
||||
$character_set = 'UNSET',
|
||||
) inherits mysql::params {
|
||||
|
||||
File {
|
||||
owner => 'root',
|
||||
group => $root_group,
|
||||
mode => '0400',
|
||||
notify => $restart ? {
|
||||
true => Exec['mysqld-restart'],
|
||||
notify => $restart ? {
|
||||
true => Exec['mysqld-restart'],
|
||||
false => undef,
|
||||
},
|
||||
}
|
||||
|
@ -100,7 +103,7 @@ class mysql::config(
|
|||
unless => "mysqladmin -u root -p'${root_password}' status > /dev/null",
|
||||
path => '/usr/local/sbin:/usr/bin:/usr/local/bin',
|
||||
notify => $restart ? {
|
||||
true => Exec['mysqld-restart'],
|
||||
true => Exec['mysqld-restart'],
|
||||
false => undef,
|
||||
},
|
||||
require => File['/etc/mysql/conf.d'],
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
[client]
|
||||
port = <%= port %>
|
||||
port = <%= port %>
|
||||
socket = <%= socket %>
|
||||
<% if character_set != 'UNSET' %>
|
||||
default-character-set = <%= character_set %>
|
||||
<% end -%>
|
||||
[mysqld_safe]
|
||||
socket = <%= socket %>
|
||||
nice = 0
|
||||
|
@ -36,6 +39,9 @@ max_binlog_size = 100M
|
|||
<% if default_engine != 'UNSET' %>
|
||||
default-storage-engine = <%= default_engine %>
|
||||
<% end %>
|
||||
<% if character_set != 'UNSET' %>
|
||||
character-set-server = <%= character_set %>
|
||||
<% end %>
|
||||
<% if ssl == true %>
|
||||
ssl-ca = <%= ssl_ca %>
|
||||
ssl-cert = <%= ssl_cert %>
|
||||
|
|
Loading…
Reference in a new issue