Centos7安装mariadb

yum install -y mariadb-server

systemctl enable mariadb

systemctl start mariadb

systemctl status mariadb

mysql_secure_installation

firewall-cmd --add-port=3306/tcp --permanent

firewall-cmd --reload

mysql -u root -p

MariaDB [(none)]> GRANT ALL ON . TO ‘%‘ IDENTIFIED BY "yourpassword";

MariaDB [(none)]> FLUSH PRIVILEGES;

MariaDB [(none)]> exit

相关推荐