yum install mariadb mariadb-serversystemctl start mariadb.service #启动MariaDBsystemctl stop mariadb.service #停止MariaDBsystemctl restart mariadb.service #重启MariaDBsystemctl enable mariadb.service #设置开机启动启动MariaDB输入: mysql_secure_installation第一次直接回车,后面的根据提示操作允许本地访问:grant all PRIVILEGES on *.* to root@'localhost' identified by 'zxc123' with grant option允许远程访问:GRANT ALL PRIVILEGES ON *.* TO 'root'@'%'IDENTIFIED BY 'zxc13' WITH GRANT OPTION