等保MySQL账号安全要求
2023-09-27 14:26:42 时间
1.是否满足长度和复杂度要求,是否勾选强制实施密码策略和强制失败策略。 2.数据库目前使用的账户有哪些,账户的权限分配情况。 3.是否开启审计功能,是否保存了6个月内的审计记录,或部署了第三方审计系统。 4.数据库数据的备份策略。 5.是否收集了个人信息,是否对数据库中保存的个人信息进行加密处理。 SELECT VERSION(); select user,host from mysql.user; 复杂度 -- 安装 INSTALL PLUGIN validate_password SONAME 'validate_password.so'; -- 卸载 UNINSTALL PLUGIN validate_password; show variables like 'validate_password%'; -- SET GLOBAL default_password_lifetime = 90; show global variables like 'default_password_lifetime'; 登录失败 show global variables like '%max_connect_errors%'; show variables like '%connection_control%'; 登录超时 show variables like "%wait_timeout%"; 远程管理 show variables like "%have_ssl%"; 访问控制: select user,host from mysql.user; show grants for 'username(用户名)'@’host’; 审计 -- 开启 set GLOBAL general_log=1; -- 关闭 set GLOBAL general_log=0; show global variables like '%general%'; show variables like 'log_%'; show global variables like '%audit%'; (未安装插件会报错) show global variables like '%audit_json_file%'; select * from general_log; 会话控制限制登录次数 mysql> install plugin connection_control soname "connection_control.so"; mysql> install plugin connection_control_failed_login_attempts soname "connection_control.so"; 卸载: mysql> UNINSTALL plugin connection_control ; mysql> UNINSTALL plugin connection_control_failed_login_attempts ; audit 开启 下载地址 https://bintray.com/mcafee/mysql-audit-plugin/release#files 查看MySQL的插件目录: > show variables like 'plugin_dir'; +---------------+------------------------------+ | Variable_name | Value | +---------------+------------------------------+ | plugin_dir | /usr/local/mysql/lib/plugin/ | +---------------+------------------------------+ 复制库文件到MySQL库目录下: # cp libaudit_plugin.so /usr/local/mysql/lib/plugin/ # chmod a+x /usr/local/mysql/lib/plugin/libaudit_plugin.so 进入mysql命令窗口,安装插件: > install plugin audit soname 'libaudit_plugin.so';
相关文章
- 解决方案:记录一下Date类型在传值时遇见的若干坑(String类型转为Date类型、mysql的表设置、UTC的设置)
- Mysql 5.7 使用SSL安全连接
- MySQL错误“Specified key was too long; max key length is 1000 bytes”的解决办法
- android开发指南!漫谈MySQL权限安全,面试必会
- txt文件导入到mysql中
- Mysql 删除从数据库的relay logs最佳方式、最安全方式
- win10下MySQL安装教程(MySql-8.0.26超级详细)
- mysql防止重复插入记录方法总结
- Mysql++
- mysql将root用户设为所有主机可访问
- StructredStreaming+Kafka+Mysql(Spark实时计算| 天猫双十一实时报表分析)
- MySQL使用mysqldump+binlog完整恢复被删除的数据库
- MYSQL错误解决:ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)