-
Notifications
You must be signed in to change notification settings - Fork 442
New MySQL 8 Default Authentication Plugin Not Supported #442
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
Comments
See https://packages.debian.org/ja/buster/default-libmysqlclient-dev. It is libmariadb-dev-compat. Maybe, it doesn't support caching_sha2_password. |
That's a good point. Unfortunately, it doesn't appear to be available on Buster 😞 . Thanks anyway. |
This is now resolved. After some time, I attempted to use the
Which prompted me to install |
I ran into this issue with the FROM python:3.9.7-buster
RUN apt-get update \
&& apt-get -y install lsb-release \
&& curl -sLo mysql.deb https://dev.mysql.com/get/mysql-apt-config_0.8.19-1_all.deb \
&& DEBIAN_FRONTEND=noninteractive dpkg -i mysql.deb \
&& rm mysql.deb \
&& apt-get update \
&& apt-get -y install libmysqlclient-dev \
&& pip install mysqlclient==2.0.3 |
Describe the bug
MySQL 8.0.4 introduced a new default authentication plugin: caching_sha2_password. This replaced mysql_native_password. The mysql server team also stated the following:
Attempting to connect to mysql with this library in certain environments yields the following error:
Plugin caching_sha2_password could not be loaded: /usr/lib/x86_64-linux-gnu/mariadb19/plugin/caching_sha2_password.so: cannot open shared object file: No such file or directory
One workaround for this would be to set the
default-authentication-plugin
setting tomysql_native_password
. You could also change the authentication for your user:ALTER USER 'user'@'host' IDENTIFIED WITH mysql_native_password BY 'password';
.I am not certain if this problem lies with
mysqlclient-python
, but this github issue may prove useful to others attempting to connect to mysql 8 from a Debian box. I am not asking you for help (I'm already using the aforementioned workaround) nor am I asking you to treat this as an IT ticket. I'm just requesting that you consider adding support for the new default authentication ifmysqlclient-python
is indeed responsible from this problem. Support for a newer, more secure authentication plugin would be greatly welcome.To Reproduce
Environment
MySQL Server
MySQL Client
Additional context
There are related issues in this repository, but they involve windows installs; I am experiencing this on Linux (Debian). I am not experiencing this issue on MacOS.
The text was updated successfully, but these errors were encountered: