fix: mysql service exit

This commit is contained in:
Shao Yu-Lung (Allen)
2024-07-24 17:06:35 +08:00
parent 16ec1c4a2c
commit a549510dd0
2 changed files with 5 additions and 10 deletions

View File

@@ -407,7 +407,8 @@ APACHE_FOR_MAC_M1=false
### MYSQL #################################################
MYSQL_VERSION=latest
# 5.7, 8.0, 8.4, 9.0
MYSQL_VERSION=8.4
MYSQL_DATABASE=default
MYSQL_USER=default
MYSQL_PASSWORD=secret

View File

@@ -1,8 +1,6 @@
ARG MYSQL_VERSION
FROM mysql:${MYSQL_VERSION}
LABEL maintainer="Mahmoud Zalt <mahmoud@zalt.me>"
#####################################
# Set Timezone
#####################################
@@ -15,10 +13,6 @@ COPY my.cnf /etc/mysql/conf.d/my.cnf
RUN chmod 0444 /etc/mysql/conf.d/my.cnf
RUN if [ ${MYSQL_VERSION} > '8.4.0-0.000' ]; then \
echo 'mysql_native_password=on' >> /etc/mysql/conf.d/my.cnf \
;else \
echo 'default-authentication-plugin=mysql_native_password' >> /etc/mysql/conf.d/my.cnf \
;fi
EXPOSE 3306
RUN if [ ${MYSQL_MAJOR} = '8.0' ]; then \
echo 'default-authentication-plugin=mysql_native_password' >> /etc/mysql/conf.d/my.cnf; \
fi