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可以 查看 连接详情:

相关推荐
Sirens.5 小时前
MySQL表设计进阶-约束范式连接索引与事务
android·数据库·mysql
Oo大司命oO8 小时前
藏在正则表达式里的陷阱
数据库·mysql·正则表达式
三十岁老牛再出发11 小时前
07.26每日总结
linux·c语言·mysql
xieliyu.12 小时前
MySQL 存储过程详解:概念、创建与删除全教程
开发语言·数据库·mysql
ttwuai13 小时前
AI 生成后台删除按钮后,MySQL 软删除和唯一索引怎么验
数据库·mysql·golang
想你依然心痛13 小时前
用MySQL玩转数据可视化:从SQL查询到动态图表的完整实战
sql·mysql·信息可视化
Mico1815 小时前
MySQL 8.0.35 主从延迟模拟与解决
mysql
不知疲倦的仄仄15 小时前
MySQL/Read View快照/MVCC/串行化
java·数据库·mysql
Mico1817 小时前
MySQL 5.7.35 升级到 8.0.35 — 原地升级(主从架构方式)
mysql
万亿少女的梦16818 小时前
基于Spring Boot的乐助在线助农系统设计与实现
java·spring boot·mysql·敏感词过滤·助农系统