1、CentOS 7.6最小化方式安装系统后,其yum默认base源中的mariadb-server版本为5.5.60,且没有mariadb-client软件包
2、配置下载MariaDB的yum源:
# vim /etc/yum.repos.d/MariaDB.repo
[mariadb]
name=MariaDB Repo
baseurl=http://mirrors.ustc.edu.cn/mariadb/yum/10.3/centos7-amd64/
gpgkey=http://mirrors.ustc.edu.cn/mariadb/yum/RPM-GPG-KEY-MariaDB
gpgcheck=1
enabled=1
# yum clean all
# yum makecache
3、在新配置的mariadb源中MariaDB-server的最新版本为10.3.14,且MariaDB-client的最新版本也为10.3.14
4、安装启动MariaDB-server:
# yum -y install MariaDB-server
# systemctl start mariadb.service
# ss -tunlp | grep 3306
# systemctl enable mariadb.service
# systemctl status mariadb.service
# MysqL_secure_installation
# vim /etc/my.cnf.d/server.cnf
[MysqLd]
port=3306
socket=/var/lib/MysqL/MysqL.sock
datadir=/var/lib/MysqL
log-error=/var/log/mariadb.log
lower_case_table_names=1
character-set-server=utf8mb4
collation-server=utf8mb4_unicode_ci
symbolic-links=0
备注:MariaDB Server 10.3.14的版本中默认主配置文件不再是/etc/my.cnf,而是my.cnf以及/etc/my.cnf.d/目录下的各类.cnf配置文件
# systemctl restart mariadb.service
# MysqL -uroot -p
MariaDB> grant all on *.* to 'root'@'192.168.%.%' identified by '123456';
MariaDB> flush privileges;
7、 使用客户端工具Navicat远程连入MariaDB:
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。