Linux yum 命令安装mysql8.0的教程详解
一 ,做好安装前的清理工作
rpm -pa | grep mysql 或者 rpm -qa | grep -i mysql yum remove mysql-xxx-xxx find / -name mysql rm -rf /xxx/xxx/xxx
二 , 下载对应的安装包
下载链接:https://dev.mysql.com/downloads/repo/yum/
三 , 安装mysql
执行rpm文件
rpm -ivh mysql57-community-release-el7-11.noarch.rpm
安装mysql
yum install mysql-community-server
启动mysql服务
serivce mysql start
获取初始化密码
cat /var/log/mysqld.log | grep password
进入数据库修改密码
mysql -uroot -p ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPass4!';
开启远程访问
use mysql; update user set host='%' where user='root';
开放3306端口号
vim /etc/sysconfig/iptables -A INPUT -p tcp -m state --state NEW -m tcp --dport 3306 -j ACCEPT service iptables restart
总结
相关推荐
lpfvip00 2020-10-07
emmm00 2020-11-17
王艺强 2020-11-17
aydh 2020-11-12
世樹 2020-11-11
zry 2020-11-11
URML 2020-11-11
spurity 2020-11-10
yifangs 2020-10-13
Andrea0 2020-09-18
Ida 2020-09-16
ltd00 2020-09-12
tufeiax 2020-09-03
xjd0 2020-09-10
greatboylc 2020-09-10
adsadadaddadasda 2020-09-08
疯狂老司机 2020-09-08
CoderToy 2020-11-16
ribavnu 2020-11-16