1set @save_log_warnings=@@log_warnings, @save_max_connections=@@max_connections; 2SET GLOBAL log_warnings=4; 3SET GLOBAL max_connections=10; 4connect tmp_con1,localhost,root,,; 5connect tmp_con2,localhost,root,,; 6connect tmp_con3,localhost,root,,; 7connect tmp_con4,localhost,root,,; 8connect tmp_con5,localhost,root,,; 9connect tmp_con6,localhost,root,,; 10connect tmp_con7,localhost,root,,; 11connect tmp_con8,localhost,root,,; 12connect con1,localhost,root,,; 13SELECT 1; 141 151 16connect con2,localhost,root,,; 17SELECT 2; 182 192 20ERROR HY000: Too many connections 21connection default; 22SELECT 0; 230 240 25show status like "Threads_connected"; 26Variable_name Value 27Threads_connected 11 28SET GLOBAL log_warnings=@save_log_warnings; 29SET GLOBAL max_connections=@save_max_connections; 30