CentOS8下安装mysql8

Posted trp

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了CentOS8下安装mysql8相关的知识,希望对你有一定的参考价值。

安装Yum Repository

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

 

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

 

使用yum安装mysql服务

[root@localhost ~]# yum install mysql-server

 

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

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

 

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

 

以上是关于CentOS8下安装mysql8的主要内容,如果未能解决你的问题,请参考以下文章

CentOS8下安装mysql8

centos8 安装 mysql8

CentOS8 安装 MySQL8.0(RPM)

CentOS8 安装 MySQL8.0(RPM)

Centos8上yum安装mysql8

ECS 部署 MySQ(CentOS8 安装MySQL8)