2021-03-19 07:39:13+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 5.7.33-1debian10 started.
2021-03-19 07:39:13+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2021-03-19 07:39:13+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 5.7.33-1debian10 started.
2021-03-19 07:39:13+00:00 [Note] [Entrypoint]: Initializing database files
2021-03-19T07:39:13.713700Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2021-03-19T07:39:13.713831Z 0 [ERROR] Can't find error-message file '/usr/share/mysql/errmsg.sys'. Check error-message file location and 'lc-messages-dir' configuration directive.
2021-03-19T07:39:14.676676Z 0 [Warning] InnoDB: New log files created, LSN=45790
2021-03-19T07:39:14.842133Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.
2021-03-19T07:39:14.908008Z 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: 344849ac-8886-11eb-a0e1-0242ac110002.
2021-03-19T07:39:14.911602Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2021-03-19T07:39:15.805183Z 0 [Warning] CA certificate ca.pem is self signed.
2021-03-19T07:39:16.084377Z 1 [Warning] root@localhost is created with an empty password ! Please consider switching off the --initialize-insecure option.
运行命令如下
docker run --name mysql01 -p 3306:3306 -v /home/mysql01/data:/var/lib/mysql -v /home/mysql01/conf:/etc/mysql/ -e MYSQL_ROOT_PASSWORD=root -d mysql:5.7.33