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

相关推荐
这个DBA有点耶5 小时前
导个数据中文全变问号?字符集这事儿真没那么简单
数据库·mysql·代码规范
wuqingshun3141595 小时前
MYSQL中如果发生死锁应该如何解决?
数据库·mysql
是上好佳佳佳呀7 小时前
MySQL 基础:从数据库概念到表结构管理DDL
数据库·mysql
DB哥讲数据库8 小时前
【最新】MySQL9.7安装教程:图文详解(附MySQL安装包)
android·mysql·adb
DB哥讲数据库10 小时前
MySQL 8.4 安装教程:超详细图文讲解(附mysql安装包)
linux·数据库·mysql·centos
wefg110 小时前
【MySQL】MySQL C API 访问 MySQL
数据库·mysql
L16247611 小时前
Zabbix 7.0 LTS 完整部署与运维手册(AlmaLinux 9 + MySQL 8.0 + Nginx)
运维·mysql·zabbix
玖玥拾1 天前
C# 语言进阶(十五)C# 游戏服务端 MySQL 数据库
服务器·开发语言·网络·数据库·mysql·c#
渣渣灰飞1 天前
MySQL 系统学习 第五阶段:企业级 MySQL 实战开发 第二章:RBAC 权限系统设计
android·学习·mysql