Skip to content
This repository has been archived by the owner on Sep 17, 2024. It is now read-only.

mysqldbcompare unable to connect to 5.7 with the new mysql-connector-python-8.0.17. #46

Open
whataboutpereira opened this issue Jul 26, 2019 · 1 comment

Comments

@whataboutpereira
Copy link

I updated the python connector from 8.0.16 to 8.0.17 and now mysqldbcompare is unable to connect to v5.7 server.

mysql.connector.errors.DatabaseError: 1273 (HY000): Unknown collation: 'utf8mb4_0900_ai_ci'

As far as I understand utf8mb4_0900_ai_ci (unsupported in v5.7) was made the default collation in the python connector v8.0.17 and there doesn't seem to be a way to specify a different collation on mysqldbcompare command line.

I managed to work around it by setting utf8mb4_unicode_520_ci to true in:
/usr/lib64/python2.7/site-packages/mysql/connector/charsets.py

There really should be a way to specify collation on the command line (much like the --character-set switch).

@hpaknia
Copy link

hpaknia commented Sep 27, 2019

Any updates on this?
Anyhow @whataboutpereira your comment saved my day. I had 2 options, doing yum downgrade -y mysql-connector-python which was not a safe way to automate my docker file, specially when possibly 8.0.18 is released.
But installing 8.0.16 this worked:

RUN curl -o mysql-connector-python-8.0.16-1.el7.x86_64.rpm http://www.mirrorservice.org/sites/ftp.mysql.com/Downloads/Connector-Python/mysql-connector-python-8.0.16-1.el7.x86_64.rpm \
	&& rpm -i mysql-connector-python-8.0.16-1.el7.x86_64.rpm \
	&& rm mysql-connector-python-8.0.16-1.el7.x86_64.rpm

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants