首页 > 数据库 >mysql 5.7以后需要设置安全导向

mysql 5.7以后需要设置安全导向

时间:2024-06-07 11:13:41浏览次数:18  
标签:5.7 No 导向 key mysql Press Yes password root

// mysql_secure_installation安全配置向导

[root@youxi1 ~]# mysql_secure_installation
 
Securing the MySQL server deployment.
 
Enter password for user root:   //输入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: 25
Change the password for root ? ((Press y|Y for Yes, any other key for No) : No  //是否更改root密码,如果输入y会要求设置新的密码
 
 ... 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  //是否删除匿名用户,建议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.
 
Disallow root login remotely? (Press y|Y for Yes, any other key for No) : y  //是否禁止root远程登录,建议y禁止
Success.
 
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.
 
 
Remove test database and access to it? (Press y|Y for Yes, any other key for No) : y  //是否删除test数据库,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  //是否重新加载权限表,y重新加载
Success.
 
All done!

标签:5.7,No,导向,key,mysql,Press,Yes,password,root
From: https://www.cnblogs.com/guanchaoguo/p/18236835

相关文章

  • 新服务器从0到1安装mysql8.0(保姆级教程)
    前提:可以输入命令检测是否安装了mysqlrpm-qa|grepmysql没有安装是什么都没有输出的1.如果系统上已安装有maraidb数据库,需要卸载mariadb yumremovemariadb*-yrm-rf/etc/my.cnfrm-rf/var/lib/mysql/2.如果系统已安装有其他版本的mysql,需提前卸载清空环境r......
  • mysql安装
    mysql安裝下载ZIP包,地址:https://downloads.mysql.com/archives/community/,确保选择与你的Windows系统位数(32位或64位)相匹配的版本。解压ZIP包:将下载的ZIP文件解压到你选择的安装目录。你可以使用Windows内置的解压工具或第三方工具如WinRAR、7-Zip等。创建数据目录:在解压后的My......
  • 【MySQL】LEFT JOIN 踩坑
     一、问题发现:主查询功能发现两条一样的记录,但是审批状态不一样,一个已通过,一个待审核 主表付款表:CREATETABLE`pur_or_payment`(`id`int(11)NOTNULLAUTO_INCREMENTCOMMENT'系统编码初始值为“1”',`pa_code`varchar(32)NOTNULLCOMMENT'付款编号',......
  • 基于java ssm vue mysql志愿者招募网站(源码+lw+部署文档+讲解等)
    前言......
  • 基于java ssm vue mysql协同过滤算法的电影推荐系统(源码+lw+部署文档+讲解等)
    前言......
  • Springboot计算机毕业设计疫苗注射小程序【附源码】开题+论文+mysql+程序+部署
    本系统(程序+源码)带文档lw万字以上 文末可获取一份本项目的java源码和数据库参考。系统程序文件列表开题报告内容研究背景在全球疫苗接种工作日益重要的背景下,为了更有效地推进疫苗接种进程,提高接种效率和用户体验,疫苗注射小程序的开发显得尤为关键。随着移动互联网的普及......
  • 37.MySQL进阶知识
    MySQL进阶知识【一】试图1)概念视图就是通过查询得到一张虚拟表,然后保存下来,下次可以直接使用在计算机科学中,视图(View)是一种虚拟表,其内容是一个或多个基本表的查询结果。视图可以用于简化复杂查询、隐藏敏感数据、实现数据安全性和完整性约束等视图可以是虚拟的,也可......
  • 36.PyMySQL模块
    PyMySQL模块【一】简介DB-API:Python标准数据库规范为DB-API,DB-API定义了一系列必须的对象和数据库操作方式,以便为各种数据库系统和数据库访问程序提供一致的访问接口。PyMySQL:纯python实现的模块,可以与Python代码兼容衔接,也几乎兼容MySQL-python遵循Python数据库AP......
  • Springboot计算机毕业设计疫苗预约微信小程序【附源码】开题+论文+mysql+程序+部署
    本系统(程序+源码)带文档lw万字以上 文末可获取一份本项目的java源码和数据库参考。系统程序文件列表开题报告内容研究背景在数字化和智能化日益发展的今天,公众对于便捷、高效的健康服务需求日益增长。疫苗接种作为预防疾病的重要手段,其预约和接种流程的便捷性直接影响到公......
  • MySQL主从同步优化指南:架构、瓶颈与解决方案
    前言​在现代数据库架构中,MySQL主从同步是实现高可用性和负载均衡的关键技术。本文将深入探讨主从同步的架构、延迟原因以及优化策略,并提供专业的监控建议。MySQL主从同步架构​主从复制流程:从库生成两个线程,一个I/O线程,一个SQL线程;I/O线程去请求主库的bin......