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 閱讀(286) 評論(0)  編輯  收藏 所屬分類: MYSQL

          主站蜘蛛池模板: 绥宁县| 上犹县| 礼泉县| 西宁市| 曲靖市| 田林县| 莱芜市| 河池市| 永德县| 古田县| 米泉市| 江都市| 南昌市| 梅州市| 云龙县| 苍南县| 武邑县| 晋中市| 綦江县| 宁远县| 合江县| 泽州县| 嘉鱼县| 宁强县| 梅州市| 锦州市| 阿合奇县| 大新县| 涿鹿县| 洛隆县| 习水县| 中方县| 伊通| 永顺县| 叶城县| 咸宁市| 綦江县| 武山县| 宁蒗| 寿阳县| 鸡东县|