crazy-max / docker-nextcloud

Nextcloud Docker image
MIT License
239 stars 47 forks source link

Fix missing caching_sha2_password.so library #169

Closed thelittlefireman closed 2 months ago

thelittlefireman commented 2 months ago

Fix missing caching_sha2_password when connect to mysql db version >= 8.4

admin@XXXX:$ docker exec -it nextcloud bash
75334fa4b046:/var/www# mysql -h mysql -u nextcloud1 -pXXXXXXX
ERROR 1045 (28000): Plugin caching_sha2_password could not be loaded: Error loading shared library /usr/lib/mariadb/plugin/caching_sha2_password.so: No such file or directory
75334fa4b046:/var/www#
admin@XXXXX:$ docker exec -it nextcloud bash
75334fa4b046:/var/www# apk add mariadb-connector-c
fetch https://dl-cdn.alpinelinux.org/alpine/v3.20/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.20/community/x86_64/APKINDEX.tar.gz
(1/1) Installing mariadb-connector-c (3.3.10-r0)
OK: 447 MiB in 303 packages
75334fa4b046:/var/www# mysql -h mysql -u nextcloud1 -pXXXXXXX
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MySQL connection id is 5975
Server version: 9.0.0 MySQL Community Server - GPL