Centos yum 安装配置mysql

xiaoxiao2025-11-04  21

安装

1. yum -y install wget

2.wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm

3.rpm -ivh mysql-community-release-el7-5.noarch.rpm

4.yum install mysql-server

部署

mysql -u root -p  // 登录mysql

grant all privileges on *.* to 'root'@'%' identified by 'root' with grant option // 开启远程访问 %标识全部 也可以写IP root是远程访问密码

flush privileges //重载权限

exit //退出

systemctl start mysqld.service //开启

systemctl stop mysqld.service //停止

systemctl restart mysqld.service //重启

 

转载请注明原文地址: https://www.6miu.com/read-5039043.html

最新回复(0)