Skip to content

Commit 01063f2

Browse files
committed
fixed error unable to load authentication plugin 'caching_sha2_password' for mysql
1 parent 87884c4 commit 01063f2

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

docker-compose.yml

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

184184
redis:
185185
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)