当前位置:Gxlcms > 数据库问题 > CentOS7下yum安装mysql5.6

CentOS7下yum安装mysql5.6

时间:2021-07-01 10:21:17 帮助过:200人阅读

由于CentOS7默认的数据库yum源切换成了MariaDB,需要手动设置yum源才可安装mysql。


1、安装yum源

# rpm -Uvh http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm


2、检测可用的yum源

# yum repolist enabled | grep "mysql.*-community.*"

mysql-connectors-community/x86_64 MySQL Connectors Community

mysql-tools-community/x86_64      MySQL Tools Community

mysql56-community/x86_64          MySQL 5.6 Community Server


3、yum安装mysql

# yum -y install mysql-community-server


4、加入开机启动

# systemctl enable mysqld


5、启动mysqld

# systemctl start mysqld

CentOS7下yum安装mysql5.6

标签:mysql   yum   centos7   

人气教程排行