1. 程式人生 > >centos安裝mariadb和啟動

centos安裝mariadb和啟動

1.yum install mariadb-server mariadb # centos7 安裝

systemctl start mariadb  #啟動MariaDB
systemctl stop mariadb  #停止MariaDB
systemctl restart mariadb  #重啟MariaDB
systemctl enable mariadb  #設定開機啟動

遠端連線
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%'IDENTIFIED BY '123456' WITH GRANT OPTION; #123456是遠端訪問的密碼,修改成你需要密碼

flush privileges;