diff --git a/.env.example b/.env.example index 3360aae8..ee8d219c 100644 --- a/.env.example +++ b/.env.example @@ -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 diff --git a/mysql/Dockerfile b/mysql/Dockerfile index 8aadacc5..ceee011e 100644 --- a/mysql/Dockerfile +++ b/mysql/Dockerfile @@ -1,8 +1,6 @@ ARG MYSQL_VERSION FROM mysql:${MYSQL_VERSION} -LABEL maintainer="Mahmoud Zalt " - ##################################### # 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