You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
user_sha256 IDENTIFIED WITH "sha256_password" BY "pass_sha256",
480
551
nopass_sha256 IDENTIFIED WITH "sha256_password",
481
552
user_caching_sha2 IDENTIFIED WITH "caching_sha2_password" BY "pass_caching_sha2",
482
553
nopass_caching_sha2 IDENTIFIED WITH "caching_sha2_password"
483
-
PASSWORD EXPIRE NEVER;'
484
-
mysql -uroot -h127.0.0.1 -e 'GRANT RELOAD ON *.* TO user_caching_sha2;'
485
-
else
486
-
WITH_PLUGIN=''
554
+
PASSWORD EXPIRE NEVER;
555
+
GRANT RELOAD ON *.* TO user_caching_sha2;'
556
+
elif [ "$DB" == 'mysql:8.4' ]; then
557
+
WITH_PLUGIN='with caching_sha2_password'
558
+
USER_CREATION_COMMANDS='
559
+
CREATE USER
560
+
user_caching_sha2 IDENTIFIED WITH "caching_sha2_password" BY "pass_caching_sha2",
561
+
nopass_caching_sha2 IDENTIFIED WITH "caching_sha2_password"
562
+
PASSWORD EXPIRE NEVER;
563
+
GRANT RELOAD ON *.* TO user_caching_sha2;'
564
+
fi
565
+
566
+
if [ ! -z "$USER_CREATION_COMMANDS" ]; then
567
+
mysql -uroot -h127.0.0.1 -e "$USER_CREATION_COMMANDS"
487
568
fi
488
-
mysql -h127.0.0.1 -uroot -e "create database $MYSQL_DATABASE DEFAULT CHARACTER SET utf8mb4"
569
+
570
+
mysql -h127.0.0.1 -uroot -e "create database $MYSQL_DATABASE DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci"
489
571
mysql -h127.0.0.1 -uroot -e "create user $MYSQL_USER identified $WITH_PLUGIN by '${MYSQL_PASSWORD}'; grant all on ${MYSQL_DATABASE}.* to ${MYSQL_USER};"
490
572
mysql -h127.0.0.1 -uroot -e "create user ${MYSQL_USER}@localhost identified $WITH_PLUGIN by '${MYSQL_PASSWORD}'; grant all on ${MYSQL_DATABASE}.* to ${MYSQL_USER}@localhost;"
0 commit comments