Skip to content

Commit 2d818d8

Browse files
committed
fixed error unable to load authentication plugin 'caching_sha2_password' for mysql
1 parent 7449e0f commit 2d818d8

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
@@ -137,7 +137,7 @@ DIRECTORY_PATH=```pwd``` at command line\
137137
DATABASE_IMAGE_NAME=```mariadb``` or ```mysql```\
138138
DATABASE_CONT_NAME=```mariadb```, ```mysql``` or ```custom name```\
139139
DATABASE_PACKAGE_MANAGER=```apt-get update && apt-get install -y gettext-base``` for mariadb, ```microdnf install -y gettext``` for mysql\
140-
DATABASE_AUTHENTICATION_PLUGIN=```mysql_native_password``` for mariadb, ```caching_sha2_password``` for mysql\
140+
DATABASE_AUTHENTICATION_PLUGIN=```--default-authentication-plugin=mysql_native_password``` for mariadb, ``` ``` for mysql\
141141
DATABASE_ADMIN_COMMANDLINE=```mariadb-admin``` for mariadb, ```mysqladmin``` for mysql\
142142
VARNISH_VERSION=```latest``` for centos version 9+ and fedora, ```stable``` for the others
143143

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ services:
174174
- "docker-volume-backup.stop-during-backup=true"
175175
- "docker-volume-backup.archive-pre=/bin/sh -c 'mysqldump -uroot -p${MYSQL_ROOT_PASSWORD} --all-databases > /tmp/backup/db_backup_data.sql'"
176176
- "docker-volume-backup.exec-label=database"
177-
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}"
177+
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}"
178178

179179
redis:
180180
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)