标签:bubuko key tps http serve 分享 nbsp start col
1.新增mariadb的yum源
vim /etc/yum.repos.d/MariaDB.repo
# 将以下代码添加到文件,保存退出
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.1/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
2.yum下载安装
yum install MariaDB-server MariaDB-client -y
3.启动并设置开启启动mariadb
# 启动mariadb
systemctl start mariadb
# 开启自动启动mariadb
systemctl enable mariadb
4.设置中文编码
vim /etc/my.cnf
# 添加以下内容
[mysqld]
character-set-server=utf8
collation-server=utf8_general_ci
log-error=/var/log/mysqld.log
[client]
default-character-set=utf8
[mysql]
default-character-set=utf8
5.初始化mariadb
mysql_secure_installation
6.重启mariadb
systemctl restart mariadb
7.测试连接并查看mariadb的编码
标签:bubuko key tps http serve 分享 nbsp start col
原文地址:https://www.cnblogs.com/st-st/p/10251949.html