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

Error query: SQLSTATE[HY000]: General error: 1366 Incorrect string value: #15711

Closed
dimitrispie opened this issue Mar 19, 2020 · 3 comments
Closed
Labels
answered For when a question was asked and we referred to forum or answered it.

Comments

@dimitrispie
Copy link

We are trying to import logs to Matomo 3.13.3 (mysql Ver 8.0.16)

For the following record:

xxx.xxx.xxx. - - [16/Feb/2020:12:54:13 +0100] "GET /page1/xxx" 200 63545 "https://scholar.google.de/scholar?q=Petersen,+P.+(Hrsg.),+Der+Aufstieg+der+Begabten,+Leipzig:+Teubner,+S.+105%F4%8F%B0%81-120.&hl=de&as_sdt=0&as_vis=1&oi=scholart" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.5 Safari/605.1.15"

we receive the following error:

Error query: SQLSTATE[HY000]: General error: 1366 Incorrect string value: '\xF4\x8F\xB0\x81-1...' for column 'referer_keyword' at row 1 In query: INSERT INTO matomo_log_visit ...

We have tried to change the collation:

ALTER TABLE matomo_log_visit CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

The error is received again.

@tsteur
Copy link
Member

tsteur commented Mar 19, 2020

@dimitrispie quickly searched for that error and found https://stackoverflow.com/questions/9522780/special-unicode-characters-cause-exceptions-in-mysql-jdbc

It sounds like some server issue maybe. Not sure which MySQL version you are using etc.

@dimitrispie
Copy link
Author

@dimitrispie quickly searched for that error and found https://stackoverflow.com/questions/9522780/special-unicode-characters-cause-exceptions-in-mysql-jdbc

It sounds like some server issue maybe. Not sure which MySQL version you are using etc.

As mentioned above:
Matomo 3.13.3 (mysql Ver 8.0.16)

@tsteur
Copy link
Member

tsteur commented Mar 19, 2020

I suppose you would also need to change the charset in Matomo which is by default charset = utf8 and can be configured in

[database]
charset = utf8

We are working on utf8mb4 at this moment in #9785 . It will be available with Matomo 4. I'm not sure it's safe to change the charset. I'm closing this issue now as it seems a duplicate of #9785 but happy to reopen if needed.

Hope this helps @dimitrispie

@tsteur tsteur closed this as completed Mar 19, 2020
@tsteur tsteur added the answered For when a question was asked and we referred to forum or answered it. label Mar 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered For when a question was asked and we referred to forum or answered it.
Projects
None yet
Development

No branches or pull requests

2 participants