gpt4 book ai didi

mysql - 可以在 mysql (5.5) 中创建模式 INFORMATION_SCHEMA 中表的触发器吗?

转载 作者:太空宇宙 更新时间:2023-11-03 12:14:38 25 4
gpt4 key购买 nike

我希望能够在创建表之前暂停(几秒钟左右),以便我可以在我的控制台中发现安装过程中的哪个步骤正在运行“CREATE TABLE”语句。

如果我能够在“INFORMATION_SCHEMA”中的表上创建触发器,我假设我能够捕捉到试图创建表的确切时刻,并且我可以看到我正在运行的脚本开始创建文件。

目前当我引用 INFORMATION_SCHEMA 中的表时,CREATE TRIGGER ... 语句没有执行任何操作。

有没有办法绕过这个?

最佳答案

您不能在 information_schema 数据库中的表上设置触发器。

参见手册。

 MySQL 5.1 Reference Manual

Chapter 20. INFORMATION_SCHEMA Tables


Usage Notes for the INFORMATION_SCHEMA Database


INFORMATION_SCHEMA is a database within each MySQL instance, the place that stores
information about all the other databases that the MySQL server maintains. The
INFORMATION_SCHEMA database contains several read-only tables. They are actually views, not
base tables, so there are no files associated with them, and you cannot set triggers on them.

关于mysql - 可以在 mysql (5.5) 中创建模式 INFORMATION_SCHEMA 中表的触发器吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22734803/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com