Mysql基线核查中手动检查项

  1. 查看版本信息
    select @@version
  2. 查看默认创建的测试库和测试用户
    show databases like "test%";
    select * from mysql.user where user = "test";
  3. 查看匿名用户
    select * from mysql.user where user="";
  4. 查看空密码
    select * from mysql.user where password="";
  5. 查看用户权限
    select host,user from mysql.user where host="%" and user="root";
  6. 查看口令策略
    show variable like "validate password";
    set global 修改口令策略
  7. 查看配置文件
    my.ini
    查看修改默认端口号:3306
    查看最大链接数:max_connections=512
    查看安全配置 :secure_file_priv="" 控制读写权限
    查看远程连接bind-address=0.0.0.0 bind-address 指定了 MySQL 服务器监听的网络接口地址,控制哪些主机可以连接到 MySQL 服务。
    查看网络连接 show variables like 'skip_networking'; skip-networking = 1/on时,禁用所有远程/TCP/IP连接,应用程序就只能通过本地方式连接数据库,无法通过网络接口访问 MySQL 服务
  8. 设置mysql日志
posted @ 2025-06-06 17:54  鹤城  阅读(33)  评论(0)    收藏  举报