sameersbn / docker-mysql

A Dockerfile that installs a mysql server
MIT License
246 stars 174 forks source link

Access denied for user 'root'@'localhost' (using password: NO) #31

Closed husseinelhussein closed 6 years ago

husseinelhussein commented 6 years ago

thank you for this image. i avoided using this image with docker-compose just to avoid the hassle of configuring remote access, so i combined this image with my own image in dockerfile like this:

ENV MYSQL_USER=mysql \
    MYSQL_DATA_DIR=/var/lib/mysql \
    MYSQL_RUN_DIR=/run/mysqld \
    MYSQL_LOG_DIR=/var/log/mysql

RUN apt-get update \
 && DEBIAN_FRONTEND=noninteractive apt-get install -y mysql-server \
 && rm -rf ${MYSQL_DATA_DIR} \
 && rm -rf /var/lib/apt/lists/*

COPY mysql_entrypoint.sh /sbin/mysql_entrypoint.sh

and i start mysql server from supervisord:

[program:mysql]
command=/sbin/mysql_entrypoint.sh
autostart=true
autorestart=true

this is used to work, but docker crashed and after recreating the image i can't connect to mysql, it's asking for password if there is a password what it is?:

additional info: docker image: ubuntu:16.04 using docker for windows