-
Notifications
You must be signed in to change notification settings - Fork 977
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
No response to commands if client specified collation instead of charset #1219
Comments
Some more details: In case where client sends
In case where client sends
Setting Collation
|
We haven't verified it yet ( @pondix will do that ), but I believe I know where the issue is.
Because the default collation for |
Tested by building a debian 9 package from branch 1.4.4-set_collate - grafana correctly connects to the cluster as it should. Thanks! |
Thank you for verifying! :) |
Hi,
I am trying to set up a Grafana monitoring server, using proxysql (ProxySQL version v1.4.3-1.1, codename Truls, Debian Stretch) as a proxy to Percona XtraDB cluster (a single node in bootstrap mode for testing).
The issue occurs with any Grafana Docker image starting with version 4.5.0-beta1 ( https://hub.docker.com/r/grafana/grafana/tags/ ). Containers with version <4.5.0 work fine, but containers with version >=4.5.0 don't get command responses from proxysql after authorization. Problem doesn't occur without proxysql (direct connection to cluster node).
After some debugging I've found the source of the problem. In version 4.5.0 Grafana's connection options were changed from
cnnstr = fmt.Sprintf("%s:%s@%s(%s)/%s?charset=utf8mb4&allowNativePasswords=true"
to
cnnstr = fmt.Sprintf("%s:%s@%s(%s)/%s?collation=utf8mb4_unicode_ci&allowNativePasswords=true"
in order to avoid using SET NAMES (see grafana/grafana@c5400ff#diff-7cd5adfbae9b8f2f4c6f2d40d5ed6e78 ).
Attaching two tcpdump caps - version 4.5.0 (broken, no response after sending
SELECT @@max_allowed_packet
), where collation=utf8mb4_unicode_ci was added and version 4.7.0 with my patch (which brings back charset=utf8mb4), where communications work as they should (still broken without patch).4.5.0-broken.zip
4.7.0-fixed.zip
You can reproduce it by running two Docker Grafana images like this:
docker run -dt --expose 3000 -e "GF_DATABASE_URL=mysql://<username>:<password>@<proxysql_host>:<port>/<grafana_database_name>" --net=host grafana/grafana:4.4.3
After the container starts you can check if it works on localhost:3000. Do the same for image version 4.5.0.
Probably related - #810
The text was updated successfully, but these errors were encountered: