[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.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
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_passwordmodule 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 mysqlclientHow did you tried to install mysqlclient?
pip install mysqlclient
Output of building mysqlclient
pip3 install mysqlclient==2.2.0 Collecting mysqlclient==2.2.0 Downloading mysqlclient-2.2.0.tar.gz (89 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 89.5/89.5 kB 2.6 MB/s eta 0:00:00 Installing build dependencies ... done Getting requirements to build wheel ... done Installing backend dependencies ... done Preparing metadata (pyproject.toml) ... done Building wheels for collected packages: mysqlclient Building wheel for mysqlclient (pyproject.toml) ... done Created wheel for mysqlclient: filename=mysqlclient-2.2.0-cp310-cp310-linux_x86_64.whl size=123670 sha256=2e1be22003ea023c1fd25224c91129e34f3d6d96d6a3ed73a65b2ac1b4bfc80c Stored in directory: /root/.cache/pip/wheels/a4/f8/fd/0399687c0abd03c10c975ed56c692fcd3d0fb80440b5a661f1 Successfully built mysqlclient Installing collected packages: mysqlclient Successfully installed mysqlclient-2.2.0 WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv root@4bab55383899:/#Beta Was this translation helpful? Give feedback.
All reactions