~~~txt
安裝命令
命令:yum -y install mariadb mariadb-server
~~~
~~~txt
啟動MariaDB
命令:systemctl start mariadb
~~~
~~~txt
設置開機啟動
命令:systemctl enable mariadb
~~~
~~~txt
MariaDB的相關簡單配置
命令:mysql_secure_installation
Enter current password for root (enter for none):<–初次運行直接回車設置密碼
Set root password? [Y/n] <– 是否設置root用戶密碼,輸入y并回車或直接回車
New password: <– 設置root用戶的密碼
Re-enter new password: <– 再輸入一次你設置的密碼
其他配置
Remove anonymous users? [Y/n] <– 是否刪除匿名用戶,回車
Disallow root login remotely? [Y/n] <–是否禁止root遠程登錄,回車,
Remove test database and access to it? [Y/n] <– 是否刪除test數據庫,回車
Reload privilege tables now? [Y/n] <– 是否重新加載權限表,回車
~~~
~~~txt
測試是否安裝成功
命令:mysql -uroot -ppassword
~~~