千家信息网

Centos7安装mariadb

发表于:2024-11-17 作者:千家信息网编辑
千家信息网最后更新 2024年11月17日,yum install -y mariadb-serversystemctl enable mariadbsystemctl start mariadbsystemctl status mariadb
千家信息网最后更新 2024年11月17日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 root@'%' IDENTIFIED BY "yourpassword";

MariaDB [(none)]> FLUSH PRIVILEGES;

MariaDB [(none)]> exit

0