rpm安装mysql5.7 启动报错

系统:centos6.8

mysql版本:5.7.38

安装完成之后,启动mysql。

service mysqld start

启动报错

[root@localhost ~]# service mysqld start
Initializing MySQL database:                               [FAILED]

修改配置文件,添加如下配置

explicit_defaults_for_timestamp=true

重新启动mysql,启动正常。

在启动日志中,有root初始密码/var/log/mysqld.log

2021-10-25T03:47:00.147560Z 0 [Warning] CA certificate ca.pem is self signed.
2021-10-25T03:47:00.192631Z 1 [Note] A temporary password is generated for root@localhost: toMEhvJnn3%w

mysql -uroot -ptoMEhvJnn3%w

修改密码

mysql> set password for 'root'@'localhost'=password('111111');

参考文档&感谢 https://blog.csdn.net/weixin_39851809/article/details/114976987

posted @ 2022-06-16 16:43  wazz_s  阅读(544)  评论(0编辑  收藏  举报