# 数据库中如何查看当前的连接数
Issue
欢迎在 Gtihub Issue 中回答此问题: Issue 223 (opens new window)
Author
PostgresSQL 的最大连接数与当前连接数
-- 最大连接数
show max_connections;
-- 当前连接数
select count(*) from pg_stat_activity;
mysql 的最大连接数与当前连接数
-- 最大连接数
show variables like 'max_connections';
-- 当前连接数
show full processlist;