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 小时前
Go语言八股之Mysql基础详解
mysql·面试
Lw老王要学习1 小时前
Linux数据库篇、第一章_02_MySQL的使用增删改查
linux·运维·数据库·mysql·云计算·it
林下清风~1 小时前
MySQL——九、锁
数据库·mysql
xiaogai_gai2 小时前
有效的聚水潭数据集成到MySQL案例
android·数据库·mysql
web130933203983 小时前
Mysql的安装配置教程(非常详细)从零基础入门到精通,看完这一篇就够了
数据库·mysql
鹅鹅鹅呢3 小时前
mysql 登录报错:ERROR 1045(28000):Access denied for user ‘root‘@‘localhost‘ (using password Yes)
android·数据库·mysql
在人间负债^3 小时前
假装自己是个小白 ---- 重新认识MySQL
android·数据库·mysql
元亓亓亓4 小时前
MySQL--day1--数据库概述
数据库·mysql
筱宇***4 小时前
Mac的web服务器
mysql·nginx·macos·php
天空之城夢主5 小时前
shell 编程之正则表达式与文本处理器
数据库·mysql·正则表达式