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

          主站蜘蛛池模板: 高青县| 临洮县| 修武县| 旅游| 巫山县| 温州市| 公安县| 黄大仙区| 鹤岗市| 常州市| 福清市| 大竹县| 左贡县| 福泉市| 盐亭县| 中西区| 舒兰市| 城步| 贵德县| 兴业县| 耒阳市| 赤峰市| 福海县| 十堰市| 乌拉特后旗| 双鸭山市| 青海省| 吴旗县| 临泉县| 乐业县| 忻州市| 唐河县| 尖扎县| 闵行区| 惠安县| 渑池县| 理塘县| 新田县| 遵义县| 荥经县| 射洪县|