未设置MySQL REPEATABLE-READ Workbench事务级别 [英] MySQL REPEATABLE-READ Workbench transaction level not set

查看:322
本文介绍了未设置MySQL REPEATABLE-READ Workbench事务级别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们在my.ini文件中设置了以下内容

We have set the following in the my.ini file

[mysqld] transaction-isolation = READ-COMMITTED

[mysqld] transaction-isolation = READ-COMMITTED

我们假定此设置将是所有用户会话的默认设置.

We assume this setting will be the default for all user sessions.

使用PHPMyAdmin登录时,正确设置了tx_isolation并按预期工作.但是,当使用MySQL Workbench 6.0连接到服务器时,检查变量表明tx_isolation级别设置为REPEATABLE-READ.这种隔离级别的效果也符合预期.

When logging in using PHPMyAdmin the tx_isolation is set correctly and works as expected. However, when connecting to the server using MySQL Workbench 6.0 an examination of the variables shows that the tx_isolation level is set to REPEATABLE-READ. The effects of this isolation level are also as expected.

我们希望将事务隔离级别全局设置为READ-COMMITTED,最好是在数据库启动时.

We want to set the transaction-isolation level to READ-COMMITTED globally, preferably at DB startup.

我们已经重新启动了服务器(V 5.5.25a)和工作台.存储引擎是INNODB.

We have restarted the server (V 5.5.25a) and obviously workbench. Storage engine is INNODB.

推荐答案

SET GLOBAL TRANSACTION ISOLATION LEVEL READ COMMITTED

http://dev.mysql.com/doc/refman/5.5/en/set-transaction.html

这篇关于未设置MySQL REPEATABLE-READ Workbench事务级别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆