跳到主要内容
版本: 最新版本-3.5

DELETE SQLBLACKLIST

DELETE SQLBLACKLIST 从 SQL 黑名单中删除 SQL 正则表达式。

有关 SQL 黑名单的更多信息,请参阅 管理 SQL 黑名单

提示

此操作需要 SYSTEM 级别的 BLACKLIST 权限。您可以按照 GRANT 中的说明授予此权限。

语法

DELETE SQLBLACKLIST <sql_index_number>

参数

sql_index_number:SQL 黑名单中 SQL 正则表达式的索引号。 多个索引号用逗号 (,) 和空格分隔。 您可以使用 SHOW SQLBLACKLIST 获取索引号。

示例

mysql> DELETE SQLBLACKLIST 3, 4;

mysql> SHOW SQLBLACKLIST;
+-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Index | Forbidden SQL |
+-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| 1 | select count\(\*\) from .+ |
| 2 | select id_int \* 4, id_tinyint, id_varchar from test_all_type_nullable except select id_int, id_tinyint, id_varchar from test_basic except select \(id_int \* 9 \- 8\) \/ 2, id_tinyint, id_varchar from test_all_type_nullable2 except select id_int, id_tinyint, id_varchar from test_basic_nullable |
+-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+