yum安装MySQL5.6


从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

更改enabled

 保存退出



安装

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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值