Home » Default » CentOS 7 yum 安装 MariaDB

yum install -y mariadb-server
yum install -y mariadb
yum install -y mariadb-libs
yum install -y mariadb-devel

vi /etc/my.cnf.d/client.cnf

[client]
default-character-set = utf8

vi /etc/my.cnf.d/mysql-clients.cnf

[mysql]
default-character-set = utf8

vi /etc/my.cnf.d/server.cnf

[mysqld]
collation-server = utf8_general_ci
init-connect = 'SET NAMES utf8'
character-set-server = utf8
sql-mode = TRADITIONAL

systemctl start mariadb
systemctl enable mariadb

mysql_secure_installation
mysql -uroot -p

标签: centos yum MariaDB

添加新评论

V