summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorJavier Sánchez Parra <jsanchez@soleta.eu>2020-04-01 13:53:27 +0200
committerOpenGnSys Support Team <soporte-og@soleta.eu>2020-04-02 13:48:59 +0200
commit930563ce0d47dfb80b8298df883030bd3694198b (patch)
treed7c54e30bf29ebd4c220c657b07a59891539836d /server
parent6a68c4cbb3943263961aee0da6916f92f25e666a (diff)
#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)
Diffstat (limited to 'server')
-rw-r--r--server/etc/mysqld-og.cnf3
1 files changed, 2 insertions, 1 deletions
diff --git a/server/etc/mysqld-og.cnf b/server/etc/mysqld-og.cnf
index b7ea14c0..36641c65 100644
--- a/server/etc/mysqld-og.cnf
+++ b/server/etc/mysqld-og.cnf
@@ -1,3 +1,4 @@
[mysqld]
event_scheduler = ON
-
+character-set-server=utf8
+collation-server=utf8_general_ci