I'm using laradock. when I use docker-compose up mysql
I got this error.
mysql_1 | Initializing database
mysql_1 | 2018-04-22T10:41:01.362165Z 0 [ERROR] --initialize specified but the data directory has files in it. Aborting.
mysql_1 | 2018-04-22T10:41:01.362585Z 0 [ERROR] Aborting
mysql_1 |
laradock_mysql_1 exited with code 1
I tried to add this setting on laradock/mysql/Dockerfile like this
ARG MYSQL_VERSION=latest
FROM mysql:${MYSQL_VERSION}
LABEL maintainer="Mahmoud Zalt <mahmoud@zalt.me>"
#####################################
# Set Timezone
#####################################
ARG TZ=UTC
ENV TZ ${TZ}
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN chown -R mysql:root /var/lib/mysql/
COPY my.cnf /etc/mysql/conf.d/my.cnf
CMD ["mysqld --ignore-db-dir=lost+found"]
EXPOSE 3306
but, I'm still getting above error. Do you have any idea on this solution?
Thanks,
I had a similar issue. In order to solve it, you have to
C:\\Program Files\\MySQL\\MySQL Server 5.7
data
. rename it into data1
.mysqld --initialize-insecure
.MySQL57
.MySQL
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.