Chinaunix首页 | 论坛 | 博客
  • 博客访问: 4117012
  • 博文数量: 447
  • 博客积分: 1241
  • 博客等级: 中尉
  • 技术积分: 5786
  • 用 户 组: 普通用户
  • 注册时间: 2011-01-27 06:48
个人简介

读好书,交益友

文章分类

全部博文(447)

文章存档

2023年(6)

2022年(29)

2021年(49)

2020年(16)

2019年(15)

2018年(23)

2017年(67)

2016年(42)

2015年(51)

2014年(57)

2013年(52)

2012年(35)

2011年(5)

分类: Mysql/postgreSQL

2016-01-07 15:35:53

我在mysql中很少使用存储过程和触发器,最近公司使用mysql 5.5发现不能导入触发器。

mysql> show global variables WHERE Variable_name LIKE 'log_bin%'; 
+---------------------------------+-------+ 
| Variable_name                   | Value | 
+---------------------------------+-------+ 
| log_bin                         | ON    | 
| log_bin_trust_function_creators | OFF   | 
| log_bin_trust_routine_creators  | OFF   | 
+---------------------------------+-------+ 
3 rows in set (0.00 sec) 


mysql> SET GLOBAL log_bin_trust_function_creators = 1; 
Query OK, 0 rows affected (0.00 sec) 

mysql> SET GLOBAL log_bin_trust_routine_creators = 1; 
Query OK, 0 rows affected, 1 warning (0.00 sec 


mysql> show global variables WHERE Variable_name LIKE 'log_bin%'; 
+---------------------------------+-------+ 
| Variable_name                   | Value | 
+---------------------------------+-------+ 
| log_bin                         | ON    | 
| log_bin_trust_function_creators | ON    | 
| log_bin_trust_routine_creators  | ON    | 
+---------------------------------+-------+ 
3 rows in set (0.00 sec)


如果重启mysql 建议在my.cnf中加入
log-bin-trust-function-creators = true 
log-bin-trust-routine-creators = true
阅读(2477) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~