Linux 安装 MySQL 常见问题 [ 奇巧淫技 ]
大数据男孩 文章 正文
明妃
{{nature("2022-08-14 17:23:14")}}更新安装 MySQL-server 出现如下
[root@master mysql]# rpm -ivh MySQL-server-5.6.24-1.el6.x86_64.rpm
准备中... ################################# [100%]
file /usr/share/mysql/charsets/README from install of MySQL-server-5.6.24-1.el6.x86_64 conflicts with file from package mariadb-libs-1:5.5.64-1.el7.x86_64
file /usr/share/mysql/czech/errmsg.sys from install of MySQL-server-5.6.24-1.el6.x86_64 conflicts with file from package mariadb-libs-1:5.5.64-1.el7.x86_64
file /usr/share/mysql/danish/errmsg.sys from install of MySQL-server-5.6.24-1.el6.x86_64 conflicts with file from package mariadb-libs-1:5.5.64-1.el7.x86_64
file /usr/share/mysql/dutch/errmsg.sys from install of MySQL-server-5.6.24-1.el6.x86_64 conflicts with file from package mariadb-libs-1:5.5.64-1.el7.x86_64
file /usr/share/mysql/english/errmsg.sys from install of MySQL-server-5.6.24-1.el6.x86_64 conflicts with file from package mariadb-libs-1:5.5.64-1.el7.x86_64
...
...
原因是系统已经安装了其他版本的mysql-libs包导致不兼容。可以使用命令查看yum list | grep mysql,查看之前安装的mysql的信息
将之前的mysql的lib包删除了即可,删除mysql-libs
yum remove mysql-libs
安装 MySQL 没有临时密码
centos7 通过yum装完 mysql 5.7 ,找不到root密码
原因是原来安装过mysql残留有数据
# 第一步 删除残留文件
[root@master ~]rm -rf /var/lib/mysql
# 第二部 启动MySQL服务
[root@master ~]systemctl restart mysqld
# 查看密码
[root@master ~]grep 'temporary password' /var/log/mysqld.log
{{nature('2020-01-02 16:47:07')}} {{format('12641')}}人已阅读
{{nature('2019-12-11 20:43:10')}} {{format('9526')}}人已阅读
{{nature('2019-12-26 17:20:52')}} {{format('7572')}}人已阅读
{{nature('2019-12-26 16:03:55')}} {{format('5017')}}人已阅读
目录
标签云
一言
评论 0
{{userInfo.data?.nickname}}
{{userInfo.data?.email}}