{"id":2960,"date":"2014-03-01T15:50:39","date_gmt":"2014-03-01T15:50:39","guid":{"rendered":"http:\/\/blog.hmouse.tk\/?p=2960"},"modified":"2014-03-10T09:25:53","modified_gmt":"2014-03-10T01:25:53","slug":"mysql-%e9%81%87%e5%88%b0%e7%9a%84%e4%b8%80%e4%ba%9b%e9%97%ae%e9%a2%98","status":"publish","type":"post","link":"https:\/\/www.hmouse.cn\/?p=2960","title":{"rendered":"mysql \u9047\u5230\u7684\u4e00\u4e9b\u95ee\u9898"},"content":{"rendered":"<p>&nbsp;<\/p>\n<p><basefont size=\"2\" face=\"Tahoma\" \/><br \/>\n<meta http-equiv=\"Content-Type\" content=\"text\/html;charset=utf-8\" \/><br \/>\n<meta name=\"exporter-version\" content=\"Evernote Windows\/270387 (zh-CN); Windows\/6.1.7601 Service Pack 1;\" \/><\/p>\n<style><!--\n    body, td {\n      font-family: Tahoma;\n      font-size: 10pt;\n    }\n\n--><\/style>\n<p><a name=\"207\"><\/a><\/p>\n<h1>mysql \u9047\u5230\u7684\u4e00\u4e9b\u95ee\u9898<\/h1>\n<div>\n<div style=\"word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;\">\n<div>alter table message_board_reply_sequence\u00a0\u00a0\u00a0\u00a0\u00a0 auto_increment=10001;<br \/>\nalter table message_board_sequence\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 auto_increment=10001;<br \/>\nalter table room_activity_sequence\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 auto_increment=10001;<br \/>\nalter table room_message_board_reply_sequence auto_increment=10001;<br \/>\nalter table room_message_board_sequence\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 auto_increment=10001;<br \/>\nalter table room_sequence\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 auto_increment=10001;<br \/>\nalter table room_topic_sequence\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 auto_increment=10001;<br \/>\nalter table user_sequence\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 auto_increment=10001;<br \/>\nauto_increment=10001;\n<\/div>\n<div><span style=\"font-size: 19px;\"><span style=\"font-size: 19px;\">\u00a0<\/span><\/span><\/div>\n<p>#######mysqld_multi stop \u5173\u95ed\u4e0d\u4e86\u6570\u636e\u5e93<\/p>\n<div style=\"font-size: 19px;\">1\uff1a\u6388\u6743<\/div>\n<div style=\"font-size: 19px;\">grant shutdown on *.* to &#8216;shutdown&#8217;@&#8217;localhost&#8217; identified by &#8216;shutdown123&#8217;;<br \/>\nflush privileges;<\/div>\n<div style=\"font-size: 19px;\">2\uff1a\u66f4\u6539my.cnf\u7684\u914d\u7f6e<\/div>\n<div style=\"font-size: 19px;\">[mysqld_multi]<br \/>\nmysqld = \/usr\/local\/mysql\/bin\/mysqld_safe<br \/>\nmysqladmin = \/usr\/local\/mysql\/bin\/mysqladmin<br \/>\nuser = shutdown<br \/>\npassword = shutdown123 \uff08\u5bf9\u5e94\u7684\u6388\u6743\u8d26\u53f7\u548c\u5bc6\u7801\uff09<\/div>\n<div style=\"font-size: 19px;\"><\/div>\n<div style=\"font-size: 19px;\"><\/div>\n<div style=\"font-size: 19px;\">#######\u540c\u6b65\u6307\u5b9a\u7aef\u53e3\u7684\u6570\u636e\u5e93\u4ee5\u53ca\u53cc\u6570\u636e\u5e93\u7684\u914d\u7f6e<\/div>\n<div style=\"font-size: 19px;\">CHANGE MASTER TO MASTER_HOST=&#8217;192.168.0.88&#8242;,<span style=\"color: #eb0073;\">master_port=3307<\/span>,\u00a0\u00a0 MASTER_USER=&#8217;repl&#8217;,\u00a0 MASTER_PASSWORD=&#8217;ceshi160&#8242;,\u00a0 MASTER_LOG_FILE=&#8217;mysql-bin.000001&#8242;,\u00a0\u00a0 MASTER_LOG_POS=107;<\/div>\n<div style=\"font-size: 19px;\"><\/div>\n<div style=\"font-size: 19px;\">\u5982\u679c\u53d8\u6210\u53cc\u793a\u4f8b\u8bb0\u5f97\u4fee\u7406my.cnf<\/div>\n<div style=\"font-size: 19px;\">[mysqld_multi]<br \/>\nmysqld\u00a0\u00a0\u00a0\u00a0 = \/usr\/bin\/mysqld_safe<br \/>\nmysqladmin = \/usr\/bin\/mysqladmin<br \/>\nuser = shutdown<\/div>\n<div style=\"font-size: 19px;\">password = shutdown123<\/div>\n<div style=\"font-size: 19px;\"><\/div>\n<div style=\"font-size: 19px;\">\u4fee\u6539 \u00a0[mysqld1]<\/div>\n<div style=\"font-size: 19px;\"><\/div>\n<div style=\"font-size: 19px;\">\u6dfb\u52a0<\/div>\n<div style=\"font-size: 19px;\">[mysqld2]<br \/>\nsocket\u00a0\u00a0\u00a0\u00a0 = \/tmp\/mysql.sock2<br \/>\nport\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 = 3307<br \/>\npid-file\u00a0\u00a0 = \/var\/lib\/mysql2\/hostname.pid2<br \/>\ndatadir\u00a0\u00a0\u00a0 = \/var\/lib\/mysql2<br \/>\nuser\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 = mysql<br \/>\n<span style=\"color: #eb0073;\">server-id\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 = 81<br \/>\nbinlog-do-db = shanliao_sequence<br \/>\nlog-bin=mysql-bin<\/span><br \/>\nauto-increment-increment = 1<br \/>\nauto-increment-offset = 1<\/div>\n<div style=\"font-size: 19px;\"><\/div>\n<div style=\"font-size: 19px;\"><\/div>\n<\/div>\n<\/div>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp;<\/p>\n<p><basefont size=\"2\" face=\"Tahoma\" \/><br \/>\n<meta http-equiv=\"Content-Type\" content=\"text\/html;charset=utf-8\" \/><br \/>\n<meta name=\"exporter-version\" content=\"Evernote Windows\/270387 (zh-CN); Windows\/6.1.7601 Service Pack 1;\" \/><\/p>\n<style><!--\n    body, td {\n      font-family: Tahoma;\n      font-size: 10pt;\n    }\n\n--><\/style>\n<p><a name=\"207\"><\/a><\/p>\n<h1>mysql \u9047\u5230\u7684\u4e00\u4e9b\u95ee\u9898<\/h1>\n<div>\n<div style=\"word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;\">\n<div>alter table message_board_reply_sequence\u00a0\u00a0\u00a0\u00a0\u00a0 auto_increment=10001;<br \/>\nalter table message_board_sequence\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 auto_increment=10001;<br \/>\nalter table room_activity_sequence\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 auto_increment=10001;<br \/>\nalter table room_message_board_reply_sequence auto_increment=10001;<br \/>\nalter table room_message_board_sequence\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 auto_increment=10001;<br \/>\nalter table room_sequence\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 auto_increment=10001;<br \/>\nalter table room_topic_sequence\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 auto_increment=10001;<br \/>\nalter table user_sequence\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 auto_increment=10001;<br \/>\nauto_increment=10001;\n<\/div>\n<div><span style=\"font-size: 19px;\"><span style=\"font-size: 19px;\">\u00a0<\/span><\/span><\/div>\n<p>#######mysqld_multi stop \u5173\u95ed\u4e0d\u4e86\u6570\u636e\u5e93<\/p>\n<div style=\"font-size: 19px;\">1\uff1a\u6388\u6743<\/div>\n<div style=\"font-size: 19px;\">grant shutdown on *.* to &#8216;shutdown&#8217;@&#8217;localhost&#8217; identified by &#8216;shutdown123&#8217;;<br \/>\nflush privileges;<\/div>\n<div style=\"font-size: 19px;\">2\uff1a\u66f4\u6539my.cnf\u7684\u914d\u7f6e<\/div>\n<div style=\"font-size: 19px;\">[mysqld_multi]<br \/>\nmysqld = \/usr\/local\/mysql\/bin\/mysqld_safe<br \/>\nmysqladmin = \/usr\/local\/mysql\/bin\/mysqladmin<br \/>\nuser = shutdown<br \/>\npassword = shutdown123 \uff08\u5bf9\u5e94\u7684\u6388\u6743\u8d26\u53f7\u548c\u5bc6\u7801\uff09<\/div>\n<div style=\"font-size: 19px;\"><\/div>\n<div style=\"font-size: 19px;\"><\/div>\n<div style=\"font-size: 19px;\">#######\u540c\u6b65\u6307\u5b9a\u7aef\u53e3\u7684\u6570\u636e\u5e93\u4ee5\u53ca\u53cc\u6570\u636e\u5e93\u7684\u914d\u7f6e<\/div>\n<div style=\"font-size: 19px;\">CHANGE MASTER TO MASTER_HOST=&#8217;192.168.0.88&#8242;,<span style=\"color: #eb0073;\">master_port=3307<\/span>,\u00a0\u00a0 MASTER_USER=&#8217;repl&#8217;,\u00a0 MASTER_PASSWORD=&#8217;ceshi160&#8242;,\u00a0 MASTER_LOG_FILE=&#8217;mysql-bin.000001&#8242;,\u00a0\u00a0 MASTER_LOG_POS=107;<\/div>\n<div style=\"font-size: 19px;\"><\/div>\n<div style=\"font-size: 19px;\">\u5982\u679c\u53d8\u6210\u53cc\u793a\u4f8b\u8bb0\u5f97\u4fee\u7406my.cnf<\/div>\n<div style=\"font-size: 19px;\">[mysqld_multi]<br \/>\nmysqld\u00a0\u00a0\u00a0\u00a0 = \/usr\/bin\/mysqld_safe<br \/>\nmysqladmin = \/usr\/bin\/mysqladmin<br \/>\nuser = shutdown<\/div>\n<div style=\"font-size: 19px;\">password = shutdown123<\/div>\n<div style=\"font-size: 19px;\"><\/div>\n<div style=\"font-size: 19px;\">\u4fee\u6539 \u00a0[mysqld1]<\/div>\n<div style=\"font-size: 19px;\"><\/div>\n<div style=\"font-size: 19px;\">\u6dfb\u52a0<\/div>\n<div style=\"font-size: 19px;\">[mysqld2]<br \/>\nsocket\u00a0\u00a0\u00a0\u00a0 = \/tmp\/mysql.sock2<br \/>\nport\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 = 3307<br \/>\npid-file\u00a0\u00a0 = \/var\/lib\/mysql2\/hostname.pid2<br \/>\ndatadir\u00a0\u00a0\u00a0 = \/var\/lib\/mysql2<br \/>\nuser\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 = mysql<br \/>\n<span style=\"color: #eb0073;\">server-id\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 = 81<br \/>\nbinlog-do-db = shanliao_sequence<br \/>\nlog-bin=mysql-bin<\/span><br \/>\nauto-increment-increment = 1<br \/>\nauto-increment-offset = 1<\/div>\n<div style=\"font-size: 19px;\"><\/div>\n<div style=\"font-size: 19px;\"><\/div>\n<\/div>\n<\/div>\n<p>&nbsp;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-2960","post","type-post","status-publish","format-standard","hentry","category-5","category-5-id","post-seq-1","post-parity-odd","meta-position-corners","fix"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.hmouse.cn\/index.php?rest_route=\/wp\/v2\/posts\/2960","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hmouse.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hmouse.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hmouse.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hmouse.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2960"}],"version-history":[{"count":2,"href":"https:\/\/www.hmouse.cn\/index.php?rest_route=\/wp\/v2\/posts\/2960\/revisions"}],"predecessor-version":[{"id":3107,"href":"https:\/\/www.hmouse.cn\/index.php?rest_route=\/wp\/v2\/posts\/2960\/revisions\/3107"}],"wp:attachment":[{"href":"https:\/\/www.hmouse.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2960"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hmouse.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2960"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hmouse.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2960"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}