[英]How to resolve --initialize specified but the data directory has files in it. on laradock mysql container
I'm using laradock.我正在使用 laradock。 when I use
docker-compose up mysql
I got this error.当我使用
docker-compose up mysql
出现此错误。
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我试图像这样在 laradock/mysql/Dockerfile 上添加这个设置
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
C:\\Program Files\\MySQL\\MySQL Server 5.7
data
.data
的文件夹。 rename it into data1
.data1
。mysqld --initialize-insecure
.mysqld --initialize-insecure
。MySQL57
.MySQL57
。MySQL
MySQL
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.