centos7使用rpm方式安装mysql

时间:2023-03-08 17:40:55

https://blog.****.net/smiles13/article/details/81460617    (部分参考)

先查看是否安装mariadb

rpm -qa | grep mariadb

卸载   rpm -e --nodeps mariadb-libs-5.5.60-1.el7_5.x86_64

报错处理:

初始化错误:

centos7使用rpm方式安装mysql

(1)  [ERROR] --initialize specified but the data directory has files in it. Aborting.                 https://www.jianshu.com/p/96ba3424e23c

根据my.cnf 清空目录  rm -rf /var/lib/mysql

(2) [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).

https://blog.****.net/jacke121/article/details/79884678         打开/etc/my.cnf修改

#开启查询缓存 explicit_defaults_for_timestamp=true