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

相关推荐
海奥华28 小时前
SQLEXPLAIN 详解
数据库·mysql
情深不寿3178 小时前
MySQL————数据库基础
数据库·mysql
程序新视界8 小时前
如何选择合适的数据库?PostgreSQL与MySQL各项对比
数据库·mysql·postgresql
dongchen。11 小时前
MySQL第一次作业
数据库·mysql
重生之我是Java开发战士12 小时前
【MySQL】数据库基础
数据库·mysql
ChuHsiang12 小时前
【剑指MySQL】数据库基础(1)
数据库·mysql
九皇叔叔13 小时前
Docker 镜像维护指南:从配置优化到 MySQL 实战运行
mysql·adb·docker
muxin-始终如一13 小时前
MySQL分区分表实现方法详解
数据库·mysql·adb
yong999013 小时前
Linux安装JDK1.8 & tomcat & MariaDB(MySQL删减版)
linux·tomcat·mariadb
奥尔特星云大使13 小时前
mysql高可用架构之MHA部署(三)——故障转移后邮件告警配置(保姆级)
mysql·dba·高可用·mha·邮件告警