Centos7安装mariadb

时间:2022-06-12 04:17:26

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 [email protected]‘%‘ IDENTIFIED BY "yourpassword";

MariaDB [(none)]> FLUSH PRIVILEGES;

MariaDB [(none)]> exit