mysql 5.6.37 初始化_使用MySQL官方镜像,初始化/docker-entrypoint-initdb.d/sql文件时间太长的问题...

dockerfile:

FROM mysql:5.6.37

ENV TZ "Asia/Shanghai"

ENV MYSQL_ROOT_PASSWORD=test@2017

ADD binlog.cnf /etc/mysql/conf.d

ADD init.sql /docker-entrypoint-initdb.d/

EXPOSE 22 3306

~

容器启动,随后mysql启动后,有些sql执行时间甚至达到了7分钟,是什么原因

docker logs如下

2017-08-21 12:35:42 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).

2017-08-21 12:35:42 0 [Note] Ignoring --secure-file-priv value as server is running with --bootstrap.

2017-08-21 12:35:42 0 [Note] /usr/sbin/mysqld (mysqld 5.6.37-log) starting as process 37 ...

[root@hub rent_plat]# docker logs 82e2e44114bf47422dcdb89b5a01d43c7037fa91a35644236899e89f38ef9b28

Initializing database

2017-08-21 12:35:42 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).

2017-08-21 12:35:42 0 [Note] Ignoring --secure-file-priv value as server is running with --bootstrap.

2017-08-21 12:35:42 0 [Note] /usr/sbin/mysqld (mysqld 5.6.37-log) starting as process 37 ...

2017-08-21 12:35:59 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).

2017-08-21 12:35:59 0 [Note] Ignoring --secure-file-priv value as server is running with --bootstrap.

2017-08-21 12:35:59 0 [Note] /usr/sbin/mysqld (mysqld 5.6.37-log) starting as process 60 ...

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !

To do so, start the server, then issue the following commands:

/usr/bin/mysqladmin -u root password 'new-password'

/usr/bin/mysqladmin -u root -h 82e2e44114bf password 'new-password'

Alternatively you can run:

/usr/bin/mysql_secure_installation

which will also give you the option of removing the test

databases and anonymous user created by default. This is

strongly recommended for production servers.

See the manual for more instructions.

Please report any problems at http://bugs.mysql.com/

The latest information about MySQL is available on the web at

http://www.mysql.com

Support MySQL by buying support/licenses at http://shop.mysql.com

Note: new default config file not created.

Please make sure your config file is current

WARNING: Default config file /etc/mysql/my.cnf exists on the system

This file will be read by default by the MySQL server

If you do not want to use this, either remove it, or use the

--defaults-file argument to mysqld_safe when starting the server

Database initialized

MySQL init process in progress...

2017-08-21 12:37:35 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).

2017-08-21 12:37:35 0 [Note] mysqld (mysqld 5.6.37-log) starting as process 88 ...```

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值