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",
481
552
nopass_sha256 IDENTIFIED WITH "sha256_password",
482
553
user_caching_sha2 IDENTIFIED WITH "caching_sha2_password" BY "pass_caching_sha2",
483
554
nopass_caching_sha2 IDENTIFIED WITH "caching_sha2_password"
484
-
PASSWORD EXPIRE NEVER;'
485
-
mysql -uroot -h127.0.0.1 -e 'GRANT RELOAD ON *.* TO user_caching_sha2;'
486
-
else
487
-
WITH_PLUGIN=''
555
+
PASSWORD EXPIRE NEVER;
556
+
GRANT RELOAD ON *.* TO user_caching_sha2;'
557
+
elif [ "$DB" == 'mysql:8.4' ]; then
558
+
WITH_PLUGIN='with caching_sha2_password'
559
+
USER_CREATION_COMMANDS='
560
+
CREATE USER
561
+
user_caching_sha2 IDENTIFIED WITH "caching_sha2_password" BY "pass_caching_sha2",
562
+
nopass_caching_sha2 IDENTIFIED WITH "caching_sha2_password"
563
+
PASSWORD EXPIRE NEVER;
564
+
GRANT RELOAD ON *.* TO user_caching_sha2;'
565
+
fi
566
+
567
+
if [ ! -z "$USER_CREATION_COMMANDS" ]; then
568
+
mysql -uroot -h127.0.0.1 -e "$USER_CREATION_COMMANDS"
488
569
fi
489
-
mysql -h127.0.0.1 -uroot -e "create database $MYSQL_DATABASE DEFAULT CHARACTER SET utf8mb4"
570
+
571
+
mysql -h127.0.0.1 -uroot -e "create database $MYSQL_DATABASE DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci"
490
572
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};"
491
573
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