CentOS8下安装mysql8

CentOS8下安装mysql8

安装Yum Repository

[[email protected] ~]# wget https://repo.mysql.com//mysql80-community-release-el8-1.noarch.rpm

 

使用rpm来安装MySQL
[[email protected] ~]# rpm -ivh mysql80-community-release-el8-1.noarch.rpm

 

使用yum安装mysql服务

[[email protected] ~]

 

检查是否已经设置为开机启动MySQL服务
[[email protected] ~]# systemctl list-unit-files|grep mysqld
mysqld.service disabled
[email protected] disabled

[[email protected] ~]# systemctl enable mysqld.service   #设置开机启动
Created symlink /etc/systemd/system/multi-user.target.wants/mysqld.service → /usr/lib/systemd/system/mysqld.service.
[[email protected] ~]# systemctl list-unit-files|grep mysqld
mysqld.service enabled
[email protected] disabled

 

[[email protected] ~]# ps -ef|grep mysql # 查看是否启动MySQL服务
root 4311 32702 0 21:07 pts/4 00:00:00 grep --color=auto mysql
[[email protected] ~]# systemctl start mysqld.service #启动服务

# yum install mysql-server

 

CentOS8下安装mysql8

 

--------------------------------------------------

文章出自https://www.cnblogs.com/ttrrpp/p/12173562.html