Red Hat6.5下使用yum安裝MariaDB
阿新 • • 發佈:2019-02-08
1 建立MariaDB.repo檔案
vi /etc/yum.repos.d/MariaDB.repo
新增以下內容
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.1/rhel/6.5/x86_64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
2.執行安裝命令安裝MariaDB
yum -y install MariaDB-server MariaDB-client
3.啟動MariaDB服務。
systemctl start mariadb #啟動服務
systemctl enable mariadb #設定開機啟動
systemctl restart mariadb #重新啟動
systemctl stop mariadb.service #停止MariaDB
3.登入到資料庫
用mysql -uroot命令登入到MariaDB,此時root賬戶的密碼為空。
4.進行MariaDB的相關簡單配置
使用mysql_secure_installation命令進行配置。