查看实时连接的个数 (瞬时值)
SHOW STATUS LIKE 'Threads_connected';
查看具体的链接信息
show full processlist;
数据库链接池常见的报错
Cannot create PoolableConnectionFactory (Data source rejected establishment of connection, message from server: "Too many connections")
是因为数据库连接池不够引起的问题
可以临时调大连接池的大小
set global max_connections=300;
mysql优化(连接数、最大并发数)_max_used_connections_炎升的博客-CSDN博客