mariadb安装
1. 安装软件包
yum install -y mariadb mariadb-server python2-PyMySQL
2.启动数据库服务,并将其配置设置为开机自启
systemctl start mariadb.service
systemctl enable mariadb.service
3.数据库初始化
mysql_secure_installation
涉及手工确认效果演示
Enter current password for root (enter for none): 直接 Enter
...
Set root password? [Y/n] Y
New password:
Re-enter new password:
...
Remove anonymous users? [Y/n] Y
...
Disallow root login remotely? [Y/n] Y
...
Remove test database and access to it? [Y/n] Y
...
Reload privilege tables now? [Y/n]