{"id":305,"date":"2023-04-11T09:50:12","date_gmt":"2023-04-11T05:50:12","guid":{"rendered":"https:\/\/kidds.co.za\/?p=305"},"modified":"2023-04-11T10:54:11","modified_gmt":"2023-04-11T06:54:11","slug":"mysql-not-creating-pid-file","status":"publish","type":"post","link":"https:\/\/kidds.co.za\/index.php\/2023\/04\/11\/mysql-not-creating-pid-file\/","title":{"rendered":"Mysql not creating PID file"},"content":{"rendered":"\n<p>ls \/var\/run\/mysqld\/ &#8211; should show below<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>-rw-r-----  1 mysql mysql    8 Apr 11 07:34 mysqld.pid\nsrwxrwxrwx  1 mysql mysql    0 Apr 11 07:34 mysqld.sock=\n-rw-------  1 mysql mysql    7 Apr 11 07:34 mysqld.sock.lock\nsrwxrwxrwx  1 mysql mysql    0 Apr 11 07:34 mysqlx.sock=\n-rw-------  1 mysql mysql    7 Apr 11 07:34 mysqlx.sock.lock\n<\/code><\/pre>\n\n\n\n<p>If not <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cd \/etc\/mysql\/mysql.conf.d\nsudo vi mysqld.cnf\n\n#unhash the single line - its right near the top below the user = mysql line.\npid-file        = \/var\/run\/mysqld\/mysqld.pid\n<\/code><\/pre>\n\n\n\n<p>sudo service mysql stop<\/p>\n\n\n\n<p>sudo service mysql start<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ls \/var\/run\/mysqld\/\nshould now contain the PID file as above<\/code><\/pre>\n\n\n\n<p>Oddly the following has happened to me, I do not know why and am not really phased.<\/p>\n\n\n\n<p>Do not be in the folder \/var\/run\/mysqld when doing the restart this for what ever reason has ended with none of the files get created not even the lock files. However the databases were up.<\/p>\n\n\n\n<p>After leaving the directory and restarting the Mysql service all files created perfectly on multiple restarts.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>ls \/var\/run\/mysqld\/ &#8211; should show below If not sudo service mysql stop sudo service mysql start Oddly the following has happened to me, I do not know why and am not really phased. Do not be in the folder \/var\/run\/mysqld when doing the restart this for what ever reason has ended with none of the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1,2,23],"tags":[],"class_list":["post-305","post","type-post","status-publish","format-standard","hentry","category-general","category-linux","category-mysql"],"_links":{"self":[{"href":"https:\/\/kidds.co.za\/index.php\/wp-json\/wp\/v2\/posts\/305","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kidds.co.za\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kidds.co.za\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kidds.co.za\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kidds.co.za\/index.php\/wp-json\/wp\/v2\/comments?post=305"}],"version-history":[{"count":1,"href":"https:\/\/kidds.co.za\/index.php\/wp-json\/wp\/v2\/posts\/305\/revisions"}],"predecessor-version":[{"id":306,"href":"https:\/\/kidds.co.za\/index.php\/wp-json\/wp\/v2\/posts\/305\/revisions\/306"}],"wp:attachment":[{"href":"https:\/\/kidds.co.za\/index.php\/wp-json\/wp\/v2\/media?parent=305"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kidds.co.za\/index.php\/wp-json\/wp\/v2\/categories?post=305"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kidds.co.za\/index.php\/wp-json\/wp\/v2\/tags?post=305"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}