Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.

Plugin caching_sha2_password could not be loaded #49

Open
patrickscottbest opened this issue Jun 24, 2020 · 0 comments
Open

Plugin caching_sha2_password could not be loaded #49

patrickscottbest opened this issue Jun 24, 2020 · 0 comments

Comments

@patrickscottbest
Copy link

My error when connecting to mysql 8 database is:

Jun 24 03:00:37 gmysql Connection failed: Unable to connect to database: Plugin caching_sha2_password could not be loaded: Error loading shared library lib/mariadb/plugin/caching_sha2_password.so: No such file or directory

Jun 24 03:00:37 Caught an exception instantiating a backend: Unable to launch gmysql connection: Unable to connect to database: Plugin caching_sha2_password could not be loaded: Error loading shared library lib/mariadb/plugin/caching_sha2_password.so: No such file or directory

I peeked inside the container and discovered that it is not in the /lib, but in the /usr/lib directory there:

/usr/lib/mariadb/plugin
bash-4.4# ls -la 
total 72
drwxr-xr-x    2 root     root          4096 Jun 24 00:13 .
drwxr-xr-x    3 root     root          4096 Jun 24 00:13 ..
-rwxr-xr-x    1 root     root         14168 Jan 14  2019 caching_sha2_password.so
-rwxr-xr-x    1 root     root         14016 Jan 14  2019 dialog.so
-rwxr-xr-x    1 root     root         14016 Jan 14  2019 mysql_clear_password.so
-rwxr-xr-x    1 root     root         14168 Jan 14  2019 sha256_password.so

The error went away when i performed the following from the inside:


bash-4.4# cd /lib/
bash-4.4# ls
apk                    ld-musl-x86_64.so.1    libcrypto.so.1.1       libz.a                 libz.so.1              mdev
firmware               libc.musl-x86_64.so.1  libssl.so.1.1          libz.so                libz.so.1.2.11
bash-4.4# ls -la 
total 3868
drwxr-xr-x    1 root     root          4096 Jun 24 00:13 .
drwxr-xr-x    1 root     root          4096 Jun 24 03:00 ..
drwxr-xr-x    1 root     root          4096 Apr 23 13:10 apk
drwxr-xr-x    2 root     root          4096 Apr 23 13:10 firmware
-rwxr-xr-x    1 root     root        584304 Aug  7  2019 ld-musl-x86_64.so.1
lrwxrwxrwx    1 root     root            19 Apr 23 13:10 libc.musl-x86_64.so.1 -> ld-musl-x86_64.so.1
-rwxr-xr-x    1 root     root       2597536 Apr 21 17:27 libcrypto.so.1.1
-rwxr-xr-x    1 root     root        519632 Apr 21 17:27 libssl.so.1.1
-rw-r--r--    1 root     root        130106 Nov 15  2018 libz.a
lrwxrwxrwx    1 root     root            14 Jun 24 00:13 libz.so -> libz.so.1.2.11
lrwxrwxrwx    1 root     root            14 Apr 23 13:10 libz.so.1 -> libz.so.1.2.11
-rwxr-xr-x    1 root     root        100144 Nov 15  2018 libz.so.1.2.11
drwxr-xr-x    2 root     root          4096 Apr 23 13:10 mdev
bash-4.4# cp -R /usr/lib/mariadb .
bash-4.4# ls -la 
total 3872
drwxr-xr-x    1 root     root          4096 Jun 24 03:14 .
drwxr-xr-x    1 root     root          4096 Jun 24 03:00 ..
drwxr-xr-x    1 root     root          4096 Apr 23 13:10 apk
drwxr-xr-x    2 root     root          4096 Apr 23 13:10 firmware
-rwxr-xr-x    1 root     root        584304 Aug  7  2019 ld-musl-x86_64.so.1
lrwxrwxrwx    1 root     root            19 Apr 23 13:10 libc.musl-x86_64.so.1 -> ld-musl-x86_64.so.1
-rwxr-xr-x    1 root     root       2597536 Apr 21 17:27 libcrypto.so.1.1
-rwxr-xr-x    1 root     root        519632 Apr 21 17:27 libssl.so.1.1
-rw-r--r--    1 root     root        130106 Nov 15  2018 libz.a
lrwxrwxrwx    1 root     root            14 Jun 24 00:13 libz.so -> libz.so.1.2.11
lrwxrwxrwx    1 root     root            14 Apr 23 13:10 libz.so.1 -> libz.so.1.2.11
-rwxr-xr-x    1 root     root        100144 Nov 15  2018 libz.so.1.2.11
drwxr-xr-x    3 root     root          4096 Jun 24 03:14 mariadb
drwxr-xr-x    2 root     root          4096 Apr 23 13:10 mdev

The solution for now is to modify the docker file with :

RUN cp -R /usr/lib/mariadb /lib/.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant