慕田峪7331174
安装完mysql-server会提示可以运行mysql_secure_installation。运行mysql_secure_installation会执行几个设置:a)为root用户设置密码b)删除匿名账号c)取消root用户远程登录d)删除test库和对test库的访问权限e)刷新授权表使修改生效通过这几项的设置能够提高mysql库的安全。建议生产环境中mysql安装这完成后一定要运行一次mysql_secure_installation,详细步骤请参看下面的命令:复制代码代码如下:[root@server1 ~]#mysql_secure_installationNOTE: RUNNING ALL PARTS OF THIS SCRIPT ISRECOMMENDED FOR ALL MySQLSERVERS IN PRODUCTION USE! PLEASE READ EACH STEPCAREFULLY!In order to log into MySQL to secure it, we'll need thecurrentpassword for the root user. If you've just installed MySQL,andyou haven't set the root password yet, the password will be blank,soyou should just press enter here.Enter current password for root (enter fornone):