google/ml-metadata

MySQL client does not support caching_sha2_password

peteboothroyd opened this issue · 1 comments

MySQL 8 uses caching_sha2_password by default. The currently used mysql client (mariadb-connector-c) supports this in the release which ml-metadata uses. However when trying to connect to a MySQL database which uses caching_sha2_password throws an error RuntimeError: mysql_real_connect failed: errno: 0, error:. Changing authentication to mysql_native_password works around the problem. It would be nice if we could use the more secure authentication method.

Hi peteboothroyd,

Thanks for bringing this up to our notice.

Currently changing the MySQL client is not in this Q's roadmap, especially given that the common workaround "ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';" + "flush privileges;" could fix the error.

Close this issue for now.