{"id":802,"date":"2019-04-27T14:04:40","date_gmt":"2019-04-27T08:34:40","guid":{"rendered":"https:\/\/hostmayo.com\/blog\/?p=802"},"modified":"2019-04-27T14:04:55","modified_gmt":"2019-04-27T08:34:55","slug":"how-to-view-current-mysql-connections","status":"publish","type":"post","link":"https:\/\/hostmayo.com\/blog\/how-to-view-current-mysql-connections\/","title":{"rendered":"How to view current MYSQL connections"},"content":{"rendered":"\n<p>To view current mysql connections first SSH into your server. The type mysql to enter into it. The use the below commands\/queries. <\/p>\n\n\n\n<p>You can see the number of\u00a0<em>active<\/em> connections through the <a href=\"http:\/\/dev.mysql.com\/doc\/refman\/5.0\/en\/server-status-variables.html#statvar_Threads_connected\"><code>Threads_connected<\/code><\/a>\u00a0status variable:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p><strong><code>Threads_connected<\/code><\/strong><\/p><p>The number of currently open connections.<\/p><\/blockquote>\n\n\n\n<pre class=\"wp-block-code\"><code>mysql> show status where `variable_name` = 'Threads_connected';\n+-------------------+-------+\n| Variable_name     | Value |\n+-------------------+-------+\n| Threads_connected | 4     |\n+-------------------+-------+\n1 row in set (0.00 sec)<\/code><\/pre>\n\n\n\n<p>You can use <code>processlist<\/code> command to view current users connected to MYSQL.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mysql> show processlist;\n+----+------+-----------------+--------+---------+------+-------+------------------+\n| Id | User | Host            | db     | Command | Time | State | Info             |\n+----+------+-----------------+--------+---------+------+-------+------------------+\n|  3 | root | localhost       | webapp | Query   |    0 | NULL  | show processlist | \n|  5 | root | localhost:61704 | webapp | Sleep   |  208 |       | NULL             | \n|  6 | root | localhost:61705 | webapp | Sleep   |  208 |       | NULL             | \n|  7 | root | localhost:61706 | webapp | Sleep   |  208 |       | NULL             | \n+----+------+-----------------+--------+---------+------+-------+------------------+\n4 rows in set (0.00 sec)<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>To view current mysql connections first SSH into your server. The type mysql to enter into it. The use the below commands\/queries. You can see [&hellip;] <span class=\"read-more-link\"><a class=\"read-more\" href=\"https:\/\/hostmayo.com\/blog\/how-to-view-current-mysql-connections\/\">Read More<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":147,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-802","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v23.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to view current MYSQL connections<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/hostmayo.com\/blog\/how-to-view-current-mysql-connections\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to view current MYSQL connections\" \/>\n<meta property=\"og:description\" content=\"To view current mysql connections first SSH into your server. The type mysql to enter into it. The use the below commands\/queries. You can see [&hellip;] Read More\" \/>\n<meta property=\"og:url\" content=\"https:\/\/hostmayo.com\/blog\/how-to-view-current-mysql-connections\/\" \/>\n<meta property=\"og:site_name\" content=\"Host Mayo\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/Hostmayoservers\" \/>\n<meta property=\"article:published_time\" content=\"2019-04-27T08:34:40+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-04-27T08:34:55+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/hostmayo.com\/blog\/wp-content\/uploads\/2016\/05\/centos_1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"250\" \/>\n\t<meta property=\"og:image:height\" content=\"250\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Billa\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@hostmayo\" \/>\n<meta name=\"twitter:site\" content=\"@hostmayo\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Billa\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/hostmayo.com\/blog\/how-to-view-current-mysql-connections\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/hostmayo.com\/blog\/how-to-view-current-mysql-connections\/\"},\"author\":{\"name\":\"Billa\",\"@id\":\"https:\/\/hostmayo.com\/blog\/#\/schema\/person\/a511fa95af50c3cb2614311b73c2ea9d\"},\"headline\":\"How to view current MYSQL connections\",\"datePublished\":\"2019-04-27T08:34:40+00:00\",\"dateModified\":\"2019-04-27T08:34:55+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/hostmayo.com\/blog\/how-to-view-current-mysql-connections\/\"},\"wordCount\":58,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/hostmayo.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/hostmayo.com\/blog\/how-to-view-current-mysql-connections\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/hostmayo.com\/blog\/wp-content\/uploads\/2016\/05\/centos_1.png\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/hostmayo.com\/blog\/how-to-view-current-mysql-connections\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/hostmayo.com\/blog\/how-to-view-current-mysql-connections\/\",\"url\":\"https:\/\/hostmayo.com\/blog\/how-to-view-current-mysql-connections\/\",\"name\":\"How to view current MYSQL connections\",\"isPartOf\":{\"@id\":\"https:\/\/hostmayo.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/hostmayo.com\/blog\/how-to-view-current-mysql-connections\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/hostmayo.com\/blog\/how-to-view-current-mysql-connections\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/hostmayo.com\/blog\/wp-content\/uploads\/2016\/05\/centos_1.png\",\"datePublished\":\"2019-04-27T08:34:40+00:00\",\"dateModified\":\"2019-04-27T08:34:55+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/hostmayo.com\/blog\/how-to-view-current-mysql-connections\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/hostmayo.com\/blog\/how-to-view-current-mysql-connections\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/hostmayo.com\/blog\/how-to-view-current-mysql-connections\/#primaryimage\",\"url\":\"https:\/\/hostmayo.com\/blog\/wp-content\/uploads\/2016\/05\/centos_1.png\",\"contentUrl\":\"https:\/\/hostmayo.com\/blog\/wp-content\/uploads\/2016\/05\/centos_1.png\",\"width\":250,\"height\":250,\"caption\":\"centos\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/hostmayo.com\/blog\/how-to-view-current-mysql-connections\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/hostmayo.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to view current MYSQL connections\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/hostmayo.com\/blog\/#website\",\"url\":\"https:\/\/hostmayo.com\/blog\/\",\"name\":\"Host Mayo\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/hostmayo.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/hostmayo.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/hostmayo.com\/blog\/#organization\",\"name\":\"Host Mayo\",\"url\":\"https:\/\/hostmayo.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/hostmayo.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/hostmayo.com\/blog\/wp-content\/uploads\/2015\/12\/ico.png\",\"contentUrl\":\"https:\/\/hostmayo.com\/blog\/wp-content\/uploads\/2015\/12\/ico.png\",\"width\":64,\"height\":64,\"caption\":\"Host Mayo\"},\"image\":{\"@id\":\"https:\/\/hostmayo.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/Hostmayoservers\",\"https:\/\/x.com\/hostmayo\",\"https:\/\/www.linkedin.com\/company\/host-mayo\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/hostmayo.com\/blog\/#\/schema\/person\/a511fa95af50c3cb2614311b73c2ea9d\",\"name\":\"Billa\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/hostmayo.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/55380a32a6c37aba9b35b3d51dbd6cd6460322a433ecdaaacb28aece47163e51?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/55380a32a6c37aba9b35b3d51dbd6cd6460322a433ecdaaacb28aece47163e51?s=96&d=mm&r=g\",\"caption\":\"Billa\"},\"description\":\"Geek, Banker &amp; Entrepreneur.\",\"sameAs\":[\"https:\/\/hostmayo.com\/\"],\"url\":\"https:\/\/hostmayo.com\/blog\/author\/waqass\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to view current MYSQL connections","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/hostmayo.com\/blog\/how-to-view-current-mysql-connections\/","og_locale":"en_US","og_type":"article","og_title":"How to view current MYSQL connections","og_description":"To view current mysql connections first SSH into your server. The type mysql to enter into it. The use the below commands\/queries. You can see [&hellip;] Read More","og_url":"https:\/\/hostmayo.com\/blog\/how-to-view-current-mysql-connections\/","og_site_name":"Host Mayo","article_publisher":"https:\/\/www.facebook.com\/Hostmayoservers","article_published_time":"2019-04-27T08:34:40+00:00","article_modified_time":"2019-04-27T08:34:55+00:00","og_image":[{"width":250,"height":250,"url":"https:\/\/hostmayo.com\/blog\/wp-content\/uploads\/2016\/05\/centos_1.png","type":"image\/png"}],"author":"Billa","twitter_card":"summary_large_image","twitter_creator":"@hostmayo","twitter_site":"@hostmayo","twitter_misc":{"Written by":"Billa","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/hostmayo.com\/blog\/how-to-view-current-mysql-connections\/#article","isPartOf":{"@id":"https:\/\/hostmayo.com\/blog\/how-to-view-current-mysql-connections\/"},"author":{"name":"Billa","@id":"https:\/\/hostmayo.com\/blog\/#\/schema\/person\/a511fa95af50c3cb2614311b73c2ea9d"},"headline":"How to view current MYSQL connections","datePublished":"2019-04-27T08:34:40+00:00","dateModified":"2019-04-27T08:34:55+00:00","mainEntityOfPage":{"@id":"https:\/\/hostmayo.com\/blog\/how-to-view-current-mysql-connections\/"},"wordCount":58,"commentCount":0,"publisher":{"@id":"https:\/\/hostmayo.com\/blog\/#organization"},"image":{"@id":"https:\/\/hostmayo.com\/blog\/how-to-view-current-mysql-connections\/#primaryimage"},"thumbnailUrl":"https:\/\/hostmayo.com\/blog\/wp-content\/uploads\/2016\/05\/centos_1.png","inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/hostmayo.com\/blog\/how-to-view-current-mysql-connections\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/hostmayo.com\/blog\/how-to-view-current-mysql-connections\/","url":"https:\/\/hostmayo.com\/blog\/how-to-view-current-mysql-connections\/","name":"How to view current MYSQL connections","isPartOf":{"@id":"https:\/\/hostmayo.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/hostmayo.com\/blog\/how-to-view-current-mysql-connections\/#primaryimage"},"image":{"@id":"https:\/\/hostmayo.com\/blog\/how-to-view-current-mysql-connections\/#primaryimage"},"thumbnailUrl":"https:\/\/hostmayo.com\/blog\/wp-content\/uploads\/2016\/05\/centos_1.png","datePublished":"2019-04-27T08:34:40+00:00","dateModified":"2019-04-27T08:34:55+00:00","breadcrumb":{"@id":"https:\/\/hostmayo.com\/blog\/how-to-view-current-mysql-connections\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/hostmayo.com\/blog\/how-to-view-current-mysql-connections\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/hostmayo.com\/blog\/how-to-view-current-mysql-connections\/#primaryimage","url":"https:\/\/hostmayo.com\/blog\/wp-content\/uploads\/2016\/05\/centos_1.png","contentUrl":"https:\/\/hostmayo.com\/blog\/wp-content\/uploads\/2016\/05\/centos_1.png","width":250,"height":250,"caption":"centos"},{"@type":"BreadcrumbList","@id":"https:\/\/hostmayo.com\/blog\/how-to-view-current-mysql-connections\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/hostmayo.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to view current MYSQL connections"}]},{"@type":"WebSite","@id":"https:\/\/hostmayo.com\/blog\/#website","url":"https:\/\/hostmayo.com\/blog\/","name":"Host Mayo","description":"","publisher":{"@id":"https:\/\/hostmayo.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/hostmayo.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/hostmayo.com\/blog\/#organization","name":"Host Mayo","url":"https:\/\/hostmayo.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/hostmayo.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/hostmayo.com\/blog\/wp-content\/uploads\/2015\/12\/ico.png","contentUrl":"https:\/\/hostmayo.com\/blog\/wp-content\/uploads\/2015\/12\/ico.png","width":64,"height":64,"caption":"Host Mayo"},"image":{"@id":"https:\/\/hostmayo.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/Hostmayoservers","https:\/\/x.com\/hostmayo","https:\/\/www.linkedin.com\/company\/host-mayo"]},{"@type":"Person","@id":"https:\/\/hostmayo.com\/blog\/#\/schema\/person\/a511fa95af50c3cb2614311b73c2ea9d","name":"Billa","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/hostmayo.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/55380a32a6c37aba9b35b3d51dbd6cd6460322a433ecdaaacb28aece47163e51?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/55380a32a6c37aba9b35b3d51dbd6cd6460322a433ecdaaacb28aece47163e51?s=96&d=mm&r=g","caption":"Billa"},"description":"Geek, Banker &amp; Entrepreneur.","sameAs":["https:\/\/hostmayo.com\/"],"url":"https:\/\/hostmayo.com\/blog\/author\/waqass\/"}]}},"jetpack_featured_media_url":"https:\/\/hostmayo.com\/blog\/wp-content\/uploads\/2016\/05\/centos_1.png","_links":{"self":[{"href":"https:\/\/hostmayo.com\/blog\/wp-json\/wp\/v2\/posts\/802","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hostmayo.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hostmayo.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hostmayo.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hostmayo.com\/blog\/wp-json\/wp\/v2\/comments?post=802"}],"version-history":[{"count":0,"href":"https:\/\/hostmayo.com\/blog\/wp-json\/wp\/v2\/posts\/802\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/hostmayo.com\/blog\/wp-json\/wp\/v2\/media\/147"}],"wp:attachment":[{"href":"https:\/\/hostmayo.com\/blog\/wp-json\/wp\/v2\/media?parent=802"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hostmayo.com\/blog\/wp-json\/wp\/v2\/categories?post=802"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hostmayo.com\/blog\/wp-json\/wp\/v2\/tags?post=802"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}