执行MySql更新报错:error code [1785]
来源:互联网 发布:js判断是否为质数 编辑:程序博客网 时间:2024/06/06 17:02
应用连接MySql数据库,报错,报错信息如下:
### Error updating database. Cause: java.sql.SQLException: When @@GLOBAL.ENFORCE_GTID_CONSISTENCY = 1, updates to non-transactional tables can only be done in either autocommitted statements or single-statement transactions, and never in the same statement as updates to transactional tables.
### Cause: java.sql.SQLException: When @@GLOBAL.ENFORCE_GTID_CONSISTENCY = 1, updates to non-transactional tables can only be done in either autocommitted statements or single-statement transactions, and never in the same statement as updates to transactional tables.; uncategorized SQLException for SQL []; SQL state [HY000]; error code [1785]; When @@GLOBAL.ENFORCE_GTID_CONSISTENCY = 1, updates to non-transactional tables can only be done in either autocommitted statements or single-statement transactions, and never in the same statement as updates to transactional tables.; nested exception is java.sql.SQLException: When @@GLOBAL.ENFORCE_GTID_CONSISTENCY = 1, updates to non-transactional tables can only be done in either autocommitted statements or single-statement transactions, and never in the same statement as updates to transactional tables.
error code [1785]
通过各种查询发现是建表语句和数据库版本的的问题。
本地服务器版本:5.1.73
服务器版本:5.6
而在建表语句中,表的类型为:
ENGINE=MyISAM
改为:InnoDB类型即可。更改的地方在:
再次执行,SQL即可成功执行。
InnoDB和MyISAM是许多人在使用MySQL时最常用的两个表类型,这两个表类型各有优劣,视具体应用而定。基本的差别为:MyISAM类型不支持事务处理等高级处理,而InnoDB类型支持。MyISAM类型的表强调的是性能,其执行数度比InnoDB类型更快,但是不提供事务支持,而InnoDB提供事务支持已经外部键等高级数据库功能。
0 0
- 执行MySql更新报错:error code [1785]
- mysql执行大文件报错:Error Code: 2013. Lost connection to MySQL server during query
- MySql 执行 DELETE/UPDATE时,报 Error Code: 1175错误
- 使用MySQL执行update的时候报错:Error Code 1175.
- mysql导入数据库报错Error Code: 2006
- npm报错:error code EINTEGRITY
- mysql 报错Error Code: 1267 Illegal mix of collations的解决办法
- SQLyog恢复数据库报错解决方法【Error Code: 2006 - MySQL server has gone away】
- SQLyog恢复数据库报错解决方法【Error Code: 2006 - MySQL server has gone away】
- mysql从5.6版本导入5.5报错:Error Code : 1293 Incorrect table definition
- mysql报错Error Code: 1022. Can't write; duplicate key in table `xxx`
- 处理MySQL更新表时Error Code…
- MySQL更新时Error Code:1093和Error Code:1175的解决办法
- MySQL更新时Error Code:1093和Error Code:1175的解决办法
- MySQL更新时Error Code:1093和Error Code:1175的解决办法
- MySQL 执行插入报错
- MySQL 报错Error Code: 1290. The MySQL server is running with the --secure-file-priv option
- mysql更新语句执行的时候,如果没有数据不会报错
- php生成二维码
- php模拟POST请求的两种方法
- c语言:typedef + struct + 指针
- linux 查看系统信息命令(比较全)
- [刷题]Palindrome Partitioning
- 执行MySql更新报错:error code [1785]
- AFHTTPClient的异步回调模式
- [转]PHP 5.2~5.6 对比以及功能详解
- 南阳oj 题目34 韩信点兵
- 在Mac下配置php开发环境:Apache+php+MySql
- HtmlParser基础教程
- 字符串相乘(算法)
- LeetCode Rotate Array
- [转]LNMP环境下的Web常见问题排查(精品)