centos7使用rpm方式安装mysql

Posted on   风行天下-2080  阅读(126)  评论(0编辑  收藏  举报

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

 

编辑推荐:
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
阅读排行:
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· 单线程的Redis速度为什么快?

随笔 - 618, 文章 - 0, 评论 - 6, 阅读 - 37万

Copyright © 2025 风行天下-2080
Powered by .NET 9.0 on Kubernetes

点击右上角即可分享
微信分享提示