-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Labels
questionUsability question, not directly related to an error with the imageUsability question, not directly related to an error with the image
Description
i'mtrying to run mysql using image mysql:5.7,but there is a questions like this:
here is my yaml file
version: '3'
services:
dbm1:
image: mysql:5.7
restart: on-failure
volumes:
- /data/mysql-1:/var/lib/mysql
- /opt/private/test/7200/my-1.cnf:/etc/mysql/my.cnf
- /var/log/mysql/m1:/var/log/mysql
- /opt/private/test/7200/start.sh:/usr/local/bin/docker-entrypoint.sh
container_name: "mysql1"
environment:
MYSQL_ROOT_PASSWORD: 111111
MYSQL_USER: 'root'
ports:
- "3307:3306"
privileged: true
networks:
- udp
tty: true
dbm2:
image: mysql:5.7
restart: on-failure
volumes:
- /data/mysql-2:/var/lib/mysql
- /opt/private/test/7200/my-2.cnf:/etc/mysql/mycnf
- /var/log/mysql/m2:/var/log/mysql
- /opt/private/test/7200/start.sh:/usr/local/bin/docker-entrypoint.sh
container_name: "mysql2"
environment:
MYSQL_ROOT_PASSWORD: 111111
MYSQL_USER: 'root'
ports:
- "3308:3306"
privileged: true
depends_on:
- dbm1
networks:
- udp
tty: true
networks:
udp:
driver: bridgei consult the issue #600 and #601 and #602
here is my weird question
[root@rocketmq-nameServer2 yaml]# docker-compose ps
Name Command State Ports
--------------------------------------------------------------------------------
mysql1 docker-entrypoint.sh mysqld Up 0.0.0.0:3307->3306/tcp, 33060/tcp
mysql2 docker-entrypoint.sh mysqld Up 0.0.0.0:3308->3306/tcp, 33060/tcp
[root@rocketmq-nameServer2 yaml]#
[root@rocketmq-nameServer2 yaml]# date
Sun Apr 26 15:18:25 CST 2020
[root@rocketmq-nameServer2 yaml]# date
Sun Apr 26 15:19:46 CST 2020
[root@rocketmq-nameServer2 yaml]# docker-compose ps
Name Command State Ports
-------------------------------------------------------------------------------------
mysql1 docker-entrypoint.sh mysqld Restarting
mysql2 docker-entrypoint.sh mysqld Up 0.0.0.0:3308->3306/tcp, 33060/tcp`
container mysql1 restarting again and again
here is the mysql1's log
{"log":"2020-04-26 07:18:18+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 5.7.29-1debian10 started.\r\n","stream":"stdout","time":"2020-04-26T07:18:18.373564415Z"}
{"log":"2020-04-26 07:18:18+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'\r\n","stream":"stdout","time":"2020-04-26T07:18:18.536038779Z"}
{"log":"2020-04-26 07:18:18+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 5.7.29-1debian10 started.\r\n","stream":"stdout","time":"2020-04-26T07:18:18.545050312Z"}
{"log":"2020-04-26 07:18:18+00:00 [Note] [Entrypoint]: Initializing database files\r\n","stream":"stdout","time":"2020-04-26T07:18:18.618604919Z"}
{"log":"2020-04-26 07:18:32+00:00 [Note] [Entrypoint]: Database files initialized\r\n","stream":"stdout","time":"2020-04-26T07:18:32.011677578Z"}
{"log":"2020-04-26 07:18:32+00:00 [Note] [Entrypoint]: Starting temporary server\r\n","stream":"stdout","time":"2020-04-26T07:18:32.015642608Z"}
{"log":"2020-04-26 07:18:32+00:00 [Note] [Entrypoint]: Waiting for server startup\r\n","stream":"stdout","time":"2020-04-26T07:18:32.020669149Z"}
{"log":"2020-04-26 07:19:03+00:00 [ERROR] [Entrypoint]: Unable to start server.\r\n","stream":"stdout","time":"2020-04-26T07:19:03.515616874Z"}
{"log":"2020-04-26 07:19:04+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 5.7.29-1debian10 started.\r\n","stream":"stdout","time":"2020-04-26T07:19:04.140938565Z"}
{"log":"2020-04-26 07:19:04+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'\r\n","stream":"stdout","time":"2020-04-26T07:19:04.226947775Z"}
{"log":"2020-04-26 07:19:04+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 5.7.29-1debian10 started.\r\n","stream":"stdout","time":"2020-04-26T07:19:04.234445429Z"}
{"log":"2020-04-26 07:19:07+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 5.7.29-1debian10 started.\r\n","stream":"stdout","time":"2020-04-26T07:19:07.327880962Z"}what can i do for the next step and please give me some guides
Metadata
Metadata
Assignees
Labels
questionUsability question, not directly related to an error with the imageUsability question, not directly related to an error with the image