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) 評(píng)論(0)  編輯  收藏 所屬分類: MYSQL

          主站蜘蛛池模板: 铁岭县| 内江市| 辉南县| 犍为县| 城市| 奉贤区| 滦南县| 三台县| 调兵山市| 南昌县| 浑源县| 山东省| 五指山市| 淳化县| 东阿县| 苍溪县| 贺兰县| 伊金霍洛旗| 绥阳县| 全州县| 名山县| 中江县| 凭祥市| 南郑县| 贵定县| 临高县| 确山县| 青阳县| 青河县| 资源县| 太湖县| 盘锦市| 北海市| 娄烦县| 永寿县| 隆尧县| 抚远县| 陆河县| 读书| 白城市| 贵溪市|