惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Cisco Talos Blog
Cisco Talos Blog
K
Kaspersky official blog
T
The Exploit Database - CXSecurity.com
NISL@THU
NISL@THU
AWS News Blog
AWS News Blog
V2EX - 技术
V2EX - 技术
Google DeepMind News
Google DeepMind News
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
S
Security @ Cisco Blogs
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Recent Commits to openclaw:main
Recent Commits to openclaw:main
J
Java Code Geeks
Microsoft Azure Blog
Microsoft Azure Blog
Attack and Defense Labs
Attack and Defense Labs
Jina AI
Jina AI
The Last Watchdog
The Last Watchdog
W
WeLiveSecurity
H
Help Net Security
V
Visual Studio Blog
宝玉的分享
宝玉的分享
C
Cybersecurity and Infrastructure Security Agency CISA
T
Threat Research - Cisco Blogs
IT之家
IT之家
Hugging Face - Blog
Hugging Face - Blog
Latest news
Latest news
T
Tor Project blog
I
Intezer
美团技术团队
GbyAI
GbyAI
T
Tailwind CSS Blog
Last Week in AI
Last Week in AI
博客园 - 三生石上(FineUI控件)
Google DeepMind News
Google DeepMind News
Scott Helme
Scott Helme
Y
Y Combinator Blog
博客园 - 司徒正美
T
Tenable Blog
O
OpenAI News
N
News and Events Feed by Topic
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
V
Vulnerabilities – Threatpost
P
Palo Alto Networks Blog
博客园 - 聂微东
酷 壳 – CoolShell
酷 壳 – CoolShell
D
Darknet – Hacking Tools, Hacker News & Cyber Security
T
Threatpost
Google Online Security Blog
Google Online Security Blog
Apple Machine Learning Research
Apple Machine Learning Research
云风的 BLOG
云风的 BLOG
Help Net Security
Help Net Security

博客园 - chan_炽烽

J4125 - OPNsense 配置 MGMT(管理口) J4125 - OPNsense 系统配置备份及恢复 J4125 - OPNsense 简单使用 J4125 安装 OPNsense 【VMware Workstation】Debian 13 安装 sing-box(Claaash配置转换sing-box配置) Radxa E20C 安装 飞牛 fnOS Radxa E20C 升级 LEDE(含编译过程) Radxa E20C 安装 LEDE(含编译过程) 【VMware Workstation】Debian 13 桌面版安装 docker-compose + macvlan + Elasticsearch - 9.1.4 + Kibana - 9.1.4 安装 elasticsearch-9.1.4的 IK分词器 安装 elasticsearch-9.1.4 - 集群 和 kibana-9.1.4 Radxa E20C 安装 OpenWrt 【VMware Workstation】Rocky Linux 10 桌面版安装 iStoreOS + 旁路由 + openClash - chan_炽烽 iStoreOS + 旁路由 【推荐 - 源码安装】Redis - 安装 【推荐 - 源码安装】nginx - 安装 fastDFS - 单机部署 + nginx 【推荐 - glibc安装】MySQL - 安装 【推荐 - rpm安装】MySQL - 安装 修复PG.conf文件出现的问题 [七月挑选]树莓派Raspberrypi上配置Git [七月挑选]IntelliJ IDEA常用设置
MySQL - 安装时的安全配置
chan_炽烽 · 2024-09-11 · via 博客园 - chan_炽烽

操作过程

mysql_secure_installation

操作过程如下

[root@mysql data]# mysql_secure_installation

Securing the MySQL server deployment.

Enter password for user root: 

VALIDATE PASSWORD COMPONENT can be used to test passwords
and improve security. It checks the strength of password
and allows the users to set only those passwords which are
secure enough. Would you like to setup VALIDATE PASSWORD component?

Press y|Y for Yes, any other key for No: n
Using existing password for root.
# 是否修改root密码
Change the password for root ? ((Press y|Y for Yes, any other key for No) : n

 ... skipping.
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. 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.

# 是否删除匿名用户,生产环境建议删除
Remove anonymous users? (Press y|Y for Yes, any other key for No) : y
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远程登录,根据自己的需求选择Y/n并回车
Disallow root login remotely? (Press y|Y for Yes, any other key for No) : n

 ... skipping.
By default, MySQL 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.

# 是否删除test数据库
Remove test database and access to it? (Press y|Y for Yes, any other key for No) : y
 - 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? (Press y|Y for Yes, any other key for No) : y
Success.

All done! 
You have new mail in /var/spool/mail/root
[root@mysql data]#