CentOS7安装MariaDB10.6

1 添加MariaDB yum仓库

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

  复制以下到文件

# MariaDB 10.6 CentOS repository list - created 2022-06-20 07:17 UTC
# https://mariadb.org/download/
[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

 

以上参考MariaDB官网

Download MariaDB Server - MariaDB.org

 

2 安装

1
yum install MariaDB-server MariaDB-client

  

3 设置开机启动

1
2
3
4
5
6
7
8
# 启动
systemctl start mariadb
 
# 开机启动
systemctl enable mariadb
 
# 查看状态
systemctl status mariadb

  

4 进行安全配置

1
mariadb-secure-installation

  

 5 配置远程允许远程登录

1
2
3
use mysql;
grant all privileges on *.* to 'root'@'%' identified by '密码' with grant option;
flush privileges;

  

6 防火墙放通3306

1
2
firewall-cmd --zone=public --add-port=3306/tcp --permanent
firewall-cmd --reload

  

7 测试

 

posted @   WaterGe  阅读(494)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· winform 绘制太阳,地球,月球 运作规律
· 超详细:普通电脑也行Windows部署deepseek R1训练数据并当服务器共享给他人
· 上周热点回顾(3.3-3.9)
· AI 智能体引爆开源社区「GitHub 热点速览」
· 写一个简单的SQL生成工具
点击右上角即可分享
微信分享提示