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

相关推荐
mengge.cloud14 分钟前
0823Keepalived + LVS(DR) + MariaDB主主 小白完整实战教程
linux·运维·网络·oracle·负载均衡·mariadb·lvs
菀亓19 小时前
ubuntu系统mysql安装
mysql
程序员贺加贝19 小时前
别被 saveBatch 骗了:一次 MyBatis-Plus 批量插入性能排查
mysql
l12586519 小时前
# RAG上线评估指标体系:六大核心指标与压测实战全解析
数据库·人工智能·python·mysql·langchain·milvus
宠友信息19 小时前
IM系统开发技术路线分析,即时通讯源码助力快速搭建聊天应用
java·spring boot·redis·websocket·mysql·uni-app·vue
__zRainy__20 小时前
Node系列 · 数据库:单表查询
数据库·后端·mysql·node.js
AIMath~1 天前
MVCC 与乐观锁,RR的本质
mysql
程序员夏洛1 天前
MySQL 中的 MVCC 是什么?
数据库·mysql
山甫aa1 天前
JavaWeb后端开发学习手册
java·开发语言·数据库·学习·mysql·springboot·web
梦想不只是梦与想1 天前
MySQL 中的用户管理
数据库·mysql·用户管理