PostgreSQL 商用版本EPAS(阿里云ppas) SQL防火墙使用(白名单管理、防SQL注入、防DDL等)

本文涉及的产品
RDS AI 助手,专业版
RDS MySQL DuckDB 分析主实例,基础系列 4核8GB
RDS MySQL DuckDB 分析主实例,集群系列 4核8GB
简介:

标签

PostgreSQL , PPAS , enterprisedb , SQL 防火墙 , SQL 注入


背景

数据库SQL防火墙是一个安全加强功能,通常被用于防止或减轻数据库被攻击后,泄露数据或者数据被破坏带来的损失。

包括:

1、防止SQL注入。

2、防止业务访问无需访问的对象。

3、防止业务执行DDL。

4、防止业务执行不带WHERE条件的DML。

5、防止业务执行不带WHERE条件或者WHERE条件始终未TRUE的查询。

通常,严格的授权并不能完全杜绝攻击带来的危害。

PostgreSQL的权限体系非常的健全,从连接、库、SCHEMA、对象一直到行这个级别,都支持权限管理。

《PostgreSQL 逻辑结构 和 权限体系 介绍》

授权甚至精确到行、列、安全标签 这个层面。

1、列级授权

https://www.postgresql.org/docs/10/static/sql-grant.html

GRANT { { SELECT | INSERT | UPDATE | REFERENCES } ( column_name [, ...] )         
    [, ...] | ALL [ PRIVILEGES ] ( column_name [, ...] ) }         
    ON [ TABLE ] table_name [, ...]         
    TO role_specification [, ...] [ WITH GRANT OPTION ]         

2、行级授权,使用的是row security label

https://www.postgresql.org/docs/10/static/ddl-rowsecurity.html

-- 例子         
         
CREATE TABLE accounts (manager text, company text, contact_email text);         
         
ALTER TABLE accounts ENABLE ROW LEVEL SECURITY;         
         
CREATE POLICY account_managers ON accounts TO managers         
    USING (manager = current_user);         

《PostgreSQL 行安全策略 - PostgreSQL 9.5 new feature - can define row security policy for table》

3、安全标签。结合LINUX的selinux特性,可以更加的精确。

https://wiki.postgresql.org/wiki/SEPostgreSQL_SELinux_Overview

https://www.postgresql.org/docs/10/static/sql-security-label.html

https://www.postgresql.org/docs/10/static/sepgsql.html

虽然PG的权限体系非常的完善,但是依旧无法完全防止攻击者带来的危害,只是减轻而已。

PS: 要注意,SQL防火墙,同样也不能完全避免危害,也只能减轻而已。不要以为有SQL防火墙就万事大吉了。

EDB EPAS发布的商用版本,支持了SQL防火墙的功能,可以用于弥补权限体系上的不足,用于:

1、防止SQL注入。(通过禁止执行 where条件带or 永远是true的 SQL)

2、防止业务访问无需访问的对象。(通过白名单)

3、防止业务执行DDL。(禁止DDL)

4、防止业务执行不带WHERE条件的DML。(通过禁止执行 不带WHERE条件的 DML)

5、防止业务执行不带WHERE条件或者WHERE条件始终未TRUE的查询。(通过禁止执行 where条件带or 永远是true的 SQL)

下面介绍其原理和用法。

原理

pic

1、当设置为learn模式时,通过学习,得到用户程序正常使用过程中,需要访问的对象(解析SQL得到)。

2、这些对象被设置为白名单。

3、当设置为passive模式时,不在白名单的对象,如果被访问了,发出警告。

4、当设置为active模式时,不在白名单的对象,如果被访问了,报错。也就是不允许访问。

5、其他规则包括(禁止DDL开关,禁止不带WHERE条件的DML开关,禁止WHERE始终为TRUE的查询SQL开关。)

配置

1、将SO拷贝到$PGDATA/lib目录。

-- 安装完PPAS,应该已经存在了         
         
cp sqlprotect.so $PGDATA/lib         

2、配置postgresql.conf

shared_preload_libraries='$libdir/sqlprotect'  # 如果有其他so, 逗号隔开         

3、在需要使用SQL防火墙功能的DB中创建一些管理表、视图、函数。

psql -d digoal -f $PGHOME/share/contrib/sqlprotect.sql         

会在数据库中创建SCHEMA,以及对应的管理函数、视图、表。

4、配置集群、库、用户级参数,是否开启SQL防火墙。

edb_sql_protect.enabled = on         

其他的参数包括

  • shared_preload_libraries. Add $libdir/sqlprotect to the list of libraries.

  • edb_sql_protect.enabled. Controls whether or not SQL/Protect is actively monitoring protected roles by analyzing SQL statements issued by those roles and reacting according to the setting of edb_sql_protect.level. When you are ready to begin monitoring with SQL/Protect set this parameter to on. If this parameter is omitted, the default is off.

  • edb_sql_protect.level. Sets the action taken by SQL/Protect when a SQL statement is issued by a protected role. If this parameter is omitted, the default behavior is passive. Initially, set this parameter to learn. See Section 4.1.2.1.2 for further explanation of this parameter.

  • edb_sql_protect.max_protected_roles. Sets the maximum number of roles that can be protected. If this parameter is omitted, the default setting is 64. See Section 3.1.3.12.8 for information on the maximum range of this parameter.

  • edb_sql_protect.max_protected_relations. Sets the maximum number of relations that can be protected per role. If this parameter is omitted, the default setting is 1024.
    Please note the total number of protected relations for the server will be the number of protected relations times the number of protected roles. Every protected relation consumes space in shared memory. The space for the maximum possible protected relations is reserved during database server startup.
    See Section 3.1.3.12.7 for information about the maximum range of this parameter.

  • edb_sql_protect.max_queries_to_save. Sets the maximum number of offending queries to save in the edb_sql_protect_queries view. If this parameter is omitted, the default setting is 5000. If the number of offending queries reaches the limit, additional queries are not saved in the view, but are accessible in the database server log file. Note: The minimum valid value for this parameter is 100. If a value less than 100 is specified, the database server starts using the default setting of 5000. A warning message is recorded in the database server log file. See Section 3.1.3.12.9 for information on the maximum range of this parameter.

除了shared_preload_libraries参数需要重启数据库,其他的都不需要,只需要reload配置文件即可。

5、将数据库用户添加到防火墙中监管。

edb=# SELECT protect_role('appuser');         
 protect_role         
--------------         
          
(1 row)         

查看当前被监控的用户

edb=# \x         
Expanded display is on.         
edb=# SELECT * FROM list_protected_users;  -- 基表edb_sql_protect         
-[ RECORD 1 ]------+--------         
dbname             | edb         
username           | appuser           
protect_relations  | t   -- 是否使用白名单保护对象         
allow_utility_cmds | f   -- 否允许执行DDL         
allow_tautology    | f   -- 是否允许执行包含TRUE条件的SELECT         
allow_empty_dml    | f   -- 是否允许执行包含TRUE条件的DML         

update edb_sql_protect 可以设置是否允许执行DDL,是否允许执行包含TRUE条件的SELECT,是否允许执行不带条件的DML。

6、配置学习模式,并开启程序,学习并生成对象白名单。

edb_sql_protect.enabled = on         
edb_sql_protect.level = learn         
         
edb=# SELECT pg_reload_conf();         
 pg_reload_conf         
----------------         
 t         
(1 row)         

学习过程举例,执行SQL,对象被学习

edb=> SELECT * FROM dept;         
NOTICE:  SQLPROTECT: Learned relation: 16384         
 deptno |   dname    |   loc             
--------+------------+----------         
     10 | ACCOUNTING | NEW YORK         
     20 | RESEARCH   | DALLAS         
     30 | SALES      | CHICAGO         
     40 | OPERATIONS | BOSTON         
(4 rows)         
          
edb=> SELECT empno, ename, job FROM emp WHERE deptno = 10;         
NOTICE:  SQLPROTECT: Learned relation: 16391         
 empno | ename  |    job             
-------+--------+-----------         
  7782 | CLARK  | MANAGER         
  7839 | KING   | PRESIDENT         
  7934 | MILLER | CLERK         
(3 rows)         
         
edb=> CREATE TABLE appuser_tab (f1 INTEGER);         
NOTICE:  SQLPROTECT: This command type is illegal for this user         
CREATE TABLE         
edb=> DELETE FROM appuser_tab;         
NOTICE:  SQLPROTECT: Learned relation: 16672         
NOTICE:  SQLPROTECT: Illegal Query: empty DML         
DELETE 0         

查看已学习到的对象

edb=# SET search_path TO sqlprotect;         
SET         
         
edb=# SELECT * FROM edb_sql_protect_rel;         
 dbid  | roleid | relid          
-------+--------+-------         
 13917 |  16671 | 16384         
 13917 |  16671 | 16391         
 13917 |  16671 | 16672         
(3 rows)         
         
edb=# SELECT * FROM list_protected_rels;         
 Database | Protected User | Schema |    Name     | Type  |    Owner              
----------+----------------+--------+-------------+-------+--------------         
 edb      | appuser        | public | dept        | Table | enterprisedb         
 edb      | appuser        | public | emp         | Table | enterprisedb         
 edb      | appuser        | public | appuser_tab | Table | appuser         
(3 rows)         

7、配置为passive或active模式。开启访问对象过滤的安全功能。

edb_sql_protect.enabled = on         
edb_sql_protect.level = passive         
         
-- 只是警告,还是能执行         
edb=> CREATE TABLE appuser_tab_2 (f1 INTEGER);         
WARNING:  SQLPROTECT: This command type is illegal for this user         
CREATE TABLE         
edb=> INSERT INTO appuser_tab_2 VALUES (1);         
WARNING:  SQLPROTECT: Illegal Query: relations         
INSERT 0 1         
edb=> INSERT INTO appuser_tab_2 VALUES (2);         
WARNING:  SQLPROTECT: Illegal Query: relations         
INSERT 0 1         
edb=> SELECT * FROM appuser_tab_2 WHERE 'x' = 'x';         
WARNING:  SQLPROTECT: Illegal Query: relations         
WARNING:  SQLPROTECT: Illegal Query: tautology         
 f1          
----         
  1         
  2         
(2 rows)         

查看警告的次数,以及哪些SQL存在风险(即触发警告的SQL)。

edb=# SET search_path TO sqlprotect;         
SET         
edb=# SELECT * FROM edb_sql_protect_stats;         
 username | superusers | relations | commands | tautology | dml          
----------+------------+-----------+----------+-----------+-----         
 appuser  |          0 |         3 |        1 |         1 |   0         
(1 row)         
         
edb=# SELECT * FROM edb_sql_protect_queries;         
-[ RECORD 1 ]+---------------------------------------------         
 username     | appuser                                               
 ip_address   |                                                       
 port         |                                                       
 machine_name |                                                       
 date_time    | 20-JUN-14 13:21:00 -04:00                             
 query        | INSERT INTO appuser_tab_2 VALUES (1);                 
-[ RECORD 2 ]+---------------------------------------------         
 username     | appuser                                               
 ip_address   |                                                       
 port         |                                                       
 machine_name |                                                       
 date_time    | 20-JUN-14 13:21:00 -04:00                             
 query        | CREATE TABLE appuser_tab_2 (f1 INTEGER);              
-[ RECORD 3 ]+---------------------------------------------         
 username     | appuser                                               
 ip_address   |                                                       
 port         |                                                       
 machine_name |                                                       
 date_time    | 20-JUN-14 13:22:00 -04:00                             
 query        | INSERT INTO appuser_tab_2 VALUES (2);                 
-[ RECORD 4 ]+---------------------------------------------         
 username     | appuser                                               
 ip_address   |                                                       
 port         |                                                       
 machine_name |                                                       
 date_time    | 20-JUN-14 13:22:00 -04:00                             
 query        | SELECT * FROM appuser_tab_2 WHERE 'x' = 'x';         

采用active模式,警告变成错误,实际起到预防作用。

edb_sql_protect.enabled = on         
edb_sql_protect.level = active         
         
edb=> CREATE TABLE appuser_tab_3 (f1 INTEGER);         
ERROR:  SQLPROTECT: This command type is illegal for this user         
edb=> INSERT INTO appuser_tab_2 VALUES (1);         
ERROR:  SQLPROTECT: Illegal Query: relations         
edb=> SELECT * FROM appuser_tab_2 WHERE 'x' = 'x';         
ERROR:  SQLPROTECT: Illegal Query: relations         

8、配置其他规则包括(禁止DDL开关,禁止不带WHERE条件的DML开关,禁止WHERE始终为TRUE的查询SQL开关。)

UPDATE edb_sql_protect SET allow_utility_cmds = TRUE WHERE dbid = 13917 AND roleid = 16671;         
         
edb=# SELECT dbid, roleid, allow_utility_cmds FROM edb_sql_protect;         
 dbid  | roleid | allow_utility_cmds          
-------+--------+--------------------         
 13917 |  16671 | t         
(1 row)         

9、规则导出和导入。注意:所有的规则的标记都是基于OID的,例如对象、用户,存储的都是OID。

当使用逻辑导出、导入时,由于目标库的OID与源库可能不一样,所以导入、导出必须使用特殊的方法(PPAS提供了这个导入函数接口,可以在导入时,转换为对应的OID)。

https://www.enterprisedb.com/docs/en/10.0/EPAS_Guide_v10/EDB_Postgres_Advanced_Server_Guide.1.51.html

导出,除了pg_dump之外,还需要使用这个方法导出规则。

pg_dump -U enterprisedb -Fp -f /tmp/edb.dmp edb         
edb=# SELECT sqlprotect.export_sqlprotect('/tmp/sqlprotect.dmp');         
 export_sqlprotect         
-------------------         
          
(1 row)         

导入,除了导入数据以外,需要额外的操作

首先要删除已有数据

/opt/edb/as10/bin/psql -d newdb -U enterprisedb -f /tmp/edb.dmp         
         
         
DELETE FROM sqlprotect.edb_sql_protect_rel;         
DELETE FROM sqlprotect.edb_sql_protect;         
         
SELECT * FROM sqlprotect.edb_sql_protect_stats;         
....         
SELECT sqlprotect.drop_stats('appuser');         

然后使用API导入:

newdb=# SELECT sqlprotect.import_sqlprotect('/tmp/sqlprotect.dmp');         
 import_sqlprotect         
-------------------         
          
(1 row)         

10、统计信息表解读

计数表:edb_sql_protect_stats

  • username. Name of the protected role.

  • superusers. Number of SQL statements issued when the protected role is a superuser. In effect, any SQL statement issued by a protected superuser increases this statistic. See Section 4.1.1.2.1 for information on protected superusers.

  • relations. Number of SQL statements issued referencing relations that were not learned by a protected role. (That is, relations that are not in a role’s protected relations list.)

  • commands. Number of DDL statements issued by a protected role.

  • tautology. Number of SQL statements issued by a protected role that contained a tautological condition.

  • dml. Number of UPDATE and DELETE statements issued by a protected role that did not contain a WHERE clause.

风险SQL表:edb_sql_protect_queries

  • username. Database user name of the attacker used to log into the database server.

  • ip_address. IP address of the machine from which the attack was initiated.

  • port. Port number from which the attack originated.

  • machine_name. Name of the machine, if known, from which the attack originated.

  • date_time. Date and time at which the query was received by the database server. The time is stored to the precision of a minute.

  • query. The query string sent by the attacker.

用法

1、添加被监控的用户

edb=# SELECT protect_role('newuser');         
 protect_role         
--------------         
          
(1 row)         

2、删除被监控的用户(即不再监控这个用户)

unprotect_role('rolename')         
unprotect_role(roleoid)         

3、设置角色的监控项(白名单保护、DDL保护、SELECT保护、DML保护)

UPDATE edb_sql_protect SET allow_utility_cmds = TRUE WHERE dbid = 13917 AND roleid = 16671;         
         
edb=# \x         
Expanded display is on.         
edb=# SELECT * FROM list_protected_users;  -- 或 基表 edb_sql_protect         
-[ RECORD 1 ]------+--------         
dbname             | edb         
username           | appuser           
protect_relations  | t   -- 是否使用白名单保护对象         
allow_utility_cmds | f   -- 否允许执行DDL         
allow_tautology    | f   -- 是否允许执行包含TRUE条件的SELECT         
allow_empty_dml    | f   -- 是否允许执行包含TRUE条件的DML         

4、白名单管理,从白名单移除某个对象

unprotect_rel('rolename', 'relname')         
unprotect_rel('rolename', 'schema', 'relname')         
unprotect_rel(roleoid, reloid)         
         
edb=# SELECT unprotect_rel('appuser', 'public', 'emp');         
 unprotect_rel         
---------------         
          
(1 row)         

5、清除计数器(风险计数器)

drop_stats('rolename')         
drop_stats(roleoid)         
         
edb=# SELECT drop_stats('appuser');         
 drop_stats         
------------         
          
(1 row)         
          
edb=# SELECT * FROM edb_sql_protect_stats;         
 username | superusers | relations | commands | tautology | dml         
----------+------------+-----------+----------+-----------+-----         
(0 rows)         

如果对象已不存在,使用OID来移除

edb=# SELECT * FROM edb_sql_protect_stats;         
      username       | superusers | relations | commands | tautology | dml         
---------------------+------------+-----------+----------+-----------+-----         
 unknown (OID=16693) |          0 |         5 |        3 |         1 |   0         
 appuser             |          0 |         5 |        2 |         1 |   0         
(2 rows)         
          
edb=# SELECT drop_stats(16693);         
 drop_stats         
------------         
          
(1 row)         
          
edb=# SELECT * FROM edb_sql_protect_stats;         
 username | superusers | relations | commands | tautology | dml         
----------+------------+-----------+----------+-----------+-----         
 appuser  |          0 |         5 |        2 |         1 |   0         
(1 row)         

6、清除风险SQL日志

drop_queries('rolename')         
drop_queries(roleoid)         
         
         
edb=# SELECT drop_queries('appuser');         
 drop_queries          
--------------         
            5         
(1 row)         
          
edb=# SELECT * FROM edb_sql_protect_queries;         
 username | ip_address | port | machine_name | date_time | query          
----------+------------+------+--------------+-----------+-------         
(0 rows)         

如果对象已不存在,使用OID来移除

edb=# SELECT username, query FROM edb_sql_protect_queries;           
      username       |                    query                              
---------------------+----------------------------------------------         
 unknown (OID=16454) | CREATE TABLE appuser_tab_2 (f1 INTEGER);         
 unknown (OID=16454) | INSERT INTO appuser_tab_2 VALUES (2);         
 unknown (OID=16454) | CREATE TABLE appuser_tab_3 (f1 INTEGER);         
 unknown (OID=16454) | INSERT INTO appuser_tab_2 VALUES (1);         
 unknown (OID=16454) | SELECT * FROM appuser_tab_2 WHERE 'x' = 'x';         
(5 rows)         
          
edb=# SELECT drop_queries(16454);         
 drop_queries          
--------------         
            5         
(1 row)         
          
edb=# SELECT * FROM edb_sql_protect_queries;         
 username | ip_address | port | machine_name | date_time | query          
----------+------------+------+--------------+-----------+-------         
(0 rows)         

7、启动或禁止SQL防火墙

edb_sql_protect.enabled = off         
edb_sql_protect.enabled = on         

小结

PPAS的SQL防火墙实现了以下风险的管理:

1、防止SQL注入。

2、防止业务访问无需访问的对象。

3、防止业务执行DDL。

4、防止业务执行不带WHERE条件的DML。

5、防止业务执行不带WHERE条件或者WHERE条件始终未TRUE的查询。

PostgreSQL的权限体系也非常的健全,从连接、库、SCHEMA、对象一直到行这个级别,都支持权限管理。

《PostgreSQL 逻辑结构 和 权限体系 介绍》

授权甚至精确到行、列、安全标签 这个层面。

1、列级授权

https://www.postgresql.org/docs/10/static/sql-grant.html

2、行级授权,使用的是row security label

https://www.postgresql.org/docs/10/static/ddl-rowsecurity.html

《PostgreSQL 行安全策略 - PostgreSQL 9.5 new feature - can define row security policy for table》

3、安全标签。结合LINUX的selinux特性,可以更加的精确。

https://wiki.postgresql.org/wiki/SEPostgreSQL_SELinux_Overview

https://www.postgresql.org/docs/10/static/sql-security-label.html

https://www.postgresql.org/docs/10/static/sepgsql.html

虽然PG的权限体系非常的完善,但是依旧无法完全防止攻击者带来的危害,只是减轻而已。

PS: 要注意,SQL防火墙,同样也不能完全避免危害,也只能减轻而已。不要以为有SQL防火墙就万事大吉了。

参考

《PostgreSQL 逻辑结构 和 权限体系 介绍》

《PostgreSQL 转义、UNICODE、与SQL注入》

《PostgreSQL SQL防火墙》

《PostgreSQL SQL filter (SQL 成本|语义过滤器)》

目录
相关文章
|
7月前
|
关系型数据库 MySQL 数据库
阿里云数据库RDS费用价格:MySQL、SQL Server、PostgreSQL和MariaDB引擎收费标准
阿里云RDS数据库支持MySQL、SQL Server、PostgreSQL、MariaDB,多种引擎优惠上线!MySQL倚天版88元/年,SQL Server 2核4G仅299元/年,PostgreSQL 227元/年起。高可用、可弹性伸缩,安全稳定。详情见官网活动页。
1199 152
|
7月前
|
关系型数据库 MySQL 数据库
阿里云数据库RDS支持MySQL、SQL Server、PostgreSQL和MariaDB引擎
阿里云数据库RDS支持MySQL、SQL Server、PostgreSQL和MariaDB引擎,提供高性价比、稳定安全的云数据库服务,适用于多种行业与业务场景。
900 156
|
10月前
|
SQL 关系型数据库 MySQL
Go语言数据库编程:使用 `database/sql` 与 MySQL/PostgreSQL
Go语言通过`database/sql`标准库提供统一数据库操作接口,支持MySQL、PostgreSQL等多种数据库。本文介绍了驱动安装、连接数据库、基本增删改查操作、预处理语句、事务处理及错误管理等内容,涵盖实际开发中常用的技巧与注意事项,适合快速掌握Go语言数据库编程基础。
1202 213
|
7月前
|
关系型数据库 分布式数据库 数据库
阿里云数据库收费价格:MySQL、PostgreSQL、SQL Server和MariaDB引擎费用整理
阿里云数据库提供多种类型,包括关系型与NoSQL,主流如PolarDB、RDS MySQL/PostgreSQL、Redis等。价格低至21元/月起,支持按需付费与优惠套餐,适用于各类应用场景。
|
10月前
|
SQL 关系型数据库 PostgreSQL
CTE vs 子查询:深入拆解PostgreSQL复杂SQL的隐藏性能差异
本文深入探讨了PostgreSQL中CTE(公共表表达式)与子查询的选择对SQL性能的影响。通过分析两者底层机制,揭示CTE的物化特性及子查询的优化融合优势,并结合多场景案例对比执行效率。最终给出决策指南,帮助开发者根据数据量、引用次数和复杂度选择最优方案,同时提供高级优化技巧和版本演进建议,助力SQL性能调优。
1118 1
|
SQL 关系型数据库 MySQL
vb6读取mysql,用odbc mysql 5.3版本驱动
通过以上步骤,您可以在VB6中使用ODBC MySQL 5.3驱动连接MySQL数据库并读取数据。配置ODBC数据源、编写VB6代码
512 32
|
SQL 关系型数据库 OLAP
云原生数据仓库AnalyticDB PostgreSQL同一个SQL可以实现向量索引、全文索引GIN、普通索引BTREE混合查询,简化业务实现逻辑、提升查询性能
本文档介绍了如何在AnalyticDB for PostgreSQL中创建表、向量索引及混合检索的实现步骤。主要内容包括:创建`articles`表并设置向量存储格式,创建ANN向量索引,为表增加`username`和`time`列,建立BTREE索引和GIN全文检索索引,并展示了查询结果。参考文档提供了详细的SQL语句和配置说明。
523 2
|
关系型数据库 MySQL Linux
MySQL版本升级(8.0.31->8.0.37)
本次升级将MySQL从8.0.31升级到8.0.37,采用就地升级方式。具体步骤包括:停止MySQL服务、备份数据目录、下载并解压新版本的RPM包,使用`yum update`命令更新已安装的MySQL组件,最后启动MySQL服务并验证版本。整个过程需确保所有相关RPM包一同升级,避免部分包遗漏导致的问题。官方文档提供了详细指导,确保升级顺利进行。
1473 16
|
SQL 安全 前端开发
Web学习_SQL注入_联合查询注入
联合查询注入是一种强大的SQL注入攻击方式,攻击者可以通过 `UNION`语句合并多个查询的结果,从而获取敏感信息。防御SQL注入需要多层次的措施,包括使用预处理语句和参数化查询、输入验证和过滤、最小权限原则、隐藏错误信息以及使用Web应用防火墙。通过这些措施,可以有效地提高Web应用程序的安全性,防止SQL注入攻击。
699 2
|
关系型数据库 MySQL
mysql 5.7.x版本查看某张表、库的大小 思路方案说明
mysql 5.7.x版本查看某张表、库的大小 思路方案说明
324 5

相关产品

  • 云原生数据库 PolarDB
  • 云数据库 RDS PostgreSQL 版
  • 推荐镜像

    更多