rhel7.5安装mysql8.0教程_rhel7.5上通过yum安装 mysql8.0.11

rhel7.5上通过yum安装 mysql8.0.11

1.增加 MySQL Yum Repository

到以下位置去下载 MySQL Yum Repository 包

https://dev.mysql.com/downloads/repo/yum/

Red Hat Enterprise Linux 7 / Oracle Linux 7 (Architecture Independent), RPM Package         25.2K

(mysql80-community-release-el7-1.noarch.rpm)

下载 MySQL Yum Repository

安装 MySQL Yum Repository

yum localinstall mysql80-community-release-el7-1.noarch.rpm

2.检查成功安装的mysql yum仓库

[root@dbserver ~]# yum repolist enabled | grep "mysql.*-community.*"

mysql-connectors-community/x86_64       MySQL Connectors Community           51

mysql-tools-community/x86_64            MySQL Tools Community                63

mysql80-community/x86_64                MySQL 8.0 Community Server           17

3.Installing MySQL

yum install mysql-community-server

mysql-community-server:MySQL server

mysql-community-client:MySQL client

mysql-community-common:common error messages and character sets for client and server

mysql-community-libs:  shared client libraries.

===================                                ==================           =======================

Package                                           Arch                         Version

Installing:

mysql-community-libs                              x86_64                       8.0.11-1.el7

mysql-community-libs-compat                       x86_64                       8.0.11-1.el7                        mysql-community-server                            x86_64                       8.0.11-1.el7

Installing for dependencies:

mysql-community-client                            x86_64                       8.0.11-1.el7

mysql-community-common                            x86_64                       8.0.11-1.el7

4.启动 MySQL Server

systemctl start mysqld

--查找root的密码:

grep 'temporary password' /var/log/mysqld.log

--修改root的密码

ALTER USER 'root'@'localhost' IDENTIFIED BY 'MySztech123!';

-- allow remote client access mysql.

UPDATE user SET Host='%' WHERE User='root' AND Host='localhost' LIMIT 1;

5.安装其他mysql

yum install mysql-workbench-community

需要注意,rhel7.5默认是开启了防火墙。

因此,如果需要远程访问,需要设置防火墙,运行mysql

firewall-cmd --permanent --add-service=mysql

firewall-cmd --reload

firewall-cmd --list-all

就可以了。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值