CentOS8下安裝mysql8

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 ~]

 

檢查是否已經設置爲開機啓動MySQL服務
[root@localhost ~]# systemctl list-unit-files|grep mysqld
mysqld.service disabled
[email protected] 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
[email protected] 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 #啓動服務

# yum install mysql-server

 

 

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

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

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章