source: server/etc/mysqld-og.cnf @ b3752e9

mainqndtest opengnsys-1.1.1d
Last change on this file since b3752e9 was 930563c, checked in by OpenGnSys Support Team <soporte-og@…>, 4 years ago

#941 Set MySQL encoding to UTF-8

This commit sets the MySQL enconding to UTF8. This way we can avoid
problems with special characters in strings, like: ó.

It also changes the installation script to always copy the MySQL
configuration template and restart MySQL. So, even if the server had
MySQL installed before the OpenGnsys installation, the script
configures MySQL.

Example error that this commit should fix:

ogAdmServer[12524]: failed to query database
(actualizaSoftware:2380) 1366: Incorrect string value:
'\xF3n de ...' for column 'descripcion' at row 1

The encoding configuration before this commit should be like this:

mysql> SHOW VARIABLES LIKE 'char%';
+--------------------------+----------------------------+
| Variable_name | Value |
+--------------------------+----------------------------+
| character_set_client | utf8 |
| character_set_connection | utf8 |
| character_set_database | latin1 |
| character_set_filesystem | binary |
| character_set_results | utf8 |
| character_set_server | latin1 |
| character_set_system | utf8 |
| character_sets_dir | /usr/share/mysql/charsets/ |
+--------------------------+----------------------------+
8 rows in set (0.10 sec)

The encoding configuration after this commit should be like this:

mysql> SHOW VARIABLES LIKE 'char%';
+--------------------------+----------------------------+
| Variable_name | Value |
+--------------------------+----------------------------+
| character_set_client | utf8 |
| character_set_connection | utf8 |
| character_set_database | utf8 |
| character_set_filesystem | binary |
| character_set_results | utf8 |
| character_set_server | utf8 |
| character_set_system | utf8 |
| character_sets_dir | /usr/share/mysql/charsets/ |
+--------------------------+----------------------------+
8 rows in set (0.01 sec)

  • Property mode set to 100644
File size: 89 bytes
Line 
1[mysqld]
2event_scheduler = ON
3character-set-server=utf8
4collation-server=utf8_general_ci
Note: See TracBrowser for help on using the repository browser.