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

相关推荐
睡觉待开机6 分钟前
6. MySQL基本查询
数据库·mysql
weixin_470880262 小时前
MySQL体系架构解析(二):MySQL目录与启动配置全解析
数据库·mysql·面试·mysql体系架构·mysql bin目录
英英_2 小时前
MySQL 日志数据同步的详细教程
数据库·mysql
Paddy哥2 小时前
linux 安装mysql8.0;支持国产麒麟,统信uos系统
linux·mysql·麒麟·统信uos·统信
朝九晚五ฺ4 小时前
【MySQL基础】数据库的备份与还原
数据库·mysql·oracle
emo了小猫8 小时前
Mybatis #{} 和 ${}区别,使用场景,LIKE模糊查询避免SQL注入
数据库·sql·mysql·mybatis
天天摸鱼的java工程师17 小时前
高考放榜夜,系统别崩!聊聊查分系统怎么设计,三张表足以?
java·后端·mysql
exe45217 小时前
jdbc查询mysql数据库时,出现id顺序错误的情况
数据库·mysql
Johny_Zhao19 小时前
阿里云数据库Inventory Hint技术分析
linux·mysql·信息安全·云计算·系统运维
loserkk19 小时前
MySQL InnoDB 5.7 索引失效场景解析:原理与案例
mysql