资讯

展开

centos7安装mysql5.x

作者:快盘下载 人气:
.rpm -qa | grep mysql

qt-mysql-4.8.5-11.el7.x86_64
pcp-pmda-mysql-3.10.6-2.el7.x86_64
akonadi-mysql-1.9.2-4.el7.x86_64



2.卸载上面三个包

rpm -e akonadi-mysql

rpm -e qt-mysql
rpm -e pcp-pmda-mysql




强制卸载,添加--nodeps

例如: rpm -e --nodeps akonadi-mysql


3 rpm -qa | grep mariadb
#列出所有被安装的rpm package



4.删除所有第三步列出的包




5.CentOS 7的yum源中貌似没有正常安装mysql时的mysql-sever文件,需要去官网上下载

# wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
# rpm -ivh mysql-community-release-el7-5.noarch.rpm
# yum install mysql-community-server
成功安装之后重启mysql服务

# service mysqld restart
初次安装mysql是root账户是没有密码的

设置密码的方法

# mysql -uroot
mysql> set password for ‘root’@‘localhost’ = password('root');
mysql> exit


​6.报错信息​



Error downloading packages:
mysql-community-libs-5.6.30-2.el7.x86_64: [Errno 256] No more mirrors to try.


yum list | grep mysql



mysql-community-embedded-devel.i686     5.6.30-2.el7                   mysql56-community
mysql-community-embedded-devel.x86_64 5.6.30-2.el7 mysql56-community
mysql-community-libs.i686 5.6.30-2.el7 mysql56-community
mysql-community-libs.x86_64 5.6.30-2.el7 mysql56-community
mysql-community-server.x86_64 5.6.30-2.el7 mysql56-community
mysql-community-test.x86_64 5.6.30-2.el7 mysql56-community


yum install mysql-community-libs.x86_64

加载全部内容

相关教程
猜你喜欢
用户评论
快盘暂不提供评论功能!