show status like '%max_connections%'; ##mysql最大链接数
set global max_connections=1000 ##从新设置
show variables like '%max_connections%'; ##查询数据库当前设置的最大链接数mysql
show global status like 'Max_used_connections'; ##服务器响应的最大链接数sql
show status like 'Threads%';数据库
Variable_name Value
Threads_cached 0 ##mysql管理的线程池中还有多少能够被复用的资源
Threads_connected 152 ##打开的链接数
Threads_created 550 ##表示建立过的线程数,若是发现Threads_created值过大的话,代表MySQL服务器一直在建立线程,这也是比较耗资源,能够适当增长配置文件中thread_cache_size值,查询服务器
Threads_running 1 ##激活的链接数,这个数值通常远低于connected数值,准确的来讲,Threads_running是表明当前并发数服务器
show variables like 'thread_cache_size';
set global thread_cache_size=60;并发