information_schema.events 学习
information_schema.events 表保存了整个mysql实例中的event 信息
1、常用列:
1、event_catalog :永远是def
2、event_schema :event 所在的数据库名
3、event_name :event 名
4、definer :创建这个event 的用户
5、event_definition :event 的内容
6、event_type :event 的类型 one time 表示执行一次,RECURRING表示重复执行。
7、status :event 的启用情况 enable | disable | slaveside_disable
2、例子:
创建一个event
delimiter go create event if not exists event_insert
ON SCHEDULE EVERY 2 second
do
begin
insert into tempdb.events_table(insert_time) values(current_timestamp());
end
go delimiter ;
查看information_schema.events 的信息
mysql> select * from information_schema.events \G
*************************** 1. row ***************************
EVENT_CATALOG: def
EVENT_SCHEMA: tempdb
EVENT_NAME: event_insert
DEFINER: root@localhost
TIME_ZONE: SYSTEM
EVENT_BODY: SQL
EVENT_DEFINITION: begin
insert into tempdb.events_table(insert_time) values(current_timestamp());
end
EVENT_TYPE: RECURRING
EXECUTE_AT: NULL
INTERVAL_VALUE: 2
INTERVAL_FIELD: SECOND
SQL_MODE: STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION
STARTS: 2016-08-25 22:12:20
ENDS: NULL
STATUS: ENABLED
ON_COMPLETION: NOT PRESERVE
CREATED: 2016-08-25 22:12:20
LAST_ALTERED: 2016-08-25 22:12:20
LAST_EXECUTED: 2016-08-25 22:25:12
EVENT_COMMENT:
ORIGINATOR: 1
CHARACTER_SET_CLIENT: utf8
COLLATION_CONNECTION: utf8_general_ci
DATABASE_COLLATION: utf8_general_ci
information_schema.events 学习的更多相关文章
- information_schema.referential_constraints 学习
information_schema.referential_constraints 表用于查看外键约束 1.information_schema.referential_constraints表的常 ...
- information_schema.profiling学习
information_schema.profiling可以用来分析每一条SQL在它执行的各个阶段的用时,注意这个表是session 级的,也就是说如果session1 开启了它:session2没有 ...
- information_schema.optimizer_trace学习
information_schema.optimizer_trace 用于追踪优化器的优化过程:通常来说这张表中是没有数据的,要想开户追踪要把 @@session.optimizer_trace='e ...
- information_schema.triggers 学习
mysql实例中的每一个trigger 对应到information_schema.triggers 中有一行 1.information_schema.triggers 表的常用列: 1.trigg ...
- information_schema.routines 学习
information_schema.routines 用户查看mysql中的routine信息 1.information_schema.routines 表中的常用列: 1.
- information_schema.key_column_usage 学习
information_schema.key_column_usage 表可以查看索引列上的约束: 1.information_schema.key_column_usage 的常用列: 1.cons ...
- information_schema.engines学习
当前mysql实例的存储引擎信息可以从information_schema.engines 中查询到 例子: mysql> select * from information_schema.en ...
- information_schema.column_privileges 学习
mysql 的授权是分层次的 实例级 | 库级 | 表级 | 列级 而这些授权信息被保存在了mysql.user | mysql.db | mysql.tables_priv | mysql.colu ...
- information_schema.columns 学习
每一个表中的每一列都会在information_schema.columns表中对应一行 1.informaiton_schema.columns 常用列: 1.table_catalog :不管是t ...
随机推荐
- Jasper_passValue_return value from the subreport to main report
create a variable In subreport say returnValue variable class type --> whatever u want calculati ...
- CentOS终端操作mysql
1.停用mysql服务:service mysqld stop 重启mysql服务:service mysql restart 2.mysql 1045ERROR:mysqld_safe --user ...
- Oracle left查询案例
)) summoney from( select t2.ano,d.dmoney from ( select t1.*,c.cno from( select a.ano,b.bno from t_a ...
- 如何删除textarea的移动版Safari的阴影?
如何删除textarea的移动版Safari的阴影? 在iphone的Safari上运行网页,textarea无法使用box-shadow样式,而且顶部有内阴影,如何清除? 添加评论 分享 赞同1 ...
- Codeforces 577B Modulo Sum
http://codeforces.com/problemset/problem/577/B 题意:有n个数,求有无一个子序列满足和是m的倍数 思路:用模下的背包做,发现n是十的六次方级别,但是有个神 ...
- qt捕获全局windows消息(使用QAbstractNativeEventFilter,然后注册这个类)
qt 如何捕获全屏的鼠标事件,这个帖子上面主要讲述了下嵌入式qt怎么抓取系统级消息,不过从这篇文章中我也看到了希望,有个回复说winEventFilter支持这种方式,然后我就顺着这个线索找到了na ...
- java设计模式--结构型模式--装饰模式
装饰模式 概述 动态地给一个对象添加一些额外的职责.就增加功能来说,Decorator模式相比生成子类更为灵活. 适用性 1.在不影响其他对象的情况下,以动态.透明的方式给单个对象添加职责. 2.处理 ...
- Hdu4742-Pinball Game 3D(cdq分治+树状数组)
Problem Description RD is a smart boy and excel in pinball game. However, playing common 2D pinball ...
- UVa10653.Prince and Princess
题目连接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem& ...
- 【HDU1272】小希的迷宫(并查集基础题)
仍旧裸敲并查集.有这两点注意: 1.输入 0 0 时候要输出YES 2.留心数组的初始化 #include <iostream> #include <cstring> #inc ...