zoukankan      html  css  js  c++  java
  • mysql 事务只读: Could not retrieve transation read-only status server

    现场日志:

    Resolved [org.springframework.jdbc.UncategorizedSQLException:
    ### Error updating database. Cause: java.sql.SQLException: Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage; increase this mysqld variable and try again

    java.sql.SQLException: Could not retrieve transation read-only status server

    解决过程: 

           1. 查看mysql的事物隔离级别 SHOW VARIABLES LIKE '%iso%';

            返回结果: REPEATABLE-READ

            把这个改成:READ-COMMITTED 就好了: SET GLOBAL tx_isolation='READ-COMMITTED'; 

          (记得java重启应用,要永久生效的就改my.ini配置文件)

    操作后无效

         2.  将max_binlog_cache_size  原来的8M 调到512M   解决

  • 相关阅读:
    C#Redis哈希Hashes
    C#Redis集合set
    C#Redis列表List
    C#Redis字符串
    入门redis
    C#/Net代码精简优化技巧
    单点登录在asp.net中的简单实现
    sql注入
    数据库sql优化
    常常忘记但是很重要的sql语句
  • 原文地址:https://www.cnblogs.com/xby-123/p/13438408.html
Copyright © 2011-2022 走看看