mysql存储过程读表_mysql Event、存储过程、表命令

mysql< SET @@event_scheduler = OFF;

ERROR1229 (HY000): Variable ‘event_scheduler‘ is a GLOBAL variable and should be set with SET GLOBAL

启动服务器时如果指定了--skip-grant-tables选项,则event_scheduler则自动被设置为DISABLED。命令行或配置文件的设置都会被覆盖。

二、事件信息

所有定义的时间可以通过如下方法查看:

1、查询mysql数据库的event表:

mysql> select * from mysql.event \G

*************************** 1. row ***************************

db: test

name: evt_insert

body: insert into account values(NULL, 100.00)

definer: root@localhost

execute_at: NULL

interval_value: 10

interval_field: SECOND

created: 2013-06-13 14:07:54

modified: 2013-06-13 14:07:54

last_executed: 2013-06-13 19:29:44

starts: 2013-06-13 18:07:54

ends: NULL

status: ENABLED

on_completion: DROP

sql_mode:

comment:

originator: 1

time_zone: SYSTEM

character_set_client: utf8

collation_connection: utf8_general_ci

db_collation: utf8_general_ci

body_utf8: insert into account values(NULL, 100.00)

1 row in set (0.01 sec)

2、查询information_schema数据库的events表:

mysql> select * from information_schema.events \G

*************************** 1. row ***************************

EVENT_CATALOG: def

EVENT_SCHEMA: test

EVENT_NAME: evt_insert

DEFINER: root@localhost

TIME_ZONE: SYSTEM

EVENT_BODY: SQL

EVENT_DEFINITION: insert into account values(NULL, 100.00)

EVENT_TYPE: RECURRING

EXECUTE_AT: NULL

INTERVAL_VALUE: 10

INTERVAL_FIELD: SECOND

SQL_MODE:

STARTS: 2013-06-13 14:07:54

ENDS: NULL

STATUS: ENABLED

ON_COMPLETION: NOT PRESERVE

CREATED: 2013-06-13 14:07:54

LAST_ALTERED: 2013-06-13 14:07:54

LAST_EXECUTED: 2013-06-13 15:30:14

EVENT_COMMENT:

ORIGINATOR: 1

CHARACTER_SET_CLIENT: utf8

COLLATION_CONNECTION: utf8_general_ci

DATABASE_COLLATION: utf8_general_ci

1 row in set (0.01 sec)

3、使用show create event命令可以查看事件创建信息

mysql> show create e

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值