Skip to content

Conversation

@agussetyar
Copy link

Hi, I'm trying to run this container and get that mysql is not running properly.

found the following error:

topix@2cdbed108f4b:~$ sudo tail -n 50 /var/log/mysql/error.log
2022-04-26T03:23:02.043684Z 0 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
2022-04-26T03:23:02.043717Z 0 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
2022-04-26T03:23:02.043803Z 0 [Note] Server socket created on IP: '0.0.0.0'.
2022-04-26T03:23:02.043900Z 0 [ERROR] Could not create unix socket lock file /var/run/mysqld/mysqld.sock.lock.
2022-04-26T03:23:02.043935Z 0 [ERROR] Unable to setup unix socket lock file.
2022-04-26T03:23:02.043962Z 0 [ERROR] Aborting

2022-04-26T03:23:02.043995Z 0 [Note] Binlog end
2022-04-26T03:23:02.044111Z 0 [Note] Shutting down plugin 'ngram'
2022-04-26T03:23:02.044138Z 0 [Note] Shutting down plugin 'ARCHIVE'
2022-04-26T03:23:02.044154Z 0 [Note] Shutting down plugin 'BLACKHOLE'
2022-04-26T03:23:02.044170Z 0 [Note] Shutting down plugin 'partition'
2022-04-26T03:23:02.044185Z 0 [Note] Shutting down plugin 'CSV'

Then, I tried to add a little command to the Dockerfile like this:

...
RUN mkdir /var/run/sshd
RUN mkdir /var/run/mysqld
...
# mysql config
...
RUN chown mysql:mysql /var/run/mysqld
...
# volume for mysql database and install
VOLUME ["/var/lib/mysql", "/usr/share/nginx/www", "/var/run/sshd", "/var/run/mysqld"]

And everything went good.

@agussetyar agussetyar closed this by deleting the head repository Aug 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant