阿里云ECS服务器:CentOS安装mysql8

1、安装Yum Repository,键入命令

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

2、 使用rpm来安装MySQL

[root@localhost ~]# rpm -ivh mysql80-community-release-el8-1.noarch.rpm

3、使用yum安装mysql服务

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

4、检查是否已经设置为开机启动MySQL服务

[root@localhost ~]# systemctl list-unit-files|grep mysqld

输出:

mysqld.service disabled
mysqld@.service disabled

5、设置开机启动

[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

6、查看是否启动MySQL服务

[root@localhost ~]# ps -ef|grep mysql #

输出:

root 4311 32702 0 21:07 pts/4 00:00:00 grep --color=auto mysql

7、启动服务

[root@localhost ~]# systemctl start mysqld.service 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值