-
Mysql(mariadb)配置安全向导
在安装完Mysql之后,有必要对Mysql配置安全向导,去除安全隐患,提高数据库的安全性。
使用mysql_secure_installation命令会执行几个设置:
- 为root用户设置密码;
- 删除匿名账号;
- 取消root用户远程登录;
- 删除test库和对test库的访问权限;
- 刷新授权表使修改生效。
[root@mysql ~]# mysql_secure_installation
Securing the MySQL server deployment.
Enter password for user root:
The 'validate_password' plugin is installed on the server.
The subsequent steps will run with the existing configuration
of the plugin.
Using existing password for root.
Estimated strength of the password: 100
Change the password for root ? ((Press y|Y for Yes, any other key for No) :