MySQL数据库基础-4

huolan 2020-06-01

MySQL安装

  • 源码安装
  • 二进制格式的程序包
  • 程序包管理器安装 yum dnf

6上只有mySQL
7上只有mariadb
8上既有mysql也有mariadb

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
``

相关推荐