JSON
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
//建议在生产环境中使用的所有 MariaDB 服务器上运行此脚本的所有部分!请仔细阅读每一步!
In order to log into MariaDB to secure it, we'll need the current password for the root user. If you've just installed MariaDB, and haven't set the root password yet, you should just press enter here.
//为了登录 MariaDB 并进行安全设置,我们需要 root 用户的当前密码。如果您刚刚安装了 MariaDB,并且尚未设置 root 密码,您可以直接在这里按回车键。
Enter current password for root (enter for none):
//输入 root 用户的当前密码(如果没有密码,请直接按回车):
OK, successfully used password, moving on...
//OK,成功使用密码,继续执行...
Setting the root password or using the unix_socket ensures that nobody can log into the MariaDB root user without the proper authorisation.
//设置 root 密码或使用 unix_socket 可以确保未经适当授权的人无法登录 MariaDB 的 root 用户。
You already have your root account protected, so you can safely answer 'n'.
//您的 root 账户已经受到保护,因此您可以安全地回答 'n'。
Switch to unix_socket authentication [Y/n] n
//切换到 unix_socket 认证 [Y/n] n
... skipping.
//... 跳过。
You already have your root account protected, so you can safely answer 'n'.
//您的 root 账户已经受到保护,因此您可以安全地回答 'n'。
Change the root password? [Y/n] n
//更改 root 密码?[Y/n] n
... skipping.
//... 跳过。
By default, a MariaDB installation has an anonymous user, allowing anyone to log into MariaDB without having to have a user account created for them. This is intended only for testing, and to make the installation go a bit smoother.You should remove them before moving into a
production environment.
//默认情况下,MariaDB 安装会创建一个匿名用户,允许任何人无需创建用户账户即可登录 MariaDB。这仅用于测试目的,以使安装过程更加顺利。在进入生产环境之前,您应该删除这些匿名用户。
Remove anonymous users? [Y/n]
//删除匿名用户?[Y/n]
... Success!
//... 成功!
Normally, root should only be allowed to connect from 'localhost'. This ensures that someone cannot guess at the root password from the network.
//通常情况下,root 用户应仅允许从 localhost 连接。这可以确保他人无法通过网络猜测 root 密码。
Disallow root login remotely? [Y/n]
//禁止 root 用户远程登录?[Y/n]
... Success!
//... 成功!
By default, MariaDB comes with a database named 'test' that anyone can access. This is also intended only for testing, and should be removed before moving into a production environment.
//默认情况下,MariaDB 附带一个名为 test 的数据库,任何人都可以访问。这也仅用于测试目的,在进入生产环境之前应将其删除。
Remove test database and access to it? [Y/n]
//删除测试数据库并取消对其的访问权限?[Y/n]
- Dropping test database...
//正在删除测试数据库...
... Success!
//... 成功!
- Removing privileges on test database...
//正在移除测试数据库的权限...
... Success!
//... 成功!
Reloading the privilege tables will ensure that all changes made so far will take effect immediately.
//重新加载权限表将确保到目前为止所做的所有更改立即生效。
Reload privilege tables now? [Y/n]
//现在重新加载权限表吗?[Y/n]
... Success!
//... 成功!
Cleaning up...
//清理中...
All done! If you've completed all of the above steps, your MariaDB installation should now be secure.
//全部完成!如果您已完成上述所有步骤,您的 MariaDB 安装现在应该是安全的。
Thanks for using MariaDB!
//感谢使用 MariaDB!