cookbook-gitlab-deprecated icon indicating copy to clipboard operation
cookbook-gitlab-deprecated copied to clipboard

db mysql2 database is ootb created with default latin1 character set

Open epcim opened this issue 11 years ago • 3 comments

everything except character set is se to be utf8 or unicode (on postgre). However database for a gitlab is being created as latin1. This explicitely rule-out the other encodings, however rest of the mysql deployment is configured to use utf8.

Anybody know how to specify a database character encoding during gitlab deploy?

mysql> show variables like 'char%';
+--------------------------+----------------------------+
| Variable_name            | Value                      |
+--------------------------+----------------------------+
| character_set_client     | utf8                       |
| character_set_connection | utf8                       |
| character_set_database   | latin1                     |

epcim avatar Sep 17 '14 12:09 epcim

Please see also a https://github.com/opscode-cookbooks/mysql/pull/222

epcim avatar Sep 17 '14 13:09 epcim

That should be the default charset for mysql, I would think. I can take a look into submitting a patch against the mysql, or database, cookbooks this weekend.

atomic-penguin avatar Sep 17 '14 19:09 atomic-penguin

Well latin1 is probably default for mysql, however all the other attributes are set to UTF8 already. So switching gitlab database to utf8 (or to encoding value from attribute) will make the cookbook ready for an international deployment.

Cmd's to list actual configuration..

mysql> show variables like 'char%';
mysql> show variables like 'collation%';

In my case only character_set_database after the deployment was latin1 (other were utf8). Proper settings might be done on the database cookbook side (setting a default encoding for databases to utf-8) which would fit the most and many other cookbooks/apps would benefit from it. However, honestly, it's a gitlab script that creates the DB and it should properly state it's encoding. (ommitting leads to ootb latin1 and breaks actually the internationall usage at the very begging).

Anyway, my thanks in advance...

epcim avatar Sep 17 '14 20:09 epcim