Mysql steps to close transactions: 1. Use the "win r" key to open the "Run" window, enter cmd and press Enter to open the cmd command window; 2. In the cmd window, execute "mysql -u root -p" command and enter the password to log in to the mysql service and enter the MySQL interface; 3. In the MySQL command interface, execute the "start transaction;" or "Set autocommit = 0;" command to close the transaction.
The operating environment of this tutorial: windows7 system, mysql8 version, Dell G3 computer.
MySQL automatically commits transactions by default, so how to close the transaction? Take a look below.
Mysql steps to close transactions
1. Use the "win r" key to open the "Run" window, enter cmd and press Enter to open cmd command window
2. In the cmd command window, execute "mysql -u root -p
" Command and enter the password to log in to the mysql service and enter the MySQL interface
After entering the MySQL interface, the interface window will change to the following display
3. In the MySQL command interface, execute the command to close the transaction
start transaction;
or
Set autocommit = 0;
Extension Knowledge: If you want to enable automatic submission, you only need to execute submit
or Set autocommit= 1;
.
[Related recommendations: mysql video tutorial]
The above is the detailed content of How to close transaction in mysql. For more information, please follow other related articles on the PHP Chinese website!