Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Everything was working fine but now mysql container stopped loading

MySQL container stopped working with the following error

2022-07-25 05:49:39+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 5.7.38-1.el7 started.


2022-07-25 05:49:29+00:00 [ERROR] [Entrypoint]: mysqld failed while attempting to check config

command was: mysqld --verbose --help --log-bin-index=/tmp/tmp.65FVzPwuJc

mysqld: Can't read dir of '/etc/mysql/conf.d/' (Errcode: 2 - No such file or directory)

mysqld: [ERROR] Fatal error in defaults handling. Program aborted!

2022-07-25 05:49:30+00:00 [ERROR] [Entrypoint]: mysqld failed while attempting to check config

command was: mysqld --verbose --help --log-bin-index=/tmp/tmp.ajfFuCwWO2

mysqld: Can't read dir of '/etc/mysql/conf.d/' (Errcode: 2 - No such file or directory)

mysqld: [ERROR] Fatal error in defaults handling. Program aborted!

2022-07-25 05:49:31+00:00 [ERROR] [Entrypoint]: mysqld failed while attempting to check config

command was: mysqld --verbose --help --log-bin-index=/tmp/tmp.r2VhkPXFTo

mysqld: Can't read dir of '/etc/mysql/conf.d/' (Errcode: 2 - No such file or directory)

mysqld: [ERROR] Fatal error in defaults handling. Program aborted!

2022-07-25 05:49:32+00:00 [ERROR] [Entrypoint]: mysqld failed while attempting to check config

command was: mysqld --verbose --help --log-bin-index=/tmp/tmp.WQtqKImJb9

mysqld: Can't read dir of '/etc/mysql/conf.d/' (Errcode: 2 - No such file or directory)

mysqld: [ERROR] Fatal error in defaults handling. Program aborted!

2022-07-25 05:49:33+00:00 [ERROR] [Entrypoint]: mysqld failed while attempting to check config

command was: mysqld --verbose --help --log-bin-index=/tmp/tmp.g3TwpP1UTD

mysqld: Can't read dir of '/etc/mysql/conf.d/' (Errcode: 2 - No such file or directory)

mysqld: [ERROR] Fatal error in defaults handling. Program aborted!

2022-07-25 05:49:35+00:00 [ERROR] [Entrypoint]: mysqld failed while attempting to check config

command was: mysqld --verbose --help --log-bin-index=/tmp/tmp.bYM72tNNGe

mysqld: Can't read dir of '/etc/mysql/conf.d/' (Errcode: 2 - No such file or directory)

mysqld: [ERROR] Fatal error in defaults handling. Program aborted!

2022-07-25 05:49:39+00:00 [ERROR] [Entrypoint]: mysqld failed while attempting to check config

command was: mysqld --verbose --help --log-bin-index=/tmp/tmp.mKxwQLM0KK

mysqld: Can't read dir of '/etc/mysql/conf.d/' (Errcode: 2 - No such file or directory)

mysqld: [ERROR] Fatal error in defaults handling. Program aborted!

2022-07-25 05:49:46+00:00 [ERROR] [Entrypoint]: mysqld failed while attempting to check config

command was: mysqld --verbose --help --log-bin-index=/tmp/tmp.Yr61rYdopx

mysqld: Can't read dir of '/etc/mysql/conf.d/' (Errcode: 2 - No such file or directory)

mysqld: [ERROR] Fatal error in defaults handling. Program aborted!

2022-07-25 05:49:59+00:00 [ERROR] [Entrypoint]: mysqld failed while attempting to check config

command was: mysqld --verbose --help --log-bin-index=/tmp/tmp.lS7uWfBwrF

mysqld: Can't read dir of '/etc/mysql/conf.d/' (Errcode: 2 - No such file or directory)

mysqld: [ERROR] Fatal error in defaults handling. Program aborted!

2022-07-25 05:50:26+00:00 [ERROR] [Entrypoint]: mysqld failed while attempting to check config

command was: mysqld --verbose --help --log-bin-index=/tmp/tmp.qYyq42iXh7

mysqld: Can't read dir of '/etc/mysql/conf.d/' (Errcode: 2 - No such file or directory)

mysqld: [ERROR] Fatal error in defaults handling. Program aborted!

2022-07-25 05:51:17+00:00 [ERROR] [Entrypoint]: mysqld failed while attempting to check config

command was: mysqld --verbose --help --log-bin-index=/tmp/tmp.4NqYMZzuCl

mysqld: Can't read dir of '/etc/mysql/conf.d/' (Errcode: 2 - No such file or directory)

mysqld: [ERROR] Fatal error in defaults handling. Program aborted!

2022-07-25 05:52:18+00:00 [ERROR] [Entrypoint]: mysqld failed while attempting to check config

command was: mysqld --verbose --help --log-bin-index=/tmp/tmp.yO8qi4Zw29

mysqld: Can't read dir of '/etc/mysql/conf.d/' (Errcode: 2 - No such file or directory)

mysqld: [ERROR] Fatal error in defaults handling. Program aborted!

2022-07-25 05:53:18+00:00 [ERROR] [Entrypoint]: mysqld failed while attempting to check config

command was: mysqld --verbose --help --log-bin-index=/tmp/tmp.EXAH4JSjZh

mysqld: Can't read dir of '/etc/mysql/conf.d/' (Errcode: 2 - No such file or directory)

mysqld: [ERROR] Fatal error in defaults handling. Program aborted!

2022-07-25 05:54:19+00:00 [ERROR] [Entrypoint]: mysqld failed while attempting to check config

command was: mysqld --verbose --help --log-bin-index=/tmp/tmp.QoawKu8pPd

mysqld: Can't read dir of '/etc/mysql/conf.d/' (Errcode: 2 - No such file or directory)

mysqld: [ERROR] Fatal error in defaults handling. Program aborted!

2022-07-25 05:55:20+00:00 [ERROR] [Entrypoint]: mysqld failed while attempting to check config

command was: mysqld --verbose --help --log-bin-index=/tmp/tmp.7mtfUsLfIz

mysqld: Can't read dir of '/etc/mysql/conf.d/' (Errcode: 2 - No such file or directory)

mysqld: [ERROR] Fatal error in defaults handling. Program aborted!

2022-07-25 05:56:20+00:00 [ERROR] [Entrypoint]: mysqld failed while attempting to check config

command was: mysqld --verbose --help --log-bin-index=/tmp/tmp.0UATJ0X9uS

mysqld: Can't read dir of '/etc/mysql/conf.d/' (Errcode: 2 - No such file or directory)

mysqld: [ERROR] Fatal error in defaults handling. Program aborted!

2022-07-25 05:57:21+00:00 [ERROR] [Entrypoint]: mysqld failed while attempting to check config

command was: mysqld --verbose --help --log-bin-index=/tmp/tmp.boQ221TODc

mysqld: Can't read dir of '/etc/mysql/conf.d/' (Errcode: 2 - No such file or directory)

mysqld: [ERROR] Fatal error in defaults handling. Program aborted!

2022-07-25 05:58:21+00:00 [ERROR] [Entrypoint]: mysqld failed while attempting to check config

command was: mysqld --verbose --help --log-bin-index=/tmp/tmp.iu5S6zgQfN

mysqld: Can't read dir of '/etc/mysql/conf.d/' (Errcode: 2 - No such file or directory)

mysqld: [ERROR] Fatal error in defaults handling. Program aborted!

2022-07-25 05:59:22+00:00 [ERROR] [Entrypoint]: mysqld failed while attempting to check config

command was: mysqld --verbose --help --log-bin-index=/tmp/tmp.bhq2Crwhnp

mysqld: Can't read dir of '/etc/mysql/conf.d/' (Errcode: 2 - No such file or directory)

mysqld: [ERROR] Fatal error in defaults handling. Program aborted!


2022-07-25 05:59:22+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 5.7.38-1.el7 started.
like image 818
Amitesh Bharti Avatar asked Nov 29 '25 17:11

Amitesh Bharti


1 Answers

mysql:
    container_name: docker.mysql57.internal
    image: mysql:5.7
    restart: always
    environment:
      MYSQL_ROOT_PASSWORD: '*****'
    ports:
      - '3306:3306'
    expose:
      - '3306'
    volumes:
      - ~/code/docker-development/logs/mysql:/var/log/mysql
      - ~/code/docker-development/mysql/config:/etc/mysql

Replace the last line with

      - ~/code/docker-development/mysql/config:/etc/mysql/conf.d/**

followed by docker-compose up

like image 184
Amitesh Bharti Avatar answered Dec 01 '25 08:12

Amitesh Bharti



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!