在开启bin-log日志下Mysql报错
This function has none of DETERMINISTIC, NO SQL解决办法
创建存储过程时
出错信息:
ERROR 1418 (HY000): This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)
原因:
这是我们开启了bin-log, 我们就必须指定我们的函数是否是
1 DETERMINISTIC 不确定的
2 NO SQL 没有SQl语句,当然也不会修改数据
3 READS SQL DATA 只是读取数据,当然也不会修改数据
4 MODIFIES SQL DATA 要修改数据
5 CONTAINS SQL 包含了SQL语句其中在function里面,只有 DETERMINISTIC, NO SQL 和 READS SQL DATA 被支持。如果我们开启了 bin-log, 我们就必须为我们的function指定一个参数。
解决方法:
SQL code;mysql> show variables like 'log_bin_trust_function_creators';+---------------------------------+-------+| Variable_name | Value |+---------------------------------+-------+| log_bin_trust_function_creators | ON |+---------------------------------+-------+这样添加了参数以后,如果mysqld重启,那个参数又会消失,因此记得在my.cnf配置文件中添加:
log_bin_trust_function_creators=1
在开启bin-log日志下Mysql报错的更多相关文章
- Ubuntu下MySQL报错:ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
在Ubuntu下 想要登录mysql数据库 root@JD:~# mysql -uroot -p 报错 ERROR 1045 (28000): Access denied for user 'root ...
- Linux下Mysql报错
报错内容为:[mysql]ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/ ...
- 一看便知linux下mysql报错ERROR 1044: Access denied for user: '@localhost' to database 'mysql'
错误信息:ERROR 1044: Access denied for user: '@localhost' to database 'mysql' linux下解决方案: mysql> use ...
- Linux环境下mysql报错:bash: mysql: command not found 的解决方法
# mysql -u root-bash: mysql: command not found 原因:这是由于系统默认会查找/usr/bin下的命令. 如果这个命令不在这个目录下,当然会找不到命令. 我 ...
- Win7环境下mysql报错1045:Access denied for user root@localhost错误解决方法
产生场景:在涉及到连接数据库操作的时候,会报1045:Access denied for user root@localhost. 比如:本地建立的数据库连接不上,在IDEA等开发工具中使用反向生成. ...
- 开启bin-log日志mysql报错:This function has none of DETERMINISTIC, NO SQL解决办法
开启bin-log日志mysql报错:This function has none of DETERMINISTIC, NO SQL解决办法: 创建存储过程时 出错信息: ERROR 1418 (HY ...
- mysql报错Ignoring the redo log due to missing MLOG_CHECKPOINT between
mysql报错Ignoring the redo log due to missing MLOG_CHECKPOINT between mysql版本:5.7.19 系统版本:centos7.3 由于 ...
- 【Problem】xampp in ubuntu下命令行启动mysql报错: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/opt/lampp/var/mysql/mysql.sock' (2)
xampp in ubuntu下命令行启动mysql报错: reddevil@reddevil-Lenovo:/opt/lampp$ ./bin/mysql -u root -p Enter pass ...
- Linux系统下启动MySQL报错:Neither host 'localhost.localdomain' nor 'localhost' could be looked up with
Linux系统下启动MySQL报错:Neither host 'localhost.localdomain' nor 'localhost' could be looked up with 摘要 Li ...
随机推荐
- Qt下使用的静态链接库------ *.lib转化为mingw使用的.a格式的静态库
使用MinGW附带的工具reimp.exe,该工具一般在MinGW in目录下,其readme文档在MinGWdoc eimp目录下, 方法很简单,比如: C:CodeBlocksMinGWlibdx ...
- Redmine是用Ruby开发的基于web的项目管理软件,是用ROR框架开发的一套跨平台项目管理系统
- Android Studio:Error:Execution failed for task ':app:mergeDebugResources'. > Some file crunching failed, see logs for details
Gradle 编译错误: 14:39:58 Executing tasks: [clean, :app:generateDebugSources, :app:mockableAndroidJar, : ...
- lucene4.6 索引创建和搜索例子
本文转自:http://blog.csdn.net/jyf211314/article/details/17503997 点击打开链接 lucene4.6小例子,Lucene全文检 ...
- poj 2441 Arrange the Bulls(状态压缩dp)
Description Farmer Johnson's Bulls love playing basketball very much. But none of them would like to ...
- java多个listener监听
java 多个listener 监听方法 在class 名称上一行添加@Listeners 括号中用逗号隔开 @Listeners({com.example.MyListener.class,com. ...
- Java小项目--坦克大战(version1.0)
Java小项目--坦克大战<TankWar1.0> 这个小项目主要是练习j2se的基础内容和面向对象的思想.项目实现了基本的简单功能,我方一辆坦克,用上下左右键控制移动方向,按F键为发射炮 ...
- [Javascript] Call Stack
Every time when a function run it will be push into the call stack and put on the top, you can thin ...
- ASE中的主要数据库
Adaptive Server包括多种类型数据库: 必需数据库. “附加功能”数据库 .例子数据库 .应用数据库 1.必需数据库 master 数据库包含系统表,这些系统表中存储的数据被用来管理,有 ...
- 注册DLL,Unregister DLL
前一篇文章,反复注册,反注册.... 写了一个小工具 怎么传图片感觉不对劲,StatusBar应改成 拖动DLL至上方 文件 http://files.cnblogs.com/magicdawn/Dl ...