使用mysql -uroot -p连接不进去mysql可以/etc/my.cnf文件中添加
wait_timeout = 600
interactive_timeout = 600
进入mysql 命令行后:
show full processlist; --查看哪些进程正在运行
show variables like '%max_connections%'; --查看mysql的最大连接数:
show global status like 'Max_used_connections';查看服务器响应的最大连接数:
show processlist;--查看当前mysql进程
kill id(进程对应的id字段);--kill掉sleep的进程