4.1

#命令
sudo mysql_secure_installation

#显示
VALIDATE PASSWORD PLUGIN can be used to test passwords...
Press y|Y for Yes, any other key for No:
#输入
N (选择N ,不会进行密码的强校验)

#显示
Please set the password for root here...
New password: (输入密码,密码不显示)
Re-enter new password: (重复输入)

#显示
By default, a MySQL installation has an anonymous user,
allowing anyone to log into MySQL without having to have
a user account created for them...
Remove anonymous users? (Press y|Y for Yes, any other key for No) :
#输入
N (选择N,不删除匿名用户)

#显示
Normally, root should only be allowed to connect from
'localhost'. This ensures that someone cannot guess at
the root password from the network...
Disallow root login remotely? (Press y|Y for Yes, any other key for No) :
#输入
N (选择N,允许root远程连接)

#显示
By default, MySQL comes with a database named 'test' that
anyone can access...
Remove test database and access to it? (Press y|Y for Yes, any other key for No) :
#输入
N (选择N,不删除test数据库)

#显示
Reloading the privilege tables will ensure that all changes
made so far will take effect immediately.
Reload privilege tables now? (Press y|Y for Yes, any other key for No) :
#输入
Y (选择Y,修改权限立即生效)

posted @ 2024-04-01 21:17  catsahsy  阅读(8)  评论(0编辑  收藏  举报