CentOS 7 安装 MariaDB

安装

1
2
3
4
yum install mariadb mariadb-server
systemctl start mariadb
systemctl enable mariadb
mysql_secure_installation #设置root密码等相关

允许远程连接

1
2
3
4
mysql -uroot -p
use mysql;
update user set host = '%' where user = 'root';
flush privileges;