Skip to content

Commit a4ec5af

Browse files
authored
Create Set-Database-From-Single-User-Mode-to-Multi-User-Mode-MySQL.sql
1 parent 8a6db4d commit a4ec5af

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
--Listing all active connections to the database
2+
SHOW PROCESSLIST;
3+
4+
--Terminating active connections
5+
KILL <session_id>;
6+
7+
--Limiting database to allow only one connection (single-user mode)
8+
SET GLOBAL max_connections = 1;
9+
10+
--Reverting database to allow multiple connections (multi-user mode)
11+
SET GLOBAL max_connections = 151;

0 commit comments

Comments
 (0)