{"id":1559,"date":"2015-01-08T23:40:59","date_gmt":"2015-01-08T23:40:59","guid":{"rendered":"https:\/\/qbytes.cloud\/?p=1559"},"modified":"2015-01-08T23:40:59","modified_gmt":"2015-01-08T23:40:59","slug":"can-view-currently-running-mysql-queries","status":"publish","type":"post","link":"https:\/\/www.qbytes.cloud\/index.php\/2015\/01\/08\/can-view-currently-running-mysql-queries\/","title":{"rendered":"How can I view currently running MySQL queries?"},"content":{"rendered":"<p>You can use the  &#8220;show processlist&#8221; command to view currently running queries. This is useful if you are looking to see if a query is locking a table, or if you have too many open queries, or for any other number of reasons. <\/p>\n<p>On a Linux Plesk server the MySQL password is stored in \/etc\/psa\/.psa.shadow. You would view the current query list with this command:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n\n# mysql -uadmin -p`cat \/etc\/psa\/.psa.shadow` -e &#039;show processlist&#039; \n\n<\/pre>\n<p>The output will be truncated so that everything fits onto one line. If you need to view the entire query you need to run &#8220;show full processlist.&#8221;<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n\n# mysql -uadmin -p`cat \/etc\/psa\/.psa.shadow` -e &#039;show full processlist&#039;\n\n<\/pre>\n<p>If you are not running Plesk, and have cPanel\/WHM, by default there is no password set for user root:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n\n# mysql -uroot -e &#039;show processlist&#039;\n\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>You can use the &#8220;show processlist&#8221; command to view currently running queries. This is useful if you are looking to see if a query is locking a table, or if you have too many open queries, or for any other number of reasons. On a Linux Plesk server the MySQL password is stored in \/etc\/psa\/.psa.shadow. &#8230; <a title=\"How can I view currently running MySQL queries?\" class=\"read-more\" href=\"https:\/\/www.qbytes.cloud\/index.php\/2015\/01\/08\/can-view-currently-running-mysql-queries\/\" aria-label=\"Read more about How can I view currently running MySQL queries?\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[70],"tags":[],"class_list":["post-1559","post","type-post","status-publish","format-standard","hentry","category-mysql"],"_links":{"self":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts\/1559","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/comments?post=1559"}],"version-history":[{"count":0,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts\/1559\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/media?parent=1559"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/categories?post=1559"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/tags?post=1559"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}