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 学习的更多相关文章

  1. information_schema.referential_constraints 学习

    information_schema.referential_constraints 表用于查看外键约束 1.information_schema.referential_constraints表的常 ...

  2. information_schema.profiling学习

    information_schema.profiling可以用来分析每一条SQL在它执行的各个阶段的用时,注意这个表是session 级的,也就是说如果session1 开启了它:session2没有 ...

  3. information_schema.optimizer_trace学习

    information_schema.optimizer_trace 用于追踪优化器的优化过程:通常来说这张表中是没有数据的,要想开户追踪要把 @@session.optimizer_trace='e ...

  4. information_schema.triggers 学习

    mysql实例中的每一个trigger 对应到information_schema.triggers 中有一行 1.information_schema.triggers 表的常用列: 1.trigg ...

  5. information_schema.routines 学习

    information_schema.routines 用户查看mysql中的routine信息 1.information_schema.routines 表中的常用列: 1.

  6. information_schema.key_column_usage 学习

    information_schema.key_column_usage 表可以查看索引列上的约束: 1.information_schema.key_column_usage 的常用列: 1.cons ...

  7. information_schema.engines学习

    当前mysql实例的存储引擎信息可以从information_schema.engines 中查询到 例子: mysql> select * from information_schema.en ...

  8. information_schema.column_privileges 学习

    mysql 的授权是分层次的 实例级 | 库级 | 表级 | 列级 而这些授权信息被保存在了mysql.user | mysql.db | mysql.tables_priv | mysql.colu ...

  9. information_schema.columns 学习

    每一个表中的每一列都会在information_schema.columns表中对应一行 1.informaiton_schema.columns 常用列: 1.table_catalog :不管是t ...

随机推荐

  1. cf B. Resort

    http://codeforces.com/contest/350/problem/B 从旅馆开始倒着找到一个点它的出度>1的位置为止,比较长度大小,找到一个长度最大的即可. #include ...

  2. openssl对数组加密解密的完整实现代码

    本例是用C实现的对一个数组进行加密,加密到第二个数组,然后解密到另一个数组的完整实现代码. #include <stdio.h> #include <string.h> #in ...

  3. 一键安装IIS的点点滴滴——For所有Microsoft的操作系统(上)

    原文www.cnblogs.com/cdts_change/archive/2010/03/04/1677338.html 临近公司的软件要完工了,最近几天一直在泉哥的带领下为我们公司的产品做IIS一 ...

  4. C# WEB API ApiController 修改response header contentType

    var res = Request.CreateResponse(HttpStatusCode.OK, file); res.Content.Headers.ContentType = new Med ...

  5. Controlling Access in Java

    Referrence: Oracle Java Doc Two levels top level: public, or package-private (no explicit modifier) ...

  6. UVA10304---(区间DP)

    第一开始想着枚举根节点,然后记忆化搜索..结果TLE,最后还是看了一眼题解瞬间明白了..唉,还是思维太局限了 由于数据是按照从小到大排列的,可以自然地组成一颗二叉排序树. 设dp[i][j]是区间[i ...

  7. C 本地文件夸网文件Cp操作

    1,linux平台C简单实现本地文件cp 码子及运行效果测试

  8. 腾讯课堂-草图大师 Sketchup 初级到精通视频讲座

    腾讯课堂-草图大师 Sketchup 初级到精通视频讲座 草图大师 Sketchup 初级到精通视频讲座

  9. shell数组(产生不同的随机数)

    #!/bin/bash # declare -a ARRAY read -p "Please input num[1-39]:" EMENUM #对比新生成的随机数是否重复 fun ...

  10. python json基础学习01

    # -*- coding: utf-8 -*- # python:2.x __author__ = 'Administrator' import json #全称(javascript object  ...