Home > Article > Backend Development > PHP should automatically disconnect after connecting to mysql, but is it blocked with GET_LOCK?
Access localhost/ci
The code is as follows (it’s just locked)
After finishing,
I used Navicat to establish a connection, adjusted the command line, locked it, and found that it was blocked:
Why? The php connection should be released
ps:
The environment is windows+nginx+php+mysql
Access localhost/ci
The code is as follows (it’s just locked)
After finishing,
I used Navicat to establish a connection, adjusted the command line, locked it, and found that it was blocked:
Why? The php connection should be released
ps:
The environment is windows+nginx+php+mysql
Unlock after locking
<code>unlock tables</code>
or
<code>rollback</code>
<code>select release_lock('lock1');</code>
Release lock