centos7 安装MariaDB 10.6

镜像下载、域名解析、时间同步请点击阿里云开源镜像站

背景

centos7使用yum install mariadb-server命令安装的默认版本是5.5的,这是因为系统默认源只有5.5的版本,所以我们去增加一个10.6的源

增加源

去mariaDB官网找到对应的源

Download MariaDB Server – MariaDB.org

这是我选的源

centos7 安装MariaDB 10.6

复制这部分作为centos7的源

MariaDB 10.6 CentOS repository list - created 2021-12-22 11:16 UTC
Download MariaDB Server
[mariadb] name = MariaDB baseurl = https://mirrors.aliyun.com/mariadb/yum/10.6/centos7-amd64 gpgkey=https://mirrors.aliyun.com/mariadb/yum/RPM-GPG-KEY-MariaDB gpgcheck=1

添加maridb源

vim /etc/yum.repos.d/MariaDB.repo

把刚在mariadb官网复制的源代码粘贴进去

centos7 安装MariaDB 10.6

安装

源代码的问题已经解决,现在您可以执行安装了。如果再次执行该命令,您将发现已安装10.6版。

[En]

The problem with the source has been solved, and now you are ready to perform the installation. If you execute the command again, you will find that version 10.6 is installed.

yum install MariaDB-server MariaDB-client

配置 MariaDB

mariadb-secure-installation

Enter current password for root (enter for none): 输入当前的root密码(默认空),直接回车
Set root password? [Y/n] 设置新密码,y
Remove anonymous users? [Y/n] 移除匿名用户,y
Disallow root login remotely? [Y/n] 禁止root用户远程登录,y
Remove test database and access to it? [Y/n] 移除测试数据库,y
Reload privilege tables now? [Y/n] y

启动MariaDB

启动

 systemctl start mariadb

设置开机自启

 systemctl enable mariadb

配置文件位置:/etc/my.cnf

本文转自:https://blog.csdn.net/sqlquan/article/details/122093702

Original: https://www.cnblogs.com/helong-123/p/16090836.html
Author: 萌褚
Title: centos7 安装MariaDB 10.6

原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/523900/

转载文章受原作者版权保护。转载请注明原作者出处!

(0)

大家都在看

亲爱的 Coder【最近整理,可免费获取】👉 最新必读书单  | 👏 面试题下载  | 🌎 免费的AI知识星球