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

相关推荐
霖霖总总9 小时前
[小技巧69]为什么总说MySQL单表“别超 2000 万行”?一篇讲透 InnoDB 存储极限
数据库·mysql
PD我是你的真爱粉13 小时前
MySQL基础-DQL语句与多表查询
数据库·mysql
harrain14 小时前
windows下载安装MySQL9.5的缺少Redistributable问题解决
windows·mysql
chlk12315 小时前
聊聊索引:为何 B + 树能撑起数据库的半壁江山?
数据库·mysql
认真的薛薛19 小时前
数据库-redis与mongo
数据库·mysql
曾经的三心草19 小时前
MySQL进阶-6-数据库的备份与恢复
数据库·mysql
Lw老王要学习20 小时前
无互联网的正式 CentOS 7.6环境中安装 mysql-8.0.36-1
linux·服务器·mysql·centos
Flash.kkl21 小时前
MySQL访问
数据库·mysql
zhougl99621 小时前
mysql数据库存储引擎
数据库·mysql·oracle
vx+_bysj686921 小时前
【免费领源码】基于Springboot白隼校园音乐点歌系统 计算机毕业设计项目推荐上万套实战教程JAVA,node.js,C++、python、大屏数据可视化
java·spring boot·mysql·课程设计