Mairadb 最大连接数、当前连接数 查询

目录

[查询数据库 最大连接数](#查询数据库 最大连接数)

查询当前连接总数


环境 Mariadb 10.11.6

跳转mysql数据库:

查询数据库 最大连接数

show variables like 'max_connections';

注意; 这个版本不能使用 : show variables like '%max_connections%'; 会报错 ,如图所示:

他不认识 这个 %max_connections%

MariaDB [mysql]> show variables like '%max_connections%';

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''%max_connections%'' at line 1

可以看到目前最大连接数是1000.

查询当前连接总数

show status like 'Threads_connected';

通过查询**information_schema 中的processlist 数量**也能获取当前连接数:

通过show processlist可以 查看 连接详情:

相关推荐
一只小bit3 小时前
MySQL 索引:从聚簇到普通索引,如何加快查询效率?
数据库·mysql·oracle
冒泡的肥皂7 小时前
MVCC初学demo(二
数据库·后端·mysql
小马哥编程8 小时前
【软考架构】案例分析-对比MySQL查询缓存与Memcached
java·数据库·mysql·缓存·架构·memcached
dlhto13 小时前
Oracle Linux 9 的 MySQL 8.0 完整安装与远程连接配置
linux·mysql·oracle
送秋三十五14 小时前
5分钟读懂MySQL+Redis双写一致性实现流程
数据库·redis·mysql
阿波罗尼亚14 小时前
查询修正字段sql记录
数据库·sql·mysql
Hello.Reader15 小时前
用 Flink CDC 将 MySQL 实时同步到 Doris
大数据·mysql·flink
信仰_27399324316 小时前
Mysql中MVCC的流程
数据库·mysql
Andy17 小时前
Mysql基础2
android·数据库·mysql
wind_one117 小时前
2.基础--MySQL安装及启动
数据库·mysql