#yum install mariadb mariadb-server =>安裝
#systemctl start mariadb.service =>啟動服務
#systemctl enable mariadb.service =>設定開機啟動服務
#mysql_secure_installation =>進入初始設定
#mysql_secure_installation =>進入初始設定
Enter current password for root (enter for none): #輸入目前MariaDB 的root密碼(第一次設定應該是空的,所以直接按Enter即可)
Set root password? [Y/n] Y #是否要設定新的MariaDBroot密碼?在此是按Y New password: #設定第一次新的MariaDB root密碼 Re-enter new password: #設定第二次
Remove anonymous users? [Y/n] Y #是否要移除anonymous user的資料?預設是Y
... Success!
Disallow root login remotely? [Y/n] Y #設定是否讓root只能從localhost登入,不能從其他的網路登入!(預設是Y)
Remove test database and access to it? [Y/n] Y #是否要移除test的資料庫?預設是移除
Reload privilege tables now? [Y/n] Y #是否要重新載入權限的table資訊?預設是Y
... Success!
可連線測試
#mysql -u root -p
Enter password:你剛剛設定的密碼
MariaDB [(none)]> show databases;
讓php支援mariadb
#yum install php-mysql
沒有留言:
張貼留言