2

I have a vm created with azure docker ce template. When I run a mysql container with command docker run --name mysql --privileged=true -v /home/docker/mysql:/var/lib/mysql -e MYSQL_ROOT_PASSWORD="password" -d mysql:5.7. It keep failed.

When I run docker logs mysql, I can get following messages:

Initializing database

2019-02-21T14:21:49.780420Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).

2019-02-21T14:21:50.075660Z 0 [Warning] InnoDB: New log files created, LSN=45790 2019-02-21T14:21:50.148855Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.

2019-02-21T14:21:50.544693Z 0 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: 07752ed0-35e4-11e9-8ebf-0242ac110003.

2019-02-21T14:21:50.550825Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.

2019-02-21T14:21:50.551404Z 1 [Warning] root@localhost is created with an empty password ! Please consider switching off the --initialize-insecure option.

2019-02-21T14:21:51.310662Z 1 [Warning] 'user' entry 'root@localhost' ignored in --skip-name-resolve mode. 2019-02-21T14:21:51.310747Z 1 [Warning] 'user' entry 'mysql.session@localhost' ignored in --skip-name-resolve mode.

2019-02-21T14:21:51.310765Z 1 [Warning] 'user' entry 'mysql.sys@localhost' ignored in --skip-name-resolve mode.

2019-02-21T14:21:51.310797Z 1 [Warning] 'db' entry 'performance_schema mysql.session@localhost' ignored in --skip-name-resolve mode.

2019-02-21T14:21:51.310814Z 1 [Warning] 'db' entry 'sys mysql.sys@localhost' ignored in --skip-name-resolve mode.

2019-02-21T14:21:51.310826Z 1 [Warning] 'proxies_priv' entry '@ root@localhost' ignored in --skip-name-resolve mode.

2019-02-21T14:21:51.310873Z 1 [Warning] 'tables_priv' entry 'user mysql.session@localhost' ignored in --skip-name-resolve mode.

2019-02-21T14:21:51.310887Z 1 [Warning] 'tables_priv' entry 'sys_config mysql.sys@localhost' ignored in --skip-name-resolve mode. Database initialized Initializing certificates Generating a RSA private key ..................................+++++ ........................................................+++++ unable to write 'random state' writing new private key to 'ca-key.pem' ----- Generating a RSA private key .................................+++++ ..........+++++ unable to write 'random state' writing new private key to 'server-key.pem' ----- Generating a RSA private key ..+++++ ...............................................................+++++ unable to write 'random state' writing new private key to 'client-key.pem' ----- Certificates initialized MySQL init process in progress... 2019-02-21T14:21:56.310409Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). 2019-02-21T14:21:56.330455Z 0 [Note] mysqld (mysqld 5.7.25) starting as process 88 ... 2019-02-21T14:21:56.354884Z 0 [Note] InnoDB: PUNCH HOLE support available 2019-02-21T14:21:56.354945Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins 2019-02-21T14:21:56.354958Z 0 [Note] InnoDB: Uses event mutexes 2019-02-21T14:21:56.354968Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier

2019-02-21T14:21:56.354976Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.11

2019-02-21T14:21:56.354984Z 0 [Note] InnoDB: Using Linux native AIO

2019-02-21T14:21:56.355744Z 0 [Note] InnoDB: Number of pools: 1

2019-02-21T14:21:56.356546Z 0 [Note] InnoDB: Using CPU crc32 instructions

2019-02-21T14:21:56.369564Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M

2019-02-21T14:21:56.418677Z 0 [Note] InnoDB: Completed initialization of buffer pool 2019-02-21T14:21:56.439895Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().

2019-02-21T14:21:56.458773Z 0 [Note] InnoDB: Highest supported file format is Barracuda. 2019-02-21T14:21:56.522856Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables

2019-02-21T14:21:56.526137Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...

2019-02-21T14:21:56.556301Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB. 2019-02-21T14:21:56.566414Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.

2019-02-21T14:21:56.566457Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active. 2019-02-21T14:21:56.575330Z 0 [Note] InnoDB: Waiting for purge to start 2019-02-21T14:21:56.733814Z 0 [Note] InnoDB: Waiting for purge to start 2019-02-21T14:21:56.861939Z 0 [Note] InnoDB: Waiting for purge to start 2019-02-21T14:21:57.008155Z 0 [Note] InnoDB: Waiting for purge to start

2019-02-21T14:21:57.234143Z 0 [Note] InnoDB: 5.7.25 started; log sequence number 2524141 2019-02-21T14:21:57.563290Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool

2019-02-21T14:21:57.747294Z 0 [Note] Plugin 'FEDERATED' is disabled. /usr/local/bin/docker-entrypoint.sh: line 125: 88 Killed
"$@" --skip-networking --socket="${SOCKET}"

MySQL init process in progress...

MySQL init process in progress... MySQL init process in progress...

MySQL init process in progress... MySQL init process in progress...

MySQL init process in progress... MySQL init process in progress...

MySQL init process in progress... MySQL init process in progress...

MySQL init process in progress... MySQL init process in progress...

MySQL init process in progress...

MySQL init process failed.

YonF
  • 641
  • 5
  • 20
  • My hypothesis: `unable to write 'random state' writing new private key to 'client-key.pem'` is indication of problem with access rights. Look at [using-openssl-what-does-unable-to-write-random-state-mean](https://stackoverflow.com/questions/94445/using-openssl-what-does-unable-to-write-random-state-mean). Recomendation is to remove `.rnd` file in home directory. In your case it must be the $HOME of user `mysql`. Can you check this hypothesis? – Alex Yu Feb 21 '19 at 16:09
  • @AlexYu, finally, I increase my azure vm with more memory, then run the container successfully. – YonF Feb 22 '19 at 09:03

0 Answers0