• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Question Wordpress, MariaDB 10.1 and utf8 charset and collation

Giorgio1

New Pleskian
I upgraded to MariaDB 10.1 (CentOS 7.4, Plesk Onyx 17.5.3) following this tutorial and I would like to know if these settings in my.cnf file are ok (on my server there are websites in italian, english and polish languages).

I set these values in my.cnf:

Code:
[mysqld]
character-set-server = utf8
collation-server = utf8_general_ci
skip-character-set-client-handshake

restarted the service of mariadb and now with the command:

Code:
MariaDB [psa]> show variables like 'char%'; show variables like 'collation%';

I have:

Code:
+--------------------------+----------------------------+
| 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.00 sec)

+----------------------+-----------------+
| Variable_name        | Value           |
+----------------------+-----------------+
| collation_connection | utf8_general_ci |
| collation_database   | utf8_general_ci |
| collation_server     | utf8_general_ci |
+----------------------+-----------------+
3 rows in set (0.00 sec)

Before I had:

Code:
+--------------------------+----------------------------+
| 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     | latin1                     |
| character_set_system     | utf8                       |
| character_sets_dir       | /usr/share/mysql/charsets/ |
+--------------------------+----------------------------+
8 rows in set (0.00 sec)

+----------------------+-------------------+
| Variable_name        | Value             |
+----------------------+-------------------+
| collation_connection | utf8_general_ci   |
| collation_database   | utf8_general_ci   |
| collation_server     | latin1_swedish_ci |
+----------------------+-------------------+

Are these new settings ok? Is it safe to change them after some days (I mean after some days of Wordpress websites running with the previous configuration of mariadb)?

Thanks for any suggestion.
 
No, it is not safe to change the values. Because these are your defaults and some software will rely on the defaults, for example will save data to a dataset in one character format. When you make changes later and save data to additional sets, the contents of your datasets can have different character sets. The same applies to reading. It cannot be predicted which applications might cause these issues, because it is not necessarily a problem, but if applications rely on defaults, they might not work correctly when the default character sets are changed after some while of operation.
 
Agree with Peter, but on the flipside - He just went utf8 to latin1, what happens to the existing applications if they are relying on the previous default?
 
Mmm.. I went from latin1_swedish_ci to utf8_general_ci and from latin1 to utf8 thinking is good for Wordpress...

So it should be better to remove these settings from my.cnf as soon as possible?
 
Last edited:
Back
Top