{"id":5727,"date":"2016-09-21T12:38:18","date_gmt":"2016-09-21T03:38:18","guid":{"rendered":"http:\/\/yonezo.biz\/?p=5727"},"modified":"2016-09-21T12:40:28","modified_gmt":"2016-09-21T03:40:28","slug":"mysql%e3%81%ae%e3%83%ac%e3%83%97%e3%83%aa%e3%82%b1%e3%83%bc%e3%82%b7%e3%83%a7%e3%83%b3%e6%99%82%e3%82%a8%e3%83%a9%e3%83%bc%e5%af%be%e5%87%a6%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"https:\/\/yonezo.biz\/?p=5727","title":{"rendered":"MySQL\u306e\u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u6642\u30a8\u30e9\u30fc\u5bfe\u51e6\u65b9\u6cd5"},"content":{"rendered":"<p>\u5bfe\u51e6\u65b9\u6cd5\u3068\u3044\u3063\u3066\u3082\u3001\u7279\u5b9a\u306e\u30b1\u30fc\u30b9\u306b\u9650\u308b\u3002<\/p>\n<p>\u3048\u30fc\u3001\u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3066\u8981\u3059\u308b\u306b\u300c\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u5185\u5bb9\u306f\u81ea\u52d5\u3067\u5225\u30b5\u30fc\u30d0\u306eDB\u306b\u9010\u4e00\u30b3\u30d4\u30fc\u3057\u3066\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u3057\u3066\u304a\u3053\u3046\u305c\u300d\u3063\u3066\u4e8b\u3067\u3059\u306d\u3002<\/p>\n<p>\u30b3\u30d4\u30fc\u3068\u30ec\u30d7\u30ea\u30ab\u306e\u9055\u3044\u304c\u3088\u304f\u5206\u304b\u3089\u306a\u3044\u304c\u3001\u305d\u3046\u3044\u3046\u4e8b\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>\u3067\u3001\u53c2\u7167\u5148\u3068\u306a\u308b\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\uff08\u4ee5\u4e0b\u3001\u30de\u30b9\u30bfDB\uff09\u3068\u30ec\u30d7\u30ea\u30b1\u30fc\u30c8\u3059\u308b\u53c2\u7167\u5143\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\uff08\u4ee5\u4e0b\u3001\u30b9\u30ec\u30fc\u30d6DB\uff09\u304c\u3042\u308a\u307e\u3059\u304c\u3001\u30de\u30b9\u30bfDB\u304c\u30c0\u30a6\u30f3\u3057\u305f\u5834\u5408\u306f\u3001<\/p>\n<p>\u30ec\u30d7\u30ea\u30b1\u30fc\u30c8\u304c\u3069\u3046\u3053\u3046\u8a00\u3063\u3066\u308b\u5834\u5408\u3058\u3083\u306a\u3044\u306e\u3067\u3001\u4eca\u56de\u306e\u30c6\u30fc\u30de\u3068\u306f\u5916\u308c\u307e\u3059\u3002<\/p>\n<p>\u3042\u3068\u3001\u672c\u6765\u3067\u3042\u308c\u3070\u30de\u30b9\u30bfDB\u5074\u3067\u30c0\u30f3\u30d7\u3092\u53d6\u3063\u3066\u3001\u30b9\u30ec\u30fc\u30d6DB\u3078\u53cd\u6620\u3057\u3066\u304b\u3089\u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u518d\u958b\u3059\u308b\u306e\u304c\u738b\u9053\u307f\u305f\u3044\u306a\u306e\u3067\u3059\u304c\u3001<\/p>\n<p>\u30b5\u30fc\u30d3\u30b9\u7a3c\u50cd\u4e2d\u306e\u30de\u30b9\u30bfDB\u3078\u30c0\u30f3\u30d7\u5b9f\u884c\u3068\u304b\u3001\u6050\u308d\u3057\u304f\u3066\u3067\u304d\u306a\u3044\u306e\u3067\u3001\u73fe\u5b9f\u7684\u3067\u306f\u306a\u3044\u3088\u3046\u306a\u6c17\u304c\u3059\u308b\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>\u306a\u306e\u3067\u3001\u30b9\u30ec\u30fc\u30d6DB\u306e\u30b5\u30fc\u30d0\u304c\u30c0\u30a6\u30f3\u3057\u305f\u5834\u5408\u306b\u3001\u30de\u30b9\u30bf\u5074\u3067\u30c0\u30f3\u30d7\u3068\u304b\u305b\u305a\u306b\u5fa9\u65e7\u3059\u308b\u3084\u308a\u65b9\u306b\u3064\u3044\u3066\u5099\u5fd8\u9332\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>\u3088\u307b\u3069\u306e\u4e8b\u3067\u306a\u3044\u9650\u308a\u3001\u4ee5\u4e0b\u306e\u30b1\u30fc\u30b9\u304c\u307b\u3068\u3093\u3069\u306e\u3088\u3046\u3067\u3001\u30b0\u30b0\u308c\u3070\u3044\u304f\u3089\u3067\u3082\u60c5\u5831\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u307e\u305a\u306f\u3001\u518d\u8d77\u52d5\u3057\u305f\u30b9\u30ec\u30fc\u30d6DB\u3078\u30ed\u30b0\u30a4\u30f3\u3057\u3066\u3001\u4ee5\u4e0b\u3067\u30b9\u30c6\u30fc\u30bf\u30b9\u3092\u78ba\u8a8d\u3002<\/p>\n<p>&nbsp;<\/p>\n<pre class=\"brush: bash;\">mysql&gt; show slave status\\G\r\n*************************** 1. row ***************************\r\nSlave_IO_Running: Yes\r\nSlave_SQL_Running: Yes\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>\u672c\u5f53\u306f\u3082\u3063\u3068\u30ba\u30e9\uff5e\u3063\u3068\u51fa\u3066\u304d\u307e\u3059\u304c\u3001\u78ba\u8a8d\u3059\u308b\u306e\u306f\u4e0a\u8a18\u306e\u9805\u76ee\u3002<\/p>\n<p>\u4e21\u65b9\u300cYes\u300d\u306e\u5834\u5408\u306f\u554f\u984c\u306a\u304f\u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u304c\u52d5\u4f5c\u3057\u3066\u3044\u308b\u306e\u3067\u3001\u53cd\u6620\u3092\u5f85\u3064\u306e\u307f\u3067\u3059\u304c\u3001\u3069\u3061\u3089\u304b\u304c\u300cNo\u300d\u3068\u306a\u3063\u3066\u3044\u308b\u5834\u5408\u306f\u4ee5\u4e0b\u306e\u5bfe\u51e6\u65b9\u6cd5\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u307e\u305a\u306f\u3001\u300cSlave_IO_Running: No\u300d\u306e\u5834\u5408\u3002<\/p>\n<p>I\/O\u30a8\u30e9\u30fc\u3068\u306e\u4e8b\u306a\u306e\u3067\u3001HDD\u6545\u969c\u3068\u304b\u5bb9\u91cf\u4e0d\u8db3\u3068\u304b\u30de\u30b9\u30bfDB\u3078\u306e\u63a5\u7d9a\u304c\u51fa\u6765\u3066\u306a\u3044\u3068\u304b\u78ba\u8a8d\u3002<\/p>\n<p>\u305d\u308c\u3089\u304c\u554f\u984c\u7121\u3044\u3088\u3046\u3067\u3042\u308c\u3070\u3001\u30ea\u30bb\u30c3\u30c8\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: bash;\">mysql&gt; stop slave;\r\n\r\nmysql&gt; reset slave;\r\n<\/pre>\n<p>\u305d\u306e\u5f8c\u3001<\/p>\n<pre class=\"brush: bash;\">mysql&gt; START SLAVE;\r\n<\/pre>\n<p>\u3068\u3057\u3066\u3042\u3052\u308c\u3070\u3001\u518d\u958b\u3055\u308c\u308b\u306f\u305a\u3067\u3059\u304c\u3001\u305d\u308c\u3067\u3082\u30c0\u30e1\u306a\u5834\u5408\u306f\u3001\u30de\u30b9\u30bfDB\u306b\u3066\u30b9\u30c6\u30fc\u30bf\u30b9\u78ba\u8a8d\u3002<\/p>\n<pre class=\"brush: bash;\">mysql&gt; show master status \\G;\r\n*************************** 1. row ***************************\r\nFile: mysql-bin.005829\r\nPosition: 52932988\r\n<\/pre>\n<p>\u4e0a\u8a18\u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u63a7\u3048\u3064\u3064\u3001\u30b9\u30ec\u30fc\u30d6DB\u5074\u3078\u8a2d\u5b9a\u3002<\/p>\n<pre class=\"brush: bash;\">mysql&gt; CHANGE MASTER TO\r\n-&gt; MASTER_LOG_FILE='mysql-bin.005829',\r\n-&gt; MASTER_LOG_POS=52932988;\r\n<\/pre>\n<p>\u518d\u5ea6\u3001<\/p>\n<pre class=\"brush: bash;\">mysql&gt; START SLAVE;\r\n<\/pre>\n<p>\u3067\u53cd\u6620\u3055\u308c\u308b\u306f\u305a\u3002<\/p>\n<pre class=\"brush: bash;\">mysql&gt; show slave status\\G\r\n<\/pre>\n<p>\u3067\u78ba\u8a8d\u3057\u3066\u300cYes\u300d\u306b\u306a\u3063\u3066\u3044\u308c\u3070OK\u3002<\/p>\n<p>\u3060\u304c\u3001\u4ee5\u4e0b\u306e\u300cSlave_SQL_Running: No\u300d\u306e\u30b1\u30fc\u30b9\u3068\u540c\u69d8\u306b\u3001SQL\u306e\u30a8\u30e9\u30fc\u304c\u8868\u793a\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u306f\u3001\u30b9\u30ec\u30fc\u30d6DB\u3078\u306e\u66f4\u65b0\u306a\u3069\u304c\u884c\u308f\u308c\u305f\u305b\u3044\u3067\u30de\u30b9\u30bfDB\u3068\u306e\u6574\u5408\u304c\u5408\u308f\u306a\u304f\u306a\u3063\u3066\u3044\u308b\u3068\u306e\u4e8b\u306a\u306e\u3067\u3001\u4ee5\u4e0b\u3067\u5b9f\u884c\u3055\u308c\u3066\u3057\u307e\u3063\u305fSQL\u3092\u30b9\u30ad\u30c3\u30d7\u3057\u3066\u3042\u3052\u308b\u4e8b\u3067\u6574\u5408\u304c\u53d6\u308c\u308b\u3089\u3057\u3044\u3002<\/p>\n<pre class=\"brush: bash;\">mysql&gt; SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1;\r\n<\/pre>\n<p>\u3067\u3082\u3063\u3066\u3001\u518d\u5ea6\u30b9\u30bf\u30fc\u30c8\u3002<\/p>\n<pre class=\"brush: bash;\">mysql&gt; START SLAVE SQL_THREAD;\r\n\r\nmysql&gt; show slave status\\G\r\n<\/pre>\n<p>\u3053\u308c\u3067\u89e3\u6d88\u3055\u308c\u308b\u3068\u601d\u3044\u307e\u3059\u3067\u3059\u3002\u305f\u3060\u3001\u3053\u308c\u306f\u6700\u521d\u304b\u3089\u300cSlave_SQL_Running: No\u300d\u306b\u306a\u3063\u3066\u308b\u5834\u5408\u306e\u307f\u3063\u3066\u611f\u3058\u3002\u306a\u3093\u3068\u306a\u304f\u3067\u3059\u304c\u3001mysql&gt; reset slave;\u3053\u308c\u3067\u3001\u4e07\u4e8bOK\u306a\u6c17\u304c\u3059\u308b\u3002\u8a66\u3057\u3066\u306a\u3044\u3051\u3069\u305d\u3093\u306a\u6c17\u304c\u3059\u308b\u3002\u305d\u308c\u3067\u3082\u30c0\u30e1\u306a\u3089\u3001MASTER_LOG_FILE\u3068MASTER_LOG_POS\u3092\u30de\u30b9\u30bfDB\u3068\u5408\u308f\u305b\u3066\u3001\u518dstart\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5bfe\u51e6\u65b9\u6cd5\u3068\u3044\u3063\u3066\u3082\u3001\u7279\u5b9a\u306e\u30b1\u30fc\u30b9\u306b\u9650\u308b\u3002 \u3048\u30fc\u3001\u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3066\u8981\u3059\u308b\u306b\u300c\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u5185\u5bb9\u306f\u81ea\u52d5\u3067\u5225\u30b5\u30fc\u30d0\u306eDB\u306b\u9010\u4e00\u30b3\u30d4\u30fc\u3057\u3066\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u3057\u3066\u304a\u3053\u3046\u305c\u300d\u3063\u3066\u4e8b\u3067\u3059\u306d\u3002 \u30b3\u30d4\u30fc\u3068\u30ec\u30d7\u30ea\u30ab\u306e\u9055\u3044\u304c\u3088\u304f\u5206\u304b\u3089\u306a\u3044\u304c\u3001\u305d\u3046 &hellip; <a href=\"https:\/\/yonezo.biz\/?p=5727\">Continue reading<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[6],"tags":[],"class_list":["post-5727","post","type-post","status-publish","format-standard","hentry","category-6"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/yonezo.biz\/index.php?rest_route=\/wp\/v2\/posts\/5727","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/yonezo.biz\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/yonezo.biz\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/yonezo.biz\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/yonezo.biz\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5727"}],"version-history":[{"count":4,"href":"https:\/\/yonezo.biz\/index.php?rest_route=\/wp\/v2\/posts\/5727\/revisions"}],"predecessor-version":[{"id":5732,"href":"https:\/\/yonezo.biz\/index.php?rest_route=\/wp\/v2\/posts\/5727\/revisions\/5732"}],"wp:attachment":[{"href":"https:\/\/yonezo.biz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5727"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/yonezo.biz\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5727"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/yonezo.biz\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5727"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}