[Build] caching_sha2_password authentication module does not work on Ubuntu 22.04 #657
Replies: 3 comments 5 replies
-
Some followup. It turns out that on the
This is quite unexpected to me, since all the other posts here state that mariadb connection libs do not support caching_sha2_password, and MySQL connector/C libs do. Should I install mariadb libraries? |
Beta Was this translation helpful? Give feedback.
-
Both library does support caching_sha2_password. If you want to use caching_sha2_password, I recommend to use secure connection (e.g. TLS or Unix socket).
There is an insecure option that beaves same to MariaDB connector, but I don't want to write it here because it is insecure option. See the reference manual for caching sha2 password auth plugin for detail. |
Beta Was this translation helpful? Give feedback.
-
@methane Did you decide to not further provide assistance here? |
Beta Was this translation helpful? Give feedback.
-
What OS and which version do you use?
Ubuntu 22.04
How did you installed mysql client library?
On top of a Ubuntu:22.04 (jammy) image I ran (in Dockerfile):
This installs mysqlclient v2.2.0 inside the Ubuntu container.
The problem is that on Ubuntu the
caching_sha2_password
module does not work. It results in an error:This connection works fine when I install mysqlclient in another Debian base image in exactly the same way (e.g. python:3.10-bullseye):
gives response:
Against the same database instance.
So, I conclude that:
Somehow I think that the image does not use the correct MySQL Connector/C library during builds? Could someone give me some pointers.
Output from
pkg-config --cflags --libs mysqlclient
How did you tried to install mysqlclient?
pip install mysqlclient
Output of building mysqlclient
Beta Was this translation helpful? Give feedback.
All reactions