加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Linux > 正文

linux下初始化mysql时报错

发布时间:2020-12-14 01:32:01 所属栏目:Linux 来源:网络整理
导读:执行mysqld --initialize后报错 报错内容: 019-04-24 18:07:59 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). 2019-04-24 18:07:

执行mysqld --initialize后报错

报错内容:

019-04-24 18:07:59 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2019-04-24 18:07:59 0 [Note] mysqld (mysqld 5.6.43) starting as process 16404 ...
2019-04-24 18:07:59 16404 [ERROR] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!

2019-04-24 18:07:59 16404 [ERROR] Aborting

2019-04-24 18:07:59 16404 [Note] Binlog end
2019-04-24 18:07:59 16404 [Note] mysqld: Shutdown complete

?

解决办法:

使用vi /etc/my.cnf ,加上两行:

explicit_defaults_for_timestamp=true

user=mysql ? ? ? ? ? ? ? ? ? ? ? ? ?(指定mysql用户来启动mysql服务)

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读