paulwong

          List sessions / active connections on MariaDB server

          Using a command

          Option 1

          show status where variable_name = 'threads_connected'; 

          Columns

          • Variable_name - Name of the variable shown
          • Value - Number of active connections

          Rows

          • One row: Only one row is displayed

          Sample results

          Option 2

          show processlist; 

          Columns

          • Id - The connection identifier
          • User - The MariaDB user who issued the statement
          • Host - Host name and client port of the client issuing the statement
          • db - The default database (schema), if one is selected, otherwise NULL
          • Command - The type of command the thread is executing
          • Time - The time in seconds that the thread has been in its current state
          • State - An action, event, or state that indicates what the thread is doing
          • Info - The statement the thread is executing, or NULL if it is not executing any statement
          • Progress - The total progress of the process (0-100%)

          Rows

          • One row: represents one active connection
          • Scope of rows: total of active connections

          Sample results

          Using a query

          Option 3

          select id, user, host, db, command, time, state, 
          info, progress from information_schema.processlist;

          Columns

          • Id - The connection identifier
          • User - The MariaDB user who issued the statement
          • Host - Host name and client port of the client issuing the statement
          • db - The default database (schema), if one is selected, otherwise NULL
          • Command - The type of command the thread is executing
          • Time - The time in seconds that the thread has been in its current state
          • State - An action, event, or state that indicates what the thread is doing
          • Info - The statement the thread is executing, or NULL if it is not executing any statement
          • Progress - The total progress of the process (0-100%)
          • memory_used - Amount of memory used by the active connection

          Rows

          • One row: represents one active connection
          • Scope of rows: total of active connections

          Sample results

          Using the GUI

          Option 4

          Click on the Client Connections option of the Management tab (left navigation pane)

          This action will show the Client Connections screen containing the current active connections

          posted on 2020-04-02 15:38 paulwong 閱讀(287) 評論(0)  編輯  收藏 所屬分類: MYSQL

          主站蜘蛛池模板: 宽城| 大竹县| 宜城市| 常宁市| 盈江县| 开化县| 汉阴县| 彝良县| 上杭县| 泽库县| 永胜县| 焦作市| 泗水县| 喀什市| 天水市| 辉县市| 曲阜市| 五台县| 临城县| 昭觉县| 巍山| 天镇县| 岱山县| 无极县| 镇原县| 昆明市| 武宣县| 周口市| 龙岩市| 肥乡县| 黔江区| 佛冈县| 安徽省| 博乐市| 卫辉市| 成都市| 三穗县| 安新县| 广丰县| 宝丰县| 巴彦淖尔市|