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

相关推荐
计算机毕设vx_bysj68691 天前
【免费领源码】77196基于java的手机银行app管理系统的设计与实现 计算机毕业设计项目推荐上万套实战教程JAVA,node.js,C++、python、大屏数据可视化
java·mysql·智能手机·课程设计
吴声子夜歌1 天前
ES6——正则的扩展详解
前端·mysql·es6
xixingzhe21 天前
Mysql统计空间增量
数据库·mysql
程序员萌萌1 天前
Java之mysql实战讲解(三):聚簇索引与非聚簇索引
java·mysql·聚簇索引
cozil1 天前
记录mysql创建数据库未指定字符集引发的问题及解决方法
数据库·mysql
AC赳赳老秦1 天前
OpenClaw数据库高效操作指南:MySQL/PostgreSQL批量处理与数据迁移实战
大数据·数据库·mysql·elasticsearch·postgresql·deepseek·openclaw
ego.iblacat1 天前
Python 连接 MySQL 数据库
数据库·python·mysql
阿丰资源1 天前
SpringBoot+MySQL+MyBatis-Plus+Vue前后端分离仓库管理系统 (附资料)
spring boot·mysql·mybatis
阿华田5121 天前
MySQL性能优化大全
数据库·mysql·性能优化
被摘下的星星1 天前
MySQL 别名使用规则详解
数据库·mysql