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

相关推荐
麦聪聊数据3 小时前
如何使用 QuickAPI 快速连接 MySQL 数据库并发布 RESTful API
数据库·sql·mysql·restful·数据服务
Run Freely9375 小时前
MySQL 数据库_01
数据库·mysql
小朋友,你是否有很多问号?5 小时前
mac本地安装mysql
数据库·mysql
斯普信专业组5 小时前
MySQL主从同步参数调优案例
mysql·主从
一成码农7 小时前
MySQL问题8
数据库·mysql
荣光波比11 小时前
MySQL数据库(一)—— 数据库基础与MySQL安装管理指南
运维·数据库·mysql·云计算
boonya13 小时前
MySQL与PostgreSQL核心区别对比
数据库·mysql·postgresql
书院门前细致的苹果14 小时前
MySQL 中的 B+树和 B树的区别详解
数据结构·数据库·mysql
残影飞雪14 小时前
如何在 Debian 12 上安装 MySQL
mysql·adb·debian
沢田纲吉15 小时前
MySQL 学习二:数据库的操作
数据库·后端·mysql