YUM安装MySQL 8.0
Posted xyz叶子
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了YUM安装MySQL 8.0相关的知识,希望对你有一定的参考价值。
安装官方yum
rpm -ivh https://repo.mysql.com//mysql57-community-release-el7-9.noarch.rpm
调试yum
关闭旧版本
yum-config-manager --disable mysql57-community
开启新版本
yum-config-manager --enable mysql80-community
安装mysql8.0
yum install mysql-community-server -y
安装完毕,启动mysql服务
systemctl start mysqld
第一次登陆,系统生成一个零时密码
grep \'temporary password\' /var/log/mysqld.log
更新密码
ALTER USER \'root\'@\'localhost\' IDENTIFIED BY \'MyNewPass4!\';
yum安装mysql5.5
今天早上到公司,想起昨天遇到到一个数据库字符集的问题,果断把服务器上的mysql删掉了,然后装mysql的步骤如下:
1,导入第三方源
rpm -Uvh http://repo.webtatic.com/yum/centos/5/latest.rpm
2,如果安装了低版本的mysql,删除
yum remove mysql mysql-*
3,安装libmysqlclient15
yum install libmysqlclient15 —enablerepo=webtatic
4,安装mysql5.5
yum install mysql55 mysql55-server -enalerepo=webtatic
在这一步的时候出现了如下错误:
Error: mysql55w-libs conflicts with mysql-libs-5.1.73-3.el6_5.x86_64
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles —nodigest
根据提示,在4的安装语句后添加参数—ship-broken此时仍然有错:
Processing Conflict: mysql55w-libs-5.5.40-1.w5.x86_64 conflicts mysql-libs < 5.5
Packages skipped because of dependency problems:
mysql-libs-5.1.73-3.el6_5.x86_64 from base
mysql55w-5.5.40-1.w5.x86_64 from webtatic
mysql55w-libs-5.5.40-1.w5.x86_64 from webtatic
mysql55w-server-5.5.40-1.w5.x86_64 from webtatic
perl-DBD-MySQL-4.013-3.el6.x86_64 from base
根据错误,应该时mysql-libs-5.1.73.el6_5.x86_64这个库版本低所致,然而用命令rpm -e mysql-libs-5.1.73-3.el6_5.x86_64 —nodeps删除时,却提示该包没有安装error: package mysql-libs-5.1.73-3.el6_5.x86_64 is not installed,一下就醉了!!!
同样遇到这个问题,我也是醉了我以前是这样解决的如果报错:Error:mysql55-libsconflictswithmysql-libs-5.1.71-1.el6.x86_64wgetftp://mirror.switch.ch/pool/1/mirror/mysql/Downloads/MySQL-6.0/MySQL-shared-compat-6.0.11-0.glibc23.x86_64.rpmrpm-ihvMySQL-shared-compat-6.0.11-0.glibc23.x86_64.rpm文件MySQL-shared-compat-6.0.11-0.glibc23.x86_64.rpm如何无法下载:参照此
以上是关于YUM安装MySQL 8.0的主要内容,如果未能解决你的问题,请参考以下文章