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

看到utf8mb4_0900_ai_ci這個就知道是MySQL 8.0.17以後才會出現的charsets,而我用的是MySQL 5.7的,所以出現這錯誤是正常的
可是我印象中我裝的都是5.7用的版本啊!一查發現應該是yum源的問題,yum幫我裝了mysql-connector-python-8.0.17,以下這全是yum裝的,偏偏這個版本不一樣



剛測試發現有些Tool會有錯,這招行不通
所以還是下載重裝mysql-connector-python一勞永逸吧
rpm -e --nodeps mysql-connector-python-8.0.17-1.el7.x86_64
wget https://dev.mysql.com/get/Downloads/Connector-Python/mysql-connector-python-2.1.8-1.el7.x86_64.rpm
rpm -ivh mysql-connector-python-2.1.8-1.el7.x86_64.rpm
yum install mysql-utilities
最後的相關套件版本

0 意見:
張貼留言