https://blog.csdn.net/smiles13/article/details/81460617 (部分参考)
https://www.cnblogs.com/john2017/p/6269823.html (rpm 安装mysql的默认安装目录)
********************************************************
--使用rpm安装mysql的默认目录:
1、数据库目录
/var/lib/mysql/
2、配置文件
/usr/share/mysql(mysql.server命令及配置文件)
3、相关命令
/usr/bin(mysqladmin mysqldump等命令)
4、启动脚本
/etc/rc.d/init.d/(启动脚本文件mysql的目录)
*******************************************************
先查看是否安装mariadb
rpm -qa | grep mariadb
卸载 rpm -e --nodeps mariadb-libs-5.5.60-1.el7_5.x86_64
报错处理:
初始化错误:
(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.csdn.net/jacke121/article/details/79884678 打开/etc/my.cnf修改
#开启查询缓存 explicit_defaults_for_timestamp=true