@sthopd opened this Issue on February 22nd 2020

In 2018 this MySQL-error ruined the use of running Matomo for me for more than a year.
MySQL ERROR:
"An error occurred. Cannot connect to the database:
SQLSTATE[HY000] [2054] Server sent charset unknown to the client.
Please, report to the developers"

In 2020 I tried again and I still got the same error, but now there is a solution, though it still generates some MySQL-warnings.

SOLUTION:
I put all these parameter lines in my.ini and now I can run the Matomo site again:

[client]
default-character-set=utf8
[mysql]
default-character-set=utf8
[mysqld]
collation-server = utf8_unicode_ci
character-set-server = utf8

WARNINGS:
But now I get the following warnings in de error.log of the MySQL80 service:

2020-02-20T14:57:23.213164Z 0 [Warning] [MY-013242] [Server] –character-set-server: ‘utf8’ is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous.

2020-02-20T14:57:23.213177Z 0 [Warning] [MY-013244] [Server] –collation-server: ‘utf8_general_ci’ is a collation of the deprecated character set UTF8MB3. Please consider using UTF8MB4 with an appropriate collation instead.

CONSIDERATIONS:
As I have more open source sites running on the same webserver, I hope that these settings will not disturb my other sites, such as Moodle platform, or Piwigo.

Please, Matomo-developers, use the newest parameter standards for MySQl v.8 in combination with PHP v.7 .

Thank you and friendly regards,
Simon

Environment:
Matomo 3.13.2
MySQL 8.0.19 (different port)
PHP 7.2.8
IIS 10 webserver on Windows 10 Pro OS

@Findus23 commented on February 22nd 2020 Member
@sgiehl commented on February 25th 2020 Member

I guess that warning is triggered as utf8mb4 is already the default character set of MySQL 8. Using utf8 seems deprecated there already. So should be fixed with Matomo 4 when #9785 is fixed

Powered by GitHub Issue Mirror