Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MySQL Error SQLSTATE[HY000] [2054] "Server sent charset unknown to the client." #15610

Closed
sthopd opened this issue Feb 22, 2020 · 5 comments
Closed
Labels
Bug For errors / faults / flaws / inconsistencies etc. Help wanted Beginner friendly issues or issues where we'd highly appreciate community's help and involvement. invalid For issues or pull requests that are no longer relevant to Matomo core.

Comments

@sthopd
Copy link

sthopd commented Feb 22, 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
Copy link
Member

@tsteur tsteur added Bug For errors / faults / flaws / inconsistencies etc. Help wanted Beginner friendly issues or issues where we'd highly appreciate community's help and involvement. labels Feb 23, 2020
@sgiehl
Copy link
Member

sgiehl commented Feb 25, 2020

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

@tsteur
Copy link
Member

tsteur commented Jun 22, 2021

@sgiehl can we close this one maybe?

@sthopd
Copy link
Author

sthopd commented Jun 23, 2021

Okay. I closed my issue now, although I still get a Warning about UTF8mb4 charset ⚠ Warning: LOAD DATA INFILE
LOAD DATA INFILE gebruiken zal Matomo's archivatie proces aanzienlijk versnellen.

Matomo is very slow in generating data for webpage overview.

@sthopd sthopd closed this as completed Jun 23, 2021
@sgiehl
Copy link
Member

sgiehl commented Jun 23, 2021

@sthopd The Load Data Infile is unrelated to UTF8mb4. See https://matomo.org/faq/troubleshooting/faq_194/

@mattab mattab added the invalid For issues or pull requests that are no longer relevant to Matomo core. label Jul 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. Help wanted Beginner friendly issues or issues where we'd highly appreciate community's help and involvement. invalid For issues or pull requests that are no longer relevant to Matomo core.
Projects
None yet
Development

No branches or pull requests

5 participants