centos8 yum 安装 mysql 8

2021-04-03  本文已影响0人  不知不怪

1 准备

VMware Workstation Pro 15.5
全新安装的CentOS-8.3.2011-x86_64-minimal

yum install wget -y

2下载安装mysql yum源:

wget https://repo.mysql.com//mysql80-community-release-el8-1.noarch.rpm
rpm -ivh mysql80-community-release-el8-1.noarch.rpm

3 安装服务 启服务

yum install mysql-server -y
systemctl start mysqld

4查看版本 初始化MySQL

mysqld --initialize
mysqladmin --version

5 登录 建用户 授权 刷新权限(密码为空)

mysql -u root -p
create user 'gzz'@'%' identified  WITH mysql_native_password by 'gzz';
grant all privileges on *.* to 'gzz'@'%';
flush privileges; 
exit;

6 关防火墙 客户端连接

systemctl stop firewalld
image.png
上一篇下一篇

猜你喜欢

热点阅读