In 2018 this MySQL-error ruined the use of running Matomo for me for more than a year.
"An error occurred. Cannot connect to the database:
SQLSTATE[HY000]  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.
I put all these parameter lines in my.ini and now I can run the Matomo site again:
collation-server = utf8_unicode_ci
character-set-server = utf8
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.
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,
MySQL 8.0.19 (different port)
IIS 10 webserver on Windows 10 Pro OS