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

相关推荐
一只fish9 小时前
优化器架构对比:Oracle vs PostgreSQL vs MySQL
mysql·postgresql·oracle
buyue__14 小时前
Python实现连接MySQL数据库并执行目录下的所有SQL文件,遇到错误时终止执行。
python·mysql
snow@li15 小时前
MySQL:库表设计完整规范与实战方案
数据库·mysql
SatanII16 小时前
mariadb
数据库·mariadb
Shawn Dev17 小时前
MySQL Binlog 数据误删除恢复完全指南
数据库·mysql·elasticsearch
陈卿诺语18 小时前
MySQL错误-this is incompatible with sql_mode=only_full_group_by完美解决方案
sql·mysql·adb
南城以南溫暖如初14718 小时前
社区健身小程序开发流程详解:技术选型与实施经验分享
java·经验分享·spring boot·mysql·vue·apache
凤舞飘伶19 小时前
导出数据库表结构excel
python·mysql
️学习的小王20 小时前
MySQL常用函数知识点总结
数据库·mysql·oracle
万亿少女的梦16820 小时前
基于Spring Boot、Java与MySQL的同城宠物服务系统设计与实现
java·spring boot·mysql·系统设计·协同过滤