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

相关推荐
李纲明1 小时前
WordPress 报建立数据库连接时出错:先核 wp-config 四元组,再查 MySQL 服务与表修复
运维·数据库·mysql·wordpress·排障·devdiy
2401_881828322 小时前
MySQL操作命令
android·mysql·adb
鸢尾掠地平2 小时前
MySQL之DML(含例子)
数据库·mysql
香蕉大香蕉(06敬畏市场)2 小时前
MySQL 单点详解(06)
java·数据库·mysql·博客·实习
CodeHackerBhx2 小时前
MySQL 迁达梦踩坑实录:FIND_IN_SET、timestamp(6) 和一整批要改的函数
数据库·mysql·达梦·信创·数据库迁移
n 55!w !1082 小时前
MySQL笔记整理2
数据库·笔记·mysql
aiks_yuan3 小时前
MySQL 批量插入很慢怎么办:rewriteBatchedStatements 实测 10 万行从 4.5 秒到 1 秒(JDBC、MyBatis、LOAD DATA 对比)
mysql
企业数字化笔记3 小时前
业务单据怎样接入流程中心?启动条件、实例关联与失败回退
java·spring boot·mysql
betazhou3 小时前
MySQL Oracle官方备份工具
数据库·mysql·oracle
一万年太久。4 小时前
mysql主从复制
数据库·mysql