MySQL: change default MySQL collate to utf8_general_ci

Install & configure MySQL database by using utf8_general_ci collation
which is the way documented in OpenStack [1] and already the default
in puppetlabs-mysql [2].

[1] http://goo.gl/GA5gyZ
[2] https://github.com/puppetlabs/puppetlabs-mysql/blob/master/manifests/db.pp#L7

Change-Id: I9101be56e19e7ec508a510da5c0780c8180ea685
Closes-bug: #1446375
This commit is contained in:
Emilien Macchi
2015-04-21 13:11:50 -04:00
parent 4be9d834fc
commit c44f30ffe2
2 changed files with 6 additions and 4 deletions

View File

@@ -24,7 +24,7 @@
# the database charset. Optional. Defaults to 'utf8'
#
# [*collate*]
# the database collation. Optional. Defaults to 'utf8_unicode_ci'
# the database collation. Optional. Defaults to 'utf8_general_ci'
#
# [*mysql_module*]
# (optional) Deprecated. Does nothing.
@@ -36,7 +36,7 @@ class neutron::db::mysql (
$host = '127.0.0.1',
$allowed_hosts = undef,
$charset = 'utf8',
$collate = 'utf8_unicode_ci',
$collate = 'utf8_general_ci',
$cluster_id = 'localzone',
$mysql_module = undef,
) {

View File

@@ -24,7 +24,8 @@ describe 'neutron::db::mysql' do
:user => 'neutron',
:password_hash => '*74B1C21ACE0C2D6B0678A5E503D2A60E8F9651A3',
:host => '127.0.0.1',
:charset => 'utf8'
:charset => 'utf8',
:collate => 'utf8_general_ci',
) }
end
@@ -37,7 +38,8 @@ describe 'neutron::db::mysql' do
:user => 'neutron',
:password_hash => '*74B1C21ACE0C2D6B0678A5E503D2A60E8F9651A3',
:host => '127.0.0.1',
:charset => 'utf8'
:charset => 'utf8',
:collate => 'utf8_general_ci',
) }
end