CentOS8 yum安装Mariadb10.4

CentOS8 yum安装Mariadb10.4
https://downloads.mariadb.org/mariadb/repositories/#distro=CentOS&distro_release=centos8-amd64--centos8&mirror=liquidtelecom&version=10.4

vim /etc/yum.repos.d/MariaDB.repo ##新建配置文件
##将一下文件复制进去
# MariaDB 10.4 CentOS repository list - created 2020-06-01 04:02 UTC
# http://downloads.mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.4/centos8-amd64
module_hotfixes=1
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
##保存退出后执行dnf install
sudo dnf install MariaDB-server
sudo systemctl start mariadb
  • 装完以后看一下主要的配置文件
rpm -ql mariadb-server

CentOS8 yum安装Mariadb10.4

  • mySQL是一项重要的服务,查看一下服务文件
rpm -ql mariadb-server|grep service

CentOS8 yum安装Mariadb10.4

  • 查看服务的状态
systemctl status mariadb

CentOS8 yum安装Mariadb10.4

  • 启动服务并设定开机启动
systemctl enable --now mariadb

CentOS8 yum安装Mariadb10.4

  • 查看端口监听情况,mySQL默认使用3306端口
ss -ntl

CentOS8 yum安装Mariadb10.4

CentOS8 yum安装Mariadb10.4

上一篇:Java-JDBC以及工具类


下一篇:MySql 练习题