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 ...
随机推荐
- DAO 基础学习笔记
一.DAO 1.概念: (1)Date Access Object(数据存取对象) (2)位于业务逻辑和持久化数据之间 (3)实现对持久化数据的访问 (4)类---> DAO --->数据 ...
- MyEclipse8.5自动生成注册码
package com; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamRe ...
- MVC之实体框架(数据持久化框架)EntityFrameWork(EF)
EF - EntityFrameWork 中文名:实体框架(数据持久化框架) 1.使用EF查询(Linq to EF) 1.1使用标准查询运算符来查询 OumindBlogEntities db = ...
- 【转】【Android】HAL分析
原文网址:http://www.cnblogs.com/lcw/p/3335505.html HAL概述 以下是基于android4.0.3,对应其他低版本的代码,可能有所差异,但基本大同小异. An ...
- Find Peak Element 解答
Question A peak element is an element that is greater than its neighbors. Given an input array where ...
- 利用智能手机(Android)追踪一块磁铁(三)
更新磁铁追踪算法的源代码,Android Studio项目工程 github地址:https://github.com/amazingyyc/MagnetLocate 说明:将磁铁的位置信息封装成消息 ...
- hbase的thriftserver开启
说明:hbase的thriftserver默认已经编译好,可以使用,不需要跟hadoopthrift一样配置. 要使用Hbase的thrift接口,必须将它的服务启动,命令行为: hbase-deam ...
- 游标的使用实例(Sqlserver版本)
游标,如果是之前给我说这个概念,我的脑子有二个想法:1.你牛:2.我不会 不会不是理由,更不是借口,于是便要学习,本人属性喜欢看代码,不喜欢看书的人,所以嘛,文字对我没有吸引力:闲话少说啊,给大家提供 ...
- XSS第二节,XSS左邻右舍
昨天的文章中引用了OWASP2013年的江湖排名,今天来看一下TOP中XSS的左邻右舍都是谁,先看一下他们的大名,再进一步介绍 [以下主要翻译自https://www.owasp.org/index. ...
- 用函数式的 Swift 实现图片转字符画的功能
今天整理 Pocket 中待看的文章,看到这篇<Creating ASCII art in functional Swift>,讲解如何用 Swift 将图片转成 ASCII 字符.具体原 ...