{"id":6804,"date":"2016-04-21T17:52:37","date_gmt":"2016-04-21T08:52:37","guid":{"rendered":"http:\/\/www.webcyou.com\/?p=6804"},"modified":"2016-04-21T17:52:37","modified_gmt":"2016-04-21T08:52:37","slug":"mysql%e3%81%8c%e8%b5%b7%e5%8b%95%e3%81%97%e3%81%aa%e3%81%84-%e3%82%a8%e3%83%a9%e3%83%bc%e5%af%be%e5%bf%9c-cant-connect-to-local-mysql-server-through-socket-tmpmysql-sock-2","status":"publish","type":"post","link":"https:\/\/www.webcyou.com\/?p=6804","title":{"rendered":"MySQL\u304c\u8d77\u52d5\u3057\u306a\u3044 \u30a8\u30e9\u30fc\u5bfe\u5fdc Can&#8217;t connect to local MySQL server through socket &#8216;\/tmp\/mysql.sock&#8217; (2)"},"content":{"rendered":"<p>\u6700\u8fd1\u3001Rails\u3067\u304a\u4ed5\u4e8b\u3057\u3066\u3044\u308b\u306e\u3067\u3059\u304c\u3001\u6025\u306bMySQL\u304c\u8d77\u52d5\u3057\u306a\u3044\u73fe\u72b6\u306b\u906d\u9047\u3002<\/p>\n<p>\u8d77\u52d5\u3057\u3088\u3046\u3068\u3001<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">mysql.server start<\/pre>\n<p>\u3068\u3001\u30b3\u30de\u30f3\u30c9\u53e9\u3044\u3066\u3082<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">Starting MySQL\r\n.........................................<\/pre>\n<p>\u3068\u3001\u6c38\u9060\u306b\u8d77\u52d5\u3067\u304d\u305a\u3002\u3002\u3002<\/p>\n<p>\u3046\u30fc\u3093\u3002\u3002\u56f0\u3063\u305f\u3002<\/p>\n<p>\u3069\u3046\u3084\u3089\u3001\u30d7\u30ed\u30bb\u30b9\u3092\u6bba\u3057\u305f\u3089\u5927\u4e08\u592b\u307f\u305f\u3044\u306a\u8a18\u4e8b\u898b\u3064\u3051\u305f\u306e\u3067\u7247\u3063\u7aef\u304b\u3089kill\uff01\uff01\uff01<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">ps -ef | grep mysql<\/pre>\n<p>\u3067\u3001mysql\u306b\u95a2\u3059\u308b\u30d7\u30ed\u30bb\u30b9\u3092grep\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">sudo kill -9 PID<\/pre>\n<p>\u3067\u30d7\u30ed\u30bb\u30b9ID\u3092\u6307\u5b9a\u3057\u3001kill\u3002<\/p>\n<p>\u305d\u3057\u3066\u518d\u3073\u3001<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">mysql.server start<\/pre>\n<p>\u3046\u307e\u304f\u3044\u304f\u304b\u3002\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">Starting MySQL\r\n.........................................<\/pre>\n<p>&nbsp;<\/p>\n<p>\u3046\u306f\u30fc\u3002\u7d50\u679c\u5909\u308f\u3089\u305a\u3002<\/p>\n<p>\u518d\u3073\u8abf\u3079\u3066\u3044\u308b\u3068\u3001\u3069\u3046\u3084\u3089\u3001<\/p>\n<p>mysql.sock\u30d5\u30a1\u30a4\u30eb\u304c\u306a\u304f\u306a\u308b\u3053\u3068\u304c\u3042\u308a\uff08\u7121\u304f\u306a\u308b\u306a\u3088\uff09<\/p>\n<p>\u8d77\u52d5\u3067\u304d\u306a\u3044\u30a8\u30e9\u30fc\u3068\u306a\u308b\u3002<\/p>\n<p>\u3068\u3044\u3046\u3053\u3068\u3067<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">ls\u00a0\/usr\/local\/var\/mysql\/<\/pre>\n<p>\u3053\u3061\u3089\u3092\u78ba\u8a8d\u3059\u308b\u3068\u3001\u78ba\u304b\u306b\u306a\u3044\u308f\u3002\u3002\u3002<\/p>\n<p>\u3053\u306e\u30d5\u30a1\u30a4\u30eb\u306f\u305f\u3060\u5b58\u5728\u3059\u308c\u3070\u826f\u3044\u306e\u304b\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">sudo touch mysql.sock<\/pre>\n<p>\u3067\u3001mysql.sock\u30d5\u30a1\u30a4\u30eb\u3092\u751f\u6210\u3002<\/p>\n<p>\u518d\u3073\u3001<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">mysql.server start\r\nStarting MySQL\r\n. SUCCESS!<\/pre>\n<p>\u6765\u305f\u3041\u30fc\uff01 \u8d77\u52d5\u306f\u3084\u3002<\/p>\n<p>\u306a\u3093\u3060\u3088\u30fc\u3002<\/p>\n<p>\u6642\u9593\u3092\u8fd4\u3057\u3066\u304f\u308c\u3002\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6700\u8fd1\u3001Rails\u3067\u304a\u4ed5\u4e8b\u3057\u3066\u3044\u308b\u306e\u3067\u3059\u304c\u3001\u6025\u306bMySQL\u304c\u8d77\u52d5\u3057\u306a\u3044\u73fe\u72b6\u306b\u906d\u9047\u3002 \u8d77\u52d5\u3057\u3088\u3046\u3068\u3001 mysql.server start \u3068\u3001\u30b3\u30de\u30f3\u30c9\u53e9\u3044\u3066\u3082 Starting MySQL &#8230;&#8230;&#8230;&#8230;&#8230;. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[35],"tags":[171,59,37,107,180,173,150,45,111,178,78],"class_list":["post-6804","post","type-post","status-publish","format-standard","hentry","category-mysql","tag-android","tag-android-sdk","tag-iphone-","tag-mamp","tag-mysql","tag-php","tag-vagrant","tag-web","tag-wordpress-2","tag-178","tag-78"],"_links":{"self":[{"href":"https:\/\/www.webcyou.com\/index.php?rest_route=\/wp\/v2\/posts\/6804","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.webcyou.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webcyou.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webcyou.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webcyou.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6804"}],"version-history":[{"count":1,"href":"https:\/\/www.webcyou.com\/index.php?rest_route=\/wp\/v2\/posts\/6804\/revisions"}],"predecessor-version":[{"id":6805,"href":"https:\/\/www.webcyou.com\/index.php?rest_route=\/wp\/v2\/posts\/6804\/revisions\/6805"}],"wp:attachment":[{"href":"https:\/\/www.webcyou.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6804"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webcyou.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6804"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webcyou.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6804"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}