Skip to content

Commit dde19b6

Browse files
committed
fixed error unable to load authentication plugin 'caching_sha2_password' for mysql
1 parent 9be2815 commit dde19b6

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ DIRECTORY_PATH=```pwd``` at command line\
140140
DATABASE_IMAGE_NAME=```mariadb``` or ```mysql```\
141141
DATABASE_CONT_NAME=```mariadb```, ```mysql``` or ```custom name```\
142142
DATABASE_PACKAGE_MANAGER=```apt-get update && apt-get install -y gettext-base``` for mariadb, ```microdnf install -y gettext``` for mysql\
143-
DATABASE_AUTHENTICATION_PLUGIN=```mysql_native_password``` for mariadb, ```caching_sha2_password``` for mysql\
143+
DATABASE_AUTHENTICATION_PLUGIN=```--default-authentication-plugin=mysql_native_password``` for mariadb, ``` ``` for mysql\
144144
DATABASE_ADMIN_COMMANDLINE=```mariadb-admin``` for mariadb, ```mysqladmin``` for mysql\
145145
VARNISH_VERSION=```latest``` for centos version 9+ and fedora, ```stable``` for the others
146146

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ services:
203203
- "docker-volume-backup.stop-during-backup=true"
204204
- "docker-volume-backup.archive-pre=/bin/sh -c 'mysqldump -uroot -p${MYSQL_ROOT_PASSWORD} --all-databases > /tmp/backup/db_backup_data.sql'"
205205
- "docker-volume-backup.exec-label=database"
206-
command: bash -c "${DATABASE_PACKAGE_MANAGER} && export PMA_CONTROLUSER=${PMA_CONTROLUSER} export PMA_CONTROLPASS=${PMA_CONTROLPASS} && envsubst '$$PMA_CONTROLUSER,$$PMA_CONTROLPASS' < /docker-entrypoint-initdb.d/create_tables.sql.template > /docker-entrypoint-initdb.d/create_tables.sql && docker-entrypoint.sh --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --default-authentication-plugin=${DATABASE_AUTHENTICATION_PLUGIN}"
206+
command: bash -c "${DATABASE_PACKAGE_MANAGER} && export PMA_CONTROLUSER=${PMA_CONTROLUSER} export PMA_CONTROLPASS=${PMA_CONTROLPASS} && envsubst '$$PMA_CONTROLUSER,$$PMA_CONTROLPASS' < /docker-entrypoint-initdb.d/create_tables.sql.template > /docker-entrypoint-initdb.d/create_tables.sql && docker-entrypoint.sh --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci ${DATABASE_AUTHENTICATION_PLUGIN}"
207207

208208
redis:
209209
image: redis:latest

install.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ done
362362
echo "Ok."
363363

364364
which_db=""
365-
db_authentication_plugin="mysql_native_password"
365+
db_authentication_plugin="--default-authentication-plugin=mysql_native_password"
366366
db_authentication_password="USING PASSWORD('"$pma_password"')"
367367
db_package_manager="apt-get update \&\& apt-get install -y gettext-base"
368368
db_admin_commandline="mariadb-admin"
@@ -372,7 +372,7 @@ do
372372
which_db=$db
373373
if [ $REPLY -eq 2 ]
374374
then
375-
db_authentication_plugin="caching_sha2_password"
375+
db_authentication_plugin=""
376376
db_authentication_password="BY '"$pma_password"'"
377377
db_package_manager="microdnf install -y gettext"
378378
db_admin_commandline="mysqladmin"

0 commit comments

Comments
 (0)