GreatSQL 数据库是一款 开源免费 数据库,可在普通硬件上满足金融级应用场景,具有 高可用、高性能、高兼容、高安全 等特性,可作为 MySQL 或 Percona Server for MySQL 的理想可选替换。
8月5日,GreatSQL 8.0.32-26 版本发布,对应的 Docker 镜像已推送,此次还提供了阿里云 ACR 镜像。
GreatSQL 8.0.32-26 版本在 高可用、高性能、高兼容、高安全 等多方面都有增强新特性。
其中在高安全方面,新增两个特性。
- 新增支持记录指定用户的最后一次登入时间,便于管理员查询,进一步提升数据库安全性。
- 新增支持基于规则的数据脱敏功能。
下面演示“最后登录信息”功能。
拉取镜像。
podman pull registry.cn-beijing.aliyuncs.com/greatsql/greatsql:latest
启动容器。
podman run --name greatsql8032 -e MYSQL_ROOT_PASSWORD=1 -e MYSQL_ROOT_HOST='%' -d 2792645e3d14
连接数据库。
podman exec -it greatsql8032 mysql -uroot -p1
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 10
Server version: 8.0.32-26 GreatSQL (GPL), Release 26, Revision a68b3034c3d
Copyright (c) 2021-2024 GreatDB Software Co., Ltd
Copyright (c) 2009-2024 Percona LLC and/or its affiliates
Copyright (c) 2000, 2024, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
(Wed Aug 7 23:07:36 2024)[root@GreatSQL][(none)]>
安装审计插件
source /usr/share/mysql/install_audit_log.sql
启用审计表和审计入表特性
SET GLOBAL audit_log_enabled = 1;
SET GLOBAL audit_log_to_table = 1;
查看审计表。
(Wed Aug 7 23:08:26 2024)[root@GreatSQL][(none)]>select * from sys_audit.audit_log\G
*************************** 1. row ***************************
name: Query
record: 3306186_6_2024-08-07T23:08:05
timestamp: 2024-08-07 23:08:26
command_class: set_option
connection_id: 10
status: 0
sqltext: SET GLOBAL audit_log_to_table = 1
user: root[root] @ localhost []
host: localhost
priv_user:
os_user:
ip:
db:
server_version:
os_version:
server_id: 3306186
timegmt: 1723039706163358
1 row in set (0.00 sec)
查询最后登录信息。
(Wed Aug 7 23:46:36 2024)[root@GreatSQL][(none)]>SELECT audit_login_messages(10);
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| audit_login_messages(10) |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| | name | time | connection_id | status | user | host | ip | server_id |
| Connect | 2024-08-07 23:46:27 | 108 | 0 | root | localhost | | 3306186 |
| Total 1 rows | |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
切换普通用户,继续查询。
(Wed Aug 7 23:46:03 2024)[mytest@GreatSQL][(none)]>SELECT audit_login_messages(10);
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| audit_login_messages(10) |
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| | name | time | connection_id | status | user | host | ip | server_id |
| Connect | 2024-08-07 23:46:00 | 98 | 0 | mytest | localhost | | 3306186 |
| Total 1 rows | |
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
GreatSQL 8.0.32-26 版本的发布,不仅在功能上进行增强,也在持续关注和投入数据库性能和安全性。GreatSQL 新增适配龙芯、申威等国产硬件,在信创软硬件生态方面更进一步。
更多内容请参阅:
https://greatsql.cn/docs/8.0.32-26/1-docs-intro/relnotes/chan...
🌻 往期精彩 ▼
- 关于“泼辣”DB 你应该知道的几件事
- Oracle 数据库全面升级为 23ai
- python-oracledb 已率先支持 Oracle 23ai
- 一文带你了解 Oracle 23ai 新特性 Vector 的基础用法
- MySQL 9.0 的 VECTOR 文档更新
- MySQL 9.0.0 新鲜出炉!支持向量类型
- 「合集」MySQL 8.x 系列文章汇总
- 如何选择适合的 MySQL Connector/J 版本
- 星辰考古:TiDB v4.0 进化前夜
- 国产基础软件“出海”标杆炼成记
- 敢于公布BUG的国产数据库才是好数据库
- [[RL9] Rocky Linux 9.4 搭载 PG 16.1](https://mp.weixin.qq.com/s/-LYgMoaktYXZ1UG5V5neow)
- 即将告别PG 12,建议升级到PG 16.3版本
- 后 EL 7 时代,PG 16 如何在 CentOS 7 上运行
-- / END / --
👉 这里可以找到我
如果这篇文章为你带来了灵感或启发,就请帮忙点『赞』or『在看』or『转发』吧,感谢!ღ( ´・ᴗ・` )~
本文由mdnice多平台发布
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。