Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to solve the problem of automatic commit of navicat transaction

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

Editor to share with you how to solve the problem of automatic submission of navicat transactions, I believe that most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!

Recently, I encountered some problems when editing database tables using navicat. Record ~ ~

Problem: after editing the data, click "✔" to submit the Navicat card, and then prompt "MySql Lock wait timeout exceeded", the screenshot is now gone, in short, it means timeout.

Reason: later, I checked a lot of information, and it turned out that the automatic commit transaction of navicat was turned off, resulting in that the transaction was not committed after the data was modified, so when we modify the data, we have to wait for the previous transaction, but the transaction has not been committed, so it timed out.

Solution: you can first see if the transaction is automatically committed.

Show variables like 'autocommit

As shown in the figure, if you find out that it is ON, it indicates that the transaction is committed automatically, and you do not have to commit it yourself after modifying the data. If it is OFF, you need to turn on the automatic submission first.

Set autocommit=on

In this way, there will be no problem of timeout when you modify the data.

Ps: let's take a look at the problem of Navicat Premium setting update and delete operations not committing transactions automatically.

First look at the MySQL settings:

Show variables like 'autocommit'

The result should be:

Then execute:

Set autocommit = 0th delete from table1 where id = xxx;commit; or rollback

Query again at this time: show variables like 'autocommit'; and the result should be:

It should be noted that this operation setting is valid in the current query window, and it needs to be reset to reopen Navicat or create a new query page.

The above is all the contents of the article "how to solve the problem of automatic submission of navicat transactions". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report