This is actually a simple question. Many blogs and forums on the Internet have relevant answers. These answers are good, but they forget to indicate a small detail. This small detail also plagued me for one night. Later, I checked the relevant information to find out the details.
Start with setting non-automatic submission: You can add the following statement to the configuration file my. ini:
[Mysqld]
Init_connect = 'set autocommit = 0'
Then restart the service. Last night, after following this configuration, I restarted the service and logged on to mysql. Type: show variables like 'autocommit'
The following result is displayed:
Autocommit ON
This shows that the statements I add to the configuration file have no effect. I finally checked the Chinese help document of mysql 5.1. I found that after init_connect, login with Super users is not loaded. This is mysql's consideration for security reasons. Then I switch to "normal user" and log on, and type: show variables like 'autocommit'
The following result is displayed:
Autocommit OFF
This problem was solved successfully.