yum安装MySQL5.6

xiaoxiao2021-02-28  21


从MySQL开发者网站下载yum仓库文件

rpm -ivh https://dev.mysql.com/get/mysql57-community-release-el7-11.noarch.rpm


检测是否存在mysql的repo

yum repolist enabled | grep mysql [root@localhost yum.repos.d]# yum repolist enabled | grep mysql Repository base is listed more than once in the configuration Repository updates is listed more than once in the configuration Repository extras is listed more than once in the configuration Repository centosplus is listed more than once in the configuration mysql-connectors-community/x86_64 MySQL Connectors Community 42 mysql-tools-community/x86_64 MySQL Tools Community 51 mysql57-community/x86_64 MySQL 5.7 Community Server 207 这里默认是mysql5.7的版本,我们现在改为5.6 vi /etc/yum.repos.d/mysql-community.repo

保存退出


安装

yum -y install mysql-community-server


相关命令

//_启动 systemctl start mysqld.service //_停止 systemctl stop mysqld.service //_加入自启动 systemctl enable mysqld.service


默认目录、文件

默认配置文件 /etc/my.cnf 默认数据目录 /var/lib/mysql 其它目录及文件 /usr/bin/mysql /usr/lib64/mysql /usr/share/mysql /etc/logrotate.d/mysql
转载请注明原文地址: https://www.6miu.com/read-1000225.html

最新回复(0)