Do you have a solution to error "Server sent charset unknown to the client."?

Hello,
After 2 years of absence, because the Matomo website was crippled on my webserver, I gave it a new try.
Today I installed Matomo version 3.13.2 and hoped for the best.
But alas: again the Matomo-site crashes on the same error as 2 years ago!
“An error occurred. Cannot connect to the database:
SQLSTATE[HY000] [2054] Server sent charset unknown to the client.
Please, report to the developers”

Does anyone know any specific details on why the site is crashing again?
What can I do to solve this problem?

Any help would be appreciated.
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

Matomo uses the “utf8_general_ci” collation by default. Perhaps your database server isn’t properly configured to support this collation?

I can’t help you any further – I know nothing about database servers.

Hello Gerd,
Thank you for responding.
I have changed the default collation (via HeidSQL) for Matomo database, but this does not resolve the error SQLSTATE[HY000] [2054] Server sent charset unknown to the client.
afbeelding
afbeelding
The Oracle MySQL Workbench for MySQl version 8 does show the error below. I do not know if that has something to do with my problem:
afbeelding

Friendly regards,
Simon

I did a Google search using: “system does not properly support lower_case_table_names” . I don’t know whether any of the search results apply to you, but I don’t think this warning has anything to do with the character set error you report.

A Google search for “sql server sent charset unknown” yields the following result, which appears to be a possible solution:
https://thisinterestsme.com/charset-255-unknown-mysql/

I hope this helps.

Hello Gerd,
Your reference to thisinterestsme.com gave me the solution:
[client]
default-character-set=utf8
[mysql]
default-character-set=utf8
[mysqld]
collation-server = utf8_unicode_ci
character-set-server = utf8

I put all the parameter lines in my.ini and now I can approach the Matomo site again.
Thank you for your efforts.
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.


I hope these settings will not disturb my other sites, such as Moodle platform, or Piwigo.

Thanks again,
Simon

I’m glad that you are now able to access Matomo.

You should post this latest set of warnings in the Github bug tracker, so that the Matomo developers will look into the issues. For some reason, they’re currently not very good at looking into posts in the “Support & Bugs” forum. I’ve had a couple of posts in this forum that have been ignored, as yours was.

Good luck.

Hello Gerd,
I created an issue in GitHub:
https://github.com/matomo-org/matomo/issues/15610

Thank you,
Simon