{"id":1841,"date":"2020-07-01T06:17:11","date_gmt":"2020-06-30T22:17:11","guid":{"rendered":"http:\/\/39.97.231.10\/?p=1841"},"modified":"2020-07-01T06:17:11","modified_gmt":"2020-06-30T22:17:11","slug":"mysql%e9%ab%98%e5%8f%af%e7%94%a8%e5%a4%8d%e5%88%b6%e7%ae%a1%e7%90%86%e5%b7%a5%e5%85%b7-orchestrator%e4%bb%8b%e7%bb%8d","status":"publish","type":"post","link":"http:\/\/www.weijing.co\/?p=1841","title":{"rendered":"MySQL\u9ad8\u53ef\u7528\u590d\u5236\u7ba1\u7406\u5de5\u5177 \u2014\u2014 Orchestrator\u4ecb\u7ecd"},"content":{"rendered":"<h2>\u80cc\u666f<\/h2>\n<p>\u5728MySQL\u9ad8\u53ef\u7528\u67b6\u6784\u4e2d\uff0c\u76ee\u524d\u4f7f\u7528\u6bd4\u8f83\u591a\u7684\u662fPercona\u7684PXC\uff0cGalera\u4ee5\u53caMySQL 5.7\u4e4b\u540e\u7684MGR\u7b49\uff0c\u5176\u4ed6\u7684\u8fd8\u6709\u7684<a href=\\\"https:\/\/github.com\/yoshinorim\/mha4mysql-manager\\\" target=\\\"_blank\\\" rel=\\\"noopener noreferrer\\\">MHA<\/a>\uff0c\u4eca\u5929\u4ecb\u7ecd\u53e6\u4e00\u4e2a\u6bd4\u8f83\u597d\u7528\u7684MySQL\u9ad8\u53ef\u7528\u590d\u5236\u7ba1\u7406\u5de5\u5177\uff1a<a href=\\\"https:\/\/github.com\/github\/orchestrator\\\" target=\\\"_blank\\\" rel=\\\"noopener noreferrer\\\">Orchestrator<\/a>\uff08orch\uff09\u3002<br \/>\n<a href=\\\"https:\/\/github.com\/github\/orchestrator\\\" target=\\\"_blank\\\" rel=\\\"noopener noreferrer\\\">Orchestrator<\/a>\uff08orch\uff09\uff1ago\u7f16\u5199\u7684MySQL\u9ad8\u53ef\u7528\u6027\u548c\u590d\u5236\u62d3\u6251\u7ba1\u7406\u5de5\u5177\uff0c\u652f\u6301\u590d\u5236\u62d3\u6251\u7ed3\u6784\u7684\u8c03\u6574\uff0c\u81ea\u52a8\u6545\u969c\u8f6c\u79fb\u548c\u624b\u52a8\u4e3b\u4ece\u5207\u6362\u7b49\u3002\u540e\u7aef\u6570\u636e\u5e93\u7528MySQL\u6216SQLite\u5b58\u50a8\u5143\u6570\u636e\uff0c\u5e76\u63d0\u4f9bWeb\u754c\u9762\u5c55\u793aMySQL\u590d\u5236\u7684\u62d3\u6251\u5173\u7cfb\u53ca\u72b6\u6001\uff0c\u901a\u8fc7Web\u53ef\u66f4\u6539MySQL\u5b9e\u4f8b\u7684\u590d\u5236\u5173\u7cfb\u548c\u90e8\u5206\u914d\u7f6e\u4fe1\u606f\uff0c\u540c\u65f6\u4e5f\u63d0\u4f9b\u547d\u4ee4\u884c\u548capi\u63a5\u53e3\uff0c\u65b9\u4fbf\u8fd0\u7ef4\u7ba1\u7406\u3002\u76f8\u5bf9\u6bd4MHA\u6765\u770b\u6700\u91cd\u8981\u7684\u662f\u89e3\u51b3\u4e86\u7ba1\u7406\u8282\u70b9\u7684\u5355\u70b9\u95ee\u9898\uff0c\u5176\u901a\u8fc7raft\u534f\u8bae\u4fdd\u8bc1\u672c\u8eab\u7684\u9ad8\u53ef\u7528\u3002GitHub\u7684\u4e00\u90e8\u5206\u7ba1\u7406\u4e5f\u5728\u7528\u8be5\u5de5\u5177\u8fdb\u884c\u7ba1\u7406\u3002\u5173\u4e8e<a href=\\\"https:\/\/github.com\/github\/orchestrator\\\" target=\\\"_blank\\\" rel=\\\"noopener noreferrer\\\">Orchestrator<\/a>\u66f4\u8be6\u7ec6\u7684\u4ecb\u7ecd\u53ef\u4ee5\u770bGithub\u7684\u4ecb\u7ecd\uff0c\u5927\u81f4\u7684\u7279\u70b9\u6709\uff1a<br \/>\n\u2460 \u81ea\u52a8\u53d1\u73b0MySQL\u7684\u590d\u5236\u62d3\u6251\uff0c\u5e76\u4e14\u5728web\u4e0a\u5c55\u793a\u3002<br \/>\n\u2461 \u91cd\u6784\u590d\u5236\u5173\u7cfb\uff0c\u53ef\u4ee5\u5728web\u8fdb\u884c\u62d6\u56fe\u6765\u8fdb\u884c\u590d\u5236\u5173\u7cfb\u53d8\u66f4\u3002<br \/>\n\u2462 \u68c0\u6d4b\u4e3b\u5f02\u5e38\uff0c\u5e76\u53ef\u4ee5\u81ea\u52a8\u6216\u624b\u52a8\u6062\u590d\uff0c\u901a\u8fc7Hooks\u8fdb\u884c\u81ea\u5b9a\u4e49\u811a\u672c\u3002<br \/>\n\u2463 \u652f\u6301\u547d\u4ee4\u884c\u548cweb\u754c\u9762\u7ba1\u7406\u590d\u5236\u3002<br \/>\n<img src=\\\"https:\/\/img2018.cnblogs.com\/blog\/163084\/201902\/163084-20190216140527010-571190652.png\\\" alt=\\\"\\\" width=\\\"661\\\" height=\\\"426\\\" \/><\/p>\n<h2>\u73af\u5883\uff1a<\/h2>\n<div>\n<div><\/div>\n<pre>\u7cfb\u7edf\uff1a\nUbuntu 16.04\n\u4e09\u53f0\u4e3b\u673a\uff1a\ntest1:192.168.163.131\ntest2:192.168.163.132\ntest3:192.168.163.133\n\u540e\u7aefMySQL\u7aef\u53e3\uff1a3306\n\u6d4b\u8bd5MySQL\u7aef\u53e3\uff1a3307<\/pre>\n<div><\/div>\n<\/div>\n<h2>\u5b89\u88c5<\/h2>\n<p>\u6839\u636e\u9700\u8981<a href=\\\"https:\/\/github.com\/github\/orchestrator\/releases\\\" target=\\\"_blank\\\" rel=\\\"noopener noreferrer\\\">\u4e0b\u8f7d<\/a>\u5408\u9002\u7684\u5305\u8fdb\u884c<a href=\\\"https:\/\/github.com\/github\/orchestrator\/blob\/master\/docs\/install.md\\\" target=\\\"_blank\\\" rel=\\\"noopener noreferrer\\\">\u5b89\u88c5<\/a>\uff0c\u672c\u6587\u662f\u57fa\u4e8eUbuntu16.04\u5b89\u88c5\u7684\uff0c\u4e0b\u8f7d\u597ddeb\u5305\u540e\uff0c\u9700\u8981\u5b89\u88c5jq\u7684\u4f9d\u8d56\u5305\uff08apt-get install jq\uff09\u3002\u5b89\u88c5\u5b8c\u6210\u4e4b\u540e\uff0c\u76f8\u5e94\u7684\u76ee\u5f55\u4e3a\uff1a<\/p>\n<div>\n<pre>\/usr\/local\/orchestrator\n-rwxr-xr-x 1 root root  20M 1\u6708  16 21:49 orchestrator\n-rw-r--r-- 1 root root 5.1K 1\u6708  16 21:49 orchestrator-sample.conf.json\n-rw-r--r-- 1 root root 4.4K 1\u6708  16 21:49 orchestrator-sample-sqlite.conf.json\ndrwxr-xr-x 7 root root 4.0K 2\u6708  15 19:03 resources<\/pre>\n<\/div>\n<p>orchestrator\uff1a\u5e94\u7528\u7a0b\u5e8f<br \/>\n*.json\uff1a\u9ed8\u8ba4\u7684\u914d\u7f6e\u6a21\u677f<br \/>\nresources\uff1aorchestrator\u76f8\u5173\u7684\u6587\u4ef6\uff1aclient\u3001web\u3001\u4f2aGTID\u7b49\u76f8\u5173\u6587\u4ef6\u3002<\/p>\n<h2>\u914d\u7f6e<\/h2>\n<p>\u914d\u7f6e\u7684\u76f8\u5173<a href=\\\"https:\/\/github.com\/github\/orchestrator\/blob\/master\/go\/config\/config.go\\\" target=\\\"_blank\\\" rel=\\\"noopener noreferrer\\\">\u53c2\u6570<\/a>\u4e86\u89e3\u540e\uff0c\u5927\u81f4\u8bf4\u660e\u5982\u4e0b\uff1a<\/p>\n<div>\n<pre>        Debug:                                      false,  --\u8bbe\u7f6edebug\u6a21\u5f0f\n        EnableSyslog:                               false, -- \u662f\u5426\u628a\u65e5\u5fd7\u8f93\u51fa\u5230\u7cfb\u7edf\u65e5\u5fd7\u91cc\n        ListenAddress:                              \\\":3000\\\", -- web http tpc \u76d1\u542c\u7aef\u53e3\n        ListenSocket:                               \\\"\\\", -- \u5957\u63a5\u5b57\u6587\u4ef6\uff0c\u9ed8\u8ba4\u7a7a\uff0c\u548cListenAddress\u4e92\u65a5\u3002\n        HTTPAdvertise:                              \\\"\\\", --\u53ef\u9009\uff0c\u4e3araft\u8bbe\u7f6e\u3002\u901a\u77e5\u76f8\u5173http\u4fe1\u606f\n        AgentsServerPort:                           \\\":3001\\\",--\u56de\u8c03\u63a5\u53e3\n        StatusEndpoint:                             \\\"\/api\/status\\\",--\u72b6\u6001\u67e5\u770b\uff0c\u9ed8\u8ba4\u4e3a\\'\/ api \/ status\\'\n        StatusOUVerify:                             false,--\u5982\u679c\u4e3atrue\uff0c\u8bf7\u5c1d\u8bd5\u5728Mutual TLS\u6253\u5f00\u65f6\u9a8c\u8bc1OU\u3002 \u9ed8\u8ba4\u4e3afalse\n        BackendDB:                                  \\\"mysql\\\",--\u540e\u7aef\u6570\u636e\u5e93\u7c7b\u578b\uff0c\u53ef\u9009mysql\u6216\u5219sqlite3\n        SQLite3DataFile:                            \\\"\\\", --sqlite3\u7684\u6570\u636e\u6587\u4ef6\n        SkipOrchestratorDatabaseUpdate:             false,-- \u5982\u679c\u4e3atrue\uff0c\u4e0d\u68c0\u67e5\u540e\u7aef\u6570\u636e\u5e93\u6a21\u5f0f\uff0c\u4e5f\u4e0d\u5c1d\u8bd5\u66f4\u65b0\u5b83\u3002 \u5f53\u8fd0\u884c\u591a\u4e2a\u7248\u672c\u7684orchestrator\u65f6\u5f88\u6709\u7528\n        PanicIfDifferentDatabaseDeploy:             false, --\u5982\u679c\u4e3atrue\uff0c\u6b64\u8fdb\u7a0b\u53d1\u73b0\u534f\u8c03\u5668\u540e\u7aef\u7684\u6570\u636e\u5e93\u7531\u4e0d\u540c\u7248\u672c\u914d\u7f6e\uff0c\u5219\u53d1\u751f\u6df7\u4e71\n        RaftBind:                                   \\\"127.0.0.1:10008\\\",\n        RaftAdvertise:                              \\\"\\\",\n        RaftDataDir:                                \\\"\\\",\n        DefaultRaftPort:                            10008, --\u5982\u679cRaftNodes\u672a\u6307\u5b9a\u7aef\u53e3\uff0c\u4f7f\u7528\u6b64\u7aef\u53e3\n        RaftNodes:                                  []string{}, --raft\u521d\u59cb\u5316\u8fde\u63a5\n        ExpectFailureAnalysisConcensus:             true,\n        MySQLOrchestratorMaxPoolConnections:        128, --\u9650\u5236\u540e\u7aef\u6570\u636e\u5e93\u7684\u5e76\u53d1\u6570\n        MySQLOrchestratorPort:                      3306, --\u540e\u7aef\u6570\u636e\u5e93\u7aef\u53e3\n        MySQLTopologyUseMutualTLS:                  false,--\u662f\u5426\u542f\u7528TLS\u8eab\u4efd\u9a8c\u8bc1\n        MySQLTopologyUseMixedTLS:                   true,--\u662f\u5426\u6df7\u5408TLS\u548c\u975eTLS\u8eab\u4efd\u9a8c\u8bc1\n        MySQLOrchestratorUseMutualTLS:              false,--\u662f\u5426\u4e3aOrchestrator MySQL\u5b9e\u4f8b\u542f\u7528TLS\u8eab\u4efd\u9a8c\u8bc1\n        MySQLConnectTimeoutSeconds:                 2,--\u6570\u636e\u5e93\u8fde\u63a5\u8d85\u65f6\u65f6\u95f4\uff0c\u79d2\u3002\n        MySQLOrchestratorReadTimeoutSeconds:        30,--\u8bfb\u64cd\u4f5c\u8d85\u65f6\n        MySQLDiscoveryReadTimeoutSeconds:           10,--\u53d1\u73b0\u67e5\u8be2\u7684\u8d85\u65f6\n        MySQLTopologyReadTimeoutSeconds:            600,--\u53d1\u73b0\u67e5\u8be2\u4e4b\u5916\u67e5\u8be2\u7684\u8d85\u65f6\n        MySQLConnectionLifetimeSeconds:             0,--\u6d3b\u8dc3\u72b6\u6001\u7684\u7684\u65f6\u95f4\n        DefaultInstancePort:                        3306,--\u6570\u636e\u5e93\u9ed8\u8ba4\u7aef\u53e3\n        TLSCacheTTLFactor:                          100,--\u4e3aTLS\u4fe1\u606f\u7f13\u5b58\u5230\u671f\u7684InstancePollSeconds\u7684\u56e0\u5b50\n        InstancePollSeconds:                        5,--\u5b9e\u4f8b\u4e4b\u95f4\u8bfb\u53d6\u95f4\u9694\n        InstanceWriteBufferSize:                    100,--\u5b9e\u4f8b\u5199\u5165\u7f13\u51b2\u533a\u5927\u5c0f\n        BufferInstanceWrites:                       false,--\u5728\u540e\u7aef\u8868\u4e0a\u8bbe\u7f6e\u4e3a\u201ctrue\u201d\u4ee5\u8fdb\u884c\u5199\u5165\u4f18\u5316\uff0c\u5199\u5165\u53ef\u80fd\u8fc7\u65f6\u5e76\u8986\u76d6\u975e\u9648\u65e7\u6570\u636e\n        InstanceFlushIntervalMilliseconds:          100,--\u5b9e\u4f8b\u5199\u5165\u7f13\u51b2\u533a\u5237\u65b0\u4e4b\u95f4\u7684\u6700\u5927\u95f4\u9694\u65f6\u95f4\n        SkipMaxScaleCheck:                          false,--\u5982\u679c\u6ca1\u6709MaxScale BinlogServer\uff0c\u8bf7\u5c06\u5176\u8bbe\u7f6e\u4e3a\u201ctrue\u201d\u4ee5\u4fdd\u5b58\u4e00\u4e9b\u65e0\u610f\u4e49\u7684\u67e5\u8be2\n        UnseenInstanceForgetHours:                  240,--\u5ffd\u7565\u4e0d\u53ef\u89c1\u7684\u5b9e\u4f8b\u7684\u5c0f\u65f6\u6570\n        SnapshotTopologiesIntervalHours:            0,--\u5feb\u7167\u62d3\u6251\u8c03\u7528\u4e4b\u95f4\u7684\u5c0f\u65f6\u95f4\u9694\u3002 \u9ed8\u8ba4\u503c\uff1a0\uff08\u7981\u7528\uff09\n        DiscoverByShowSlaveHosts:                   false,--\u5728PROCESSLIST\u4e4b\u524d\u5c1d\u8bd5SHOW SLAVE HOSTS\n        UseSuperReadOnly:                           false,--\u6bcf\u5f53\u5b83\u8bbe\u7f6eread_only\u65f6\uff0corchestrator\u5e94\u8be5\u662fsuper_read_only\n        DiscoveryMaxConcurrency:                    300,--\u5b9e\u4f8b\u53d1\u73b0\u65f6go\u7684\u6700\u5927\u8fdb\u7a0b\u6570\u91cf\u3002\n        DiscoveryQueueCapacity:                     100000,--\u53d1\u73b0\u961f\u5217\u7684\u7f13\u51b2\u533a\u5927\u5c0f\u3002 \u5e94\u8be5\u5927\u4e8e\u53d1\u73b0\u7684\u6570\u636e\u5e93\u5b9e\u4f8b\u7684\u6570\u91cf\n        DiscoveryQueueMaxStatisticsSize:            120,--\u53d1\u73b0\u961f\u5217\u7684\u7b2c\u4e8c\u6b21\u7edf\u8ba1\u6570\u636e\u7684\u6700\u5927\u6570\u91cf\n        DiscoveryCollectionRetentionSeconds:        120,--\u4fdd\u7559\u53d1\u73b0\u96c6\u5408\u4fe1\u606f\u7684\u79d2\u6570\n        InstanceBulkOperationsWaitTimeoutSeconds:   10,--\u5728\u8fdb\u884c\u6279\u91cf\u64cd\u4f5c\u65f6\u7b49\u5f85\u5355\u4e2a\u5b9e\u4f8b\u7684\u65f6\u95f4\n        HostnameResolveMethod:                      \\\"default\\\",\n        MySQLHostnameResolveMethod:                 \\\"@@hostname\\\",\n        SkipBinlogServerUnresolveCheck:             true, --\u8df3\u8fc7\u68c0\u67e5\u672a\u89e3\u6790\u7684\u4e3b\u673a\u540d\u662f\u5426\u89e3\u6790\u4e3abinlog\u670d\u52a1\u5668\u7684\u76f8\u540c\u4e3b\u673a\u540d\n        ExpiryHostnameResolvesMinutes:              60, --\u4e3b\u673a\u540d\u89e3\u6790\u5230\u671f\u4e4b\u524d\u7684\u5206\u949f\u6570\n        RejectHostnameResolvePattern:               \\\"\\\",--\u4e0d\u63a5\u53d7\u89e3\u6790\u4e3b\u673a\u540d\u7684\u6b63\u5219\u8868\u8fbe\u5f0f\u3002 \u8fd9\u6837\u505a\u662f\u4e3a\u4e86\u907f\u514d\u56e0\u7f51\u7edc\u6545\u969c\u800c\u5b58\u50a8\u9519\u8bef\n        ReasonableReplicationLagSeconds:            10,--\u590d\u5236\u5ef6\u8fdf\u9ad8\u4e8e\u8be5\u503c\u8868\u793a\u5f02\u5e38\n        ProblemIgnoreHostnameFilters:               []string{},--\u5c06\u4e0e\u7ed9\u5b9a\u7684regexp\u8fc7\u6ee4\u5668\u5339\u914d\u7684\u4e3b\u673a\u540d\u6700\u5c0f\u5316\u95ee\u9898\n        VerifyReplicationFilters:                   false, --\u5728\u62d3\u6251\u91cd\u6784\u4e4b\u524d\u68c0\u67e5\u590d\u5236\u7b5b\u9009\u5668\n        ReasonableMaintenanceReplicationLagSeconds: 20,--\u9ad8\u4e8e\u6b64\u503c\u4f1a\u4e0a\u79fb\u548c\u4e0b\u79fb\n        CandidateInstanceExpireMinutes:             60,--\u8be5\u65f6\u95f4\u4e4b\u540e\uff0c\u4f7f\u7528\u5b9e\u4f8b\u4f5c\u4e3a\u5019\u9009\u526f\u672c\u7684\u5efa\u8bae\u5df2\u8fc7\u671f\u3002\n        AuditLogFile:                               \\\"\\\", --\u5ba1\u8ba1\u64cd\u4f5c\u7684\u65e5\u5fd7\u6587\u4ef6\u540d\u3002 \u7a7a\u7684\u65f6\u5019\u7981\u7528\u3002\n        AuditToSyslog:                              false, --\u5ba1\u8ba1\u65e5\u5fd7\u662f\u5426\u5199\u5165\u5230\u7cfb\u7edf\u65e5\u5fd7\n        AuditToBackendDB:                           false, --\u5ba1\u8ba1\u65e5\u5fd7\u662f\u5426\u5165\u5e93\uff0c\u8868\u4e3aaudit\uff0c\u9ed8\u8ba4true\n        RemoveTextFromHostnameDisplay:              \\\"\\\",--\u53bb\u9664\u7fa4\u96c6\/\u7fa4\u96c6\u9875\u9762\u4e0a\u7684\u4e3b\u673a\u540d\u7684\u6587\u672c\n        ReadOnly:                                   false,\n        AuthenticationMethod:                       \\\"\\\",--\u8eab\u4efd\u9a8c\u8bc1\u7c7b\u578b\u3002\u53ef\u9009\u503c\u6709\uff1a\n\\\"\\\" for none, \\\"basic\\\" for BasicAuth,\n\\\"multi\\\" for advanced BasicAuth,\n\\\"proxy\\\" for forwarded credentials via reverse proxy, \u901a\u8fc7\u53cd\u5411\u4ee3\u7406\u8f6c\u53d1\u51ed\u8bc1\n\\\"token\\\" for token based access\n        HTTPAuthUser:                               \\\"\\\", --HTTP\u57fa\u672c\u8eab\u4efd\u9a8c\u8bc1\u7684\u7528\u6237\u540d\uff0c\u7a7a\u8868\u793a\u7981\u7528\u8eab\u4efd\u9a8c\u8bc1\n        HTTPAuthPassword:                           \\\"\\\", --HTTP\u57fa\u672c\u8eab\u4efd\u9a8c\u8bc1\u7684\u5bc6\u7801\uff0c\u7a7a\u8868\u793a\u7981\u7528\u5bc6\u7801\n        AuthUserHeader:                             \\\"X-Forwarded-User\\\",--\u5f53AuthenticationMethod\u4e3a\u201cproxy\u201d\u65f6\uff0cHTTP\u6807\u5934\u6307\u793aauth\u7528\u6237\n        PowerAuthUsers:                             []string{\\\"*\\\"},--\u5728AuthenticationMethod ==\u201cproxy\u201d\u4e0a\uff0c\u53ef\u4ee5\u66f4\u6539\u7684\u7528\u6237\u5217\u8868\u3002 \u6240\u6709\u5176\u4ed6\u90fd\u662f\u53ea\u8bfb\u7684\n        PowerAuthGroups:                            []string{},--\u7ecf\u8fc7\u8eab\u4efd\u9a8c\u8bc1\u7684\u7528\u6237\u5fc5\u987b\u662funix\u7ec4\u5217\u8868\u6210\u5458\n        AccessTokenUseExpirySeconds:                60,--\u5fc5\u987b\u4f7f\u7528\u5df2\u9881\u53d1token\u7684\u65f6\u95f4\n        AccessTokenExpiryMinutes:                   1440,--\u8bbf\u95ee\u7684\u5230\u671f\u7684\u65f6\u95f4\n        ClusterNameToAlias:                         make(map[string]string),\n        DetectClusterAliasQuery:                    \\\"\\\",--\u53ef\u9009\u67e5\u8be2\uff08\u5728\u62d3\u6251\u5b9e\u4f8b\u4e0a\u6267\u884c\uff09\uff0c\u8fd4\u56de\u96c6\u7fa4\u7684\u522b\u540d\n        DetectClusterDomainQuery:                   \\\"\\\",--\u53ef\u9009\u67e5\u8be2\uff08\u5728\u62d3\u6251\u5b9e\u4f8b\u4e0a\u6267\u884c\uff09\uff0c\u8fd4\u56de\u6b64\u96c6\u7fa4\u4e3b\u670d\u52a1\u5668\u7684VIP \/ CNAME \/\u522b\u540d\/\u4efb\u4f55\u57df\u540d\n        DetectInstanceAliasQuery:                   \\\"\\\",--\u53ef\u9009\u67e5\u8be2\uff08\u5728\u62d3\u6251\u5b9e\u4f8b\u4e0a\u6267\u884c\uff09\uff0c\u8fd4\u56de\u5b9e\u4f8b\u7684\u522b\u540d\n        DetectPromotionRuleQuery:                   \\\"\\\",--\u53ef\u9009\u67e5\u8be2\uff08\u5728\u62d3\u6251\u5b9e\u4f8b\u4e0a\u6267\u884c\uff09\uff0c\u8fd4\u56de\u5b9e\u4f8b\u7684\u63d0\u5347\u89c4\u5219\n        DataCenterPattern:                          \\\"\\\", --\u4e00\u4e2a\u7ec4\u7684\u6b63\u5219\u8868\u8fbe\u5f0f\u6a21\u5f0f\uff0c\u4ece\u4e3b\u673a\u540d\u4e2d\u63d0\u53d6\u6570\u636e\u4e2d\u5fc3\u540d\u79f0\n        PhysicalEnvironmentPattern:                 \\\"\\\",--\u4e00\u4e2a\u7ec4\u7684\u6b63\u5219\u8868\u8fbe\u5f0f\u6a21\u5f0f\uff0c\u4ece\u4e3b\u673a\u540d\u4e2d\u63d0\u53d6\u7269\u7406\u73af\u5883\u4fe1\u606f\n        DetectDataCenterQuery:                      \\\"\\\",--\u53ef\u9009\u67e5\u8be2\uff08\u5728\u62d3\u6251\u5b9e\u4f8b\u4e0a\u6267\u884c\uff09\uff0c\u8fd4\u56de\u5b9e\u4f8b\u7684\u6570\u636e\u4e2d\u5fc3\uff0c\u8986\u76d6DataCenterPattern\uff0c\u5bf9\u65e0\u6cd5\u901a\u8fc7\u4e3b\u673a\u540d\u63a8\u65adDC\u975e\u5e38\u6709\u7528\n        DetectPhysicalEnvironmentQuery:      \\\"\\\",--\u53ef\u9009\u67e5\u8be2\uff08\u5728\u62d3\u6251\u5b9e\u4f8b\u4e0a\u6267\u884c\uff09\uff0c\u8fd4\u56de\u5b9e\u4f8b\u7684\u7269\u7406\u73af\u5883\u3002\u8986\u76d6PhysicalEnvironmentPattern\uff0c\u5bf9\u65e0\u6cd5\u901a\u8fc7\u4e3b\u673a\u540d\u63a8\u65ad\u51faenv\u975e\u5e38\u6709\u7528\n        DetectSemiSyncEnforcedQuery:                \\\"\\\",--\u53ef\u9009\u67e5\u8be2\uff08\u5728\u62d3\u6251\u5b9e\u4f8b\u4e0a\u6267\u884c\uff09\u4ee5\u786e\u5b9a\u662f\u5426\u5bf9\u4e3b\u5199\u5165\u5b8c\u5168\u5f3a\u5236\u6267\u884c\u534a\u540c\u6b65\n        SupportFuzzyPoolHostnames:                  true,--\u5e94\u8be5\u201csubmit-pool-instances\u201d\u547d\u4ee4\u80fd\u591f\u4f20\u9012\u6a21\u7cca\u5b9e\u4f8b\u5217\u8868\uff08\u6a21\u7cca\u610f\u5473\u7740\u975efqdn\uff0c\u4f46\u8db3\u591f\u72ec\u7279\uff0c\u53ef\u4ee5\u8bc6\u522b\uff09\u3002 \u9ed8\u8ba4\u503c\u4e3a\u201ctrue\u201d\uff0c\u8868\u793a\u540e\u7aef\u6570\u636e\u5e93\u4e0a\u6709\u66f4\u591a\u67e5\u8be2\n        InstancePoolExpiryMinutes:                  60,--database_instance_pool\u7684\u8fc7\u671f\u7684\u65f6\u95f4\n        PromotionIgnoreHostnameFilters:             []string{},--\u4e0d\u4f7f\u7528\u4e3b\u673a\u540d\u5339\u914d\u6a21\u5f0f\u6765\u63d0\u5347\u526f\u672c\n        ServeAgentsHttp:                            false,--\u4ea7\u751f\u53e6\u4e00\u4e2a\u4e13\u7528\u4e8eorchestrator-agent\u7684HTTP\u63a5\u53e3\n        AgentsUseSSL:                               false,--\u5f53\u201ctrue\u201dorchestrator\u5c06\u4f7f\u7528SSL\u4fa6\u542c\u4ee3\u7406\u7aef\u53e3\u4ee5\u53ca\u901a\u8fc7SSL\u8fde\u63a5\u5230\u4ee3\u7406\u65f6\n        AgentsUseMutualTLS:                         false,--\u5f53\u201ctrue\u201d\u65f6\uff0c\u4f7f\u7528\u76f8\u4e92TLS\u670d\u52a1\u5668\u4e0e\u4ee3\u7406\u901a\u4fe1\n        AgentSSLValidOUs:                           []string{},--\u4f7f\u7528\u76f8\u4e92TLS\u4e0e\u4ee3\u7406\u8fdb\u884c\u901a\u4fe1\n        AgentSSLSkipVerify:                         false,--\u4e3a\u4ee3\u7406\u4f7f\u7528SSL\n        AgentSSLPrivateKeyFile:                     \\\"\\\",\n        AgentSSLCertFile:                           \\\"\\\",\n        AgentSSLCAFile:                             \\\"\\\",\n        UseSSL:                                     false,--\u5728Web\u7aef\u53e3\u4e0a\u4f7f\u7528SSL\n        UseMutualTLS:                               false,--\u201ctrue\u201d\u65f6\u4f7f\u7528TLS\u4f5c\u4e3a\u670d\u52a1\u5668\u7684Web\u548cAPI\u8fde\u63a5\n        SSLValidOUs:                                []string{},--\u4f7f\u7528TLS\u4ea4\u4e92\n        SSLSkipVerify:                              false,--\u4f7f\u7528SSL\u65f6\uff0c\u662f\u5426\u5e94\u5ffd\u7565SSL\u8ba4\u8bc1\u9519\u8bef\n        SSLPrivateKeyFile:                          \\\"\\\",\n        SSLCertFile:                                \\\"\\\",\n        SSLCAFile:                                  \\\"\\\",\n        AgentPollMinutes:                           60,--\u4ee3\u7406\u8f6e\u8be2\u7684\u5206\u949f\u6570\n        UnseenAgentForgetHours:                     6,--\u5fd8\u8bb0\u4e0d\u53ef\u89c1\u7684\u4ee3\u7406\u7684\u5c0f\u65f6\u6570\n        StaleSeedFailMinutes:                       60,--\u8fc7\u65f6\uff08\u65e0\u8fdb\u5c55\uff09\u88ab\u89c6\u4e3a\u5931\u8d25\u7684\u5206\u949f\u6570\n        SeedAcceptableBytesDiff:                    8192,--\u79cd\u5b50\u6e90\u548c\u76ee\u6807\u6570\u636e\u5927\u5c0f\u4e4b\u95f4\u7684\u5b57\u8282\u5dee\u5f02\u4ecd\u88ab\u89c6\u4e3a\u6210\u529f\u590d\u5236\n        SeedWaitSecondsBeforeSend:                  2,--\u5728\u4ee3\u7406\u4e0a\u5f00\u59cb\u53d1\u9001\u6570\u636e\u547d\u4ee4\u4e4b\u524d\u7b49\u5f85\u7684\u79d2\u6570\n        AutoPseudoGTID:                             false, --\u662f\u5426\u81ea\u52a8\u5c06Pseudo-GTID\u6761\u76ee\u6ce8\u5165\u4e3b\u670d\u52a1\u5668\n        PseudoGTIDPattern:                          \\\"\\\",--\u5728\u4e8c\u8fdb\u5236\u65e5\u5fd7\u4e2d\u67e5\u627e\u7684\u6a21\u5f0f\uff0c\u7528\u4e8e\u521b\u5efa\u552f\u4e00\u6761\u76ee\uff08\u4f2aGTID\uff09\u3002 \u4e3a\u7a7a\u65f6\uff0c\u7981\u7528\u57fa\u4e8e\u4f2aGTID\u7684\u91cd\u6784\u3002\n        PseudoGTIDPatternIsFixedSubstring:          false,--\u5982\u4e3atrue\uff0c\u5219PseudoGTIDPattern\u4e0d\u88ab\u89c6\u4e3a\u6b63\u5219\u8868\u8fbe\u5f0f\u800c\u662f\u56fa\u5b9a\u5b50\u5b57\u7b26\u4e32\n        PseudoGTIDMonotonicHint:                    \\\"\\\",--Pseudo-GTID\u6761\u76ee\u4e2d\u7684\u5b50\u5b57\u7b26\u4e32\uff0c\u8868\u793aPseudo-GTID\u6761\u76ee\u9884\u8ba1\u4f1a\u5355\u8c03\u9012\u589e\n        DetectPseudoGTIDQuery:                      \\\"\\\",--\u53ef\u9009\u67e5\u8be2\uff0c\u7528\u4e8e\u786e\u5b9a\u662f\u5426\u5728\u5b9e\u4f8b\u4e0a\u542f\u7528\u4e86\u4f2agtid\n        BinlogEventsChunkSize:                      10000,--SHOW BINLOG | RELAYLOG EVENTS LIMIT\u7684\u5757\u5927\u5c0f\u3002 \u8f83\u5c0f\u610f\u5473\u7740\u66f4\u5c11\u7684\u9501\u5b9a\u548c\u5de5\u4f5c\u8981\u505a\n        SkipBinlogEventsContaining:                 []string{},--\u626b\u63cf\/\u6bd4\u8f83Pseudo-GTID\u7684binlog\u65f6\uff0c\u8df3\u8fc7\u5305\u542b\u7ed9\u5b9a\u6587\u672c\u7684\u6761\u76ee\u3002 \u8fd9\u4e9b\u4e0d\u662f\u6b63\u5219\u8868\u8fbe\u5f0f\uff08\u626b\u63cfbinlog\u65f6\u4f1a\u6d88\u8017\u592a\u591a\u7684CPU\uff09\uff0c\u53ea\u9700\u67e5\u627e\u5b50\u5b57\u7b26\u4e32\u3002\n        ReduceReplicationAnalysisCount:             true,--\u5982\u679c\u4e3atrue\uff0c\u5219\u590d\u5236\u5206\u6790\u5c06\u62a5\u544a\u53ef\u80fd\u9996\u5148\u5904\u7406\u95ee\u9898\u7684\u53ef\u80fd\u6027\u7684\u5b9e\u4f8b\u3002 \u5982\u679c\u4e3afalse\uff0c\u5219\u4e3a\u6bcf\u4e2a\u5df2\u77e5\u5b9e\u4f8b\u63d0\u4f9b\u4e00\u4e2a\u6761\u76ee\n        FailureDetectionPeriodBlockMinutes:         60,--\u5b9e\u4f8b\u7684\u6545\u969c\u53d1\u73b0\u4fdd\u6301\u201c\u6d3b\u52a8\u201d\u7684\u65f6\u95f4\uff0c\u4ee5\u907f\u514d\u5b9e\u4f8b\u5931\u8d25\u7684\u5e76\u53d1\u201c\u53d1\u73b0\u201d; \u5982\u679c\u6709\u7684\u8bdd\uff0c\u8fd9\u4f1a\u5728\u4efb\u4f55\u6062\u590d\u8fc7\u7a0b\u4e4b\u524d\u3002\n        RecoveryPeriodBlockMinutes:                 60,--\u5b9e\u4f8b\u7684\u6062\u590d\u4fdd\u6301\u201c\u6d3b\u52a8\u201d\u7684\u65f6\u95f4\uff0c\u4ee5\u907f\u514d\u5e76\u53d1\u6062\u590d\n        RecoveryPeriodBlockSeconds:                 3600, --\u5b9e\u4f8b\u7684\u6062\u590d\u4fdd\u6301\u201c\u6d3b\u52a8\u201d\u7684\u65f6\u95f4\uff0c\u4ee5\u907f\u514d\u5e76\u53d1\u6062\u590d\n        RecoveryIgnoreHostnameFilters:              []string{},--\u6062\u590d\u5206\u6790\u5c06\u5b8c\u5168\u5ffd\u7565\u4e0e\u7ed9\u5b9a\u6a21\u5f0f\u5339\u914d\u7684\u4e3b\u673a\n        RecoverMasterClusterFilters:                []string{},--\u53ea\u5bf9\u5339\u914d\u8fd9\u4e9b\u6b63\u5219\u8868\u8fbe\u5f0f\u6a21\u5f0f\u7684\u96c6\u7fa4\u8fdb\u884c\u4e3b\u6062\u590d\uff08\u201c*\u201d\u6a21\u5f0f\u5339\u914d\u6240\u6709\uff09\n        RecoverIntermediateMasterClusterFilters:    []string{},--\u53ea\u5bf9\u5339\u914d\u8fd9\u4e9b\u6b63\u5219\u8868\u8fbe\u5f0f\u6a21\u5f0f\u7684\u96c6\u7fa4\u8fdb\u884c\u6062\u590d\uff08\u201c*\u201d\u6a21\u5f0f\u5339\u914d\u6240\u6709\u5185\u5bb9\uff09\n        ProcessesShellCommand:                      \\\"bash\\\",--\u6267\u884c\u547d\u4ee4\u811a\u672c\u7684Shell\n        OnFailureDetectionProcesses:                []string{},--\u68c0\u6d4b\u6545\u969c\u8f6c\u79fb\u65b9\u6848\u65f6\u6267\u884c\uff08\u5728\u51b3\u5b9a\u662f\u5426\u8fdb\u884c\u6545\u969c\u8f6c\u79fb\u4e4b\u524d\uff09\u3002 \u53ef\u4ee5\u5e76\u4e14\u5e94\u8be5\u4f7f\u7528\u5176\u4e2d\u4e00\u4e9b\u5360\u4f4d\u7b26{failureType}\uff0c{failureDescription}\uff0c{command}\uff0c{failedHost}\uff0c{failureCluster}\uff0c{failureClusterAlias}\uff0c{failureClusterDomain}\uff0c{failedPort}\uff0c{successorHost}\uff0c{successorPort}\uff0c{ successorAlias}\uff0c{countReplicas}\uff0c{replicaHosts}\uff0c{isDowntimed}\uff0c{autoMasterRecovery}\uff0c{autoIntermediateMasterRecovery}\n        PreGracefulTakeoverProcesses:      []string{},--\u5728\u4e3b\u53d8\u4e3a\u53ea\u8bfb\u4e4b\u524d\u7acb\u5373\u6267\u884c\u3002 \u53ef\u4ee5\u5e76\u4e14\u5e94\u8be5\u4f7f\u7528\u5176\u4e2d\u4e00\u4e9b\u5360\u4f4d\u7b26\uff1a{failureType}\uff0c{failureDescription}\uff0c{command}\uff0c{failedHost}\uff0c{failureCluster}\uff0c{failureClusterAlias}\uff0c{failureClusterDomain}\uff0c{failedPort}\uff0c{successorHost}\uff0c{successorPort}\uff0c{ successorAlias}\uff0c{countReplicas}\uff0c{replicaHosts}\uff0c{isDowntimed}\n        PreFailoverProcesses:                       []string{},--\u5728\u6267\u884c\u6062\u590d\u64cd\u4f5c\u4e4b\u524d\u7acb\u5373\u6267\u884c\u3002\u4efb\u4f55\u8fd9\u4e9b\u8fdb\u7a0b\u7684\u5931\u8d25\uff08\u975e\u96f6\u9000\u51fa\u4ee3\u7801\uff09\u90fd\u4f1a\u4e2d\u6b62\u6062\u590d\u3002\u63d0\u793a\uff1a\u8fd9\u4f7f\u60a8\u6709\u673a\u4f1a\u6839\u636e\u7cfb\u7edf\u7684\u67d0\u4e9b\u5185\u90e8\u72b6\u6001\u4e2d\u6b62\u6062\u590d\u3002 \u53ef\u4ee5\u5e76\u4e14\u5e94\u8be5\u4f7f\u7528\u5176\u4e2d\u4e00\u4e9b\u5360\u4f4d\u7b26\uff1a{failureType}\uff0c{failureDescription}\uff0c{command}\uff0c{failedHost}\uff0c{failureCluster}\uff0c{failureClusterAlias}\uff0c{failureClusterDomain}\uff0c{failedPort}\uff0c{successorHost}\uff0c{successorPort}\uff0c{ successorAlias}\uff0c{countReplicas}\uff0c{replicaHosts}\uff0c{isDowntimed}\n        PostMasterFailoverProcesses:                []string{},--\u5728\u4e3b\u6062\u590d\u6210\u529f\u7ed3\u675f\u65f6\u6267\u884c\uff08\u672a\u5b9a\u4e49\u7684\u6267\u884c\u987a\u5e8f\uff09\u3002 \u4f7f\u7528\u4e0ePostFailoverProcesses\u76f8\u540c\u7684\u5360\u4f4d\u7b26\n        PostIntermediateMasterFailoverProcesses:    []string{},--\u5728\u6210\u529f\u7684\u4e2d\u95f4\u4e3b\u6062\u590d\u7ed3\u675f\u65f6\u6267\u884c\uff08\u672a\u5b9a\u4e49\u7684\u6267\u884c\u987a\u5e8f\uff09\u3002 \u4f7f\u7528\u4e0ePostFailoverProcesses\u76f8\u540c\u7684\u5360\u4f4d\u7b26\n        PostFailoverProcesses:                      []string{},--\u5728\u6210\u529f\u6062\u590d\u7ed3\u675f\u65f6\u6267\u884c\uff08\u5305\u62ec\u5e76\u6dfb\u52a0\u5230\u4e0a\u8ff0\u4e24\u4e2a\uff09\u3002 \u53ef\u4ee5\u5e76\u4e14\u5e94\u8be5\u4f7f\u7528\u5176\u4e2d\u4e00\u4e9b\u5360\u4f4d\u7b26\uff1a{failureType}\uff0c{failureDescription}\uff0c{command}\uff0c{failedHost}\uff0c{failureCluster}\uff0c{failureClusterAlias}\uff0c{failureClusterDomain}\uff0c{failedPort}\uff0c{successorHost}\uff0c{successorPort}\uff0c{ successorAlias}\uff0c{countReplicas}\uff0c{replicaHosts}\uff0c{isDowntimed}\uff0c{isSuccessful}\uff0c{lostReplicas}\n        PostUnsuccessfulFailoverProcesses:          []string{},--\u5728\u4efb\u4f55\u4e0d\u6210\u529f\u7684\u6062\u590d\u7ed3\u675f\u65f6\u6267\u884c\u3002\uff08\u672a\u5b9a\u4e49\u7684\u6267\u884c\u987a\u5e8f\uff09\u3002 \u53ef\u4ee5\u5e76\u4e14\u5e94\u8be5\u4f7f\u7528\u5176\u4e2d\u4e00\u4e9b\u5360\u4f4d\u7b26\uff1a{failureType}\uff0c{failureDescription}\uff0c{command}\uff0c{failedHost}\uff0c{failureCluster}\uff0c{failureClusterAlias}\uff0c{failureClusterDomain}\uff0c{failedPort}\uff0c{successorHost}\uff0c{successorPort}\uff0c{ successorAlias}\uff0c{countReplicas}\uff0c{replicaHosts}\uff0c{isDowntimed}\uff0c{isSuccessful}\uff0c{lostReplicas}\n        PostGracefulTakeoverProcesses:              []string{},--\u5728\u65e7\u4e3b\u4f4d\u4e8e\u65b0\u664b\u5347\u7684\u4e3b\u4e4b\u540e\u6267\u884c\u3002 \u4f7f\u7528\u4e0ePostFailoverProcesses\u76f8\u540c\u7684\u5360\u4f4d\u7b26\n        CoMasterRecoveryMustPromoteOtherCoMaster:   true,--\u5f53\\'false\\'\u65f6\uff0c\u4efb\u4f55\u90fd\u53ef\u4ee5\u5f97\u5230\u63d0\u5347\uff08\u5019\u9009\u4eba\u6bd4\u5176\u4ed6\u4eba\u66f4\u53d7\u6b22\u8fce\uff09\u3002 \u5f53\\'true\\'\u65f6\uff0c\u5c06\u4fc3\u8fdb\u5176\u4ed6\u5171\u540c\u4e3b\u4eba\u6216\u5426\u5219\u5931\u8d25\n        DetachLostSlavesAfterMasterFailover(DetachLostReplicasAfterMasterFailover):        true,--\u6062\u590d\u8fc7\u7a0b\u4e2d\u53ef\u80fd\u4f1a\u4e22\u5931\u4e00\u4e9b\u526f\u672c\u3002\u5982\u679c\u4e3atrue\uff0c\u5c06\u901a\u8fc7detach-replica\u547d\u4ee4\u5f3a\u5236\u4e2d\u65ad\u5176\u590d\u5236\uff0c\u4ee5\u786e\u4fdd\u6ca1\u6709\u4eba\u8ba4\u4e3a\u5b83\u4eec\u5b8c\u5168\u6b63\u5e38\u8fd0\u884c\u3002\n        ApplyMySQLPromotionAfterMasterFailover:     true,--\u5c06\u91cd\u7f6eslave all\u5e76\u5728\u63d0\u5347\u7684master\u4e0a\u8bbe\u7f6eread_only = 0\uff0c\u9ed8\u8ba4true\u3002\n        PreventCrossDataCenterMasterFailover:       false,--\u5982\u679c\u4e3atrue\uff08\u9ed8\u8ba4\u503c\uff1afalse\uff09\uff0c\u5219\u4e0d\u5141\u8bb8\u8de8DC\u4e3b\u6545\u969c\u8f6c\u79fb\uff0corchestrator\u5c06\u5c3d\u5176\u6240\u80fd\u4ec5\u5728\u540c\u4e00DC\u5185\u8fdb\u884c\u6545\u969c\u8f6c\u79fb\uff0c\u5426\u5219\u4e0d\u8fdb\u884c\u6545\u969c\u8f6c\u79fb\u3002\n        MasterFailoverLostInstancesDowntimeMinutes: 0,--\u5728\u4e3b\u6545\u969c\u8f6c\u79fb\uff08\u5305\u62ec\u5931\u8d25\u7684\u4e3b\u526f\u672c\u548c\u4e22\u5931\u7684\u526f\u672c\uff09\u4e4b\u540e\u4e22\u5931\u7684\u4efb\u4f55\u670d\u52a1\u5668\u505c\u673a\u7684\u5206\u949f\u6570\u3002 0\u8868\u793a\u7981\u7528\n        MasterFailoverDetachSlaveMasterHost(MasterFailoverDetachReplicaMasterHost):        false,--orchestrator\u662f\u5426\u5e94\u8be5\u5728\u65b0\u5347\u7ea7\u7684master\u4e0a\u53d1\u51fadetach-replica-master-host\uff08\u8fd9\u6837\u53ef\u4ee5\u786e\u4fdd\u65b0master\u4e0d\u4f1a\u5c1d\u8bd5\u590d\u5236\u65e7\u7684master\uff0c\u5982\u679c\u5b83\u6062\u590d\u751f\u547d\uff09\u3002 \u9ed8\u8ba4\u4e3a\\'false\\'\u3002 \u5982\u679cApplyMySQLPromotionAfterMasterFailover\u4e3a\\'true\\'\u5219\u65e0\u610f\u4e49\u3002\n        FailMasterPromotionIfSQLThreadNotUpToDate:  false,--\u5982\u679c\u4e3atrue\uff0c\u5e76\u4e14\u53d1\u751f\u4e3b\u6545\u969c\u8f6c\u79fb\uff0c\u5982\u679c\u5019\u9009\u4e3b\u670d\u52a1\u5668\u672a\u6d88\u8017\u6240\u6709\u4e2d\u7ee7\u65e5\u5fd7\uff08\u5ef6\u8fdf\uff09\uff0c\u5219\u4e2d\u6b62\u5e76\u663e\u793a\u9519\u8bef\n        PostponeSlaveRecoveryOnLagMinutes\uff08PostponeReplicaRecoveryOnLagMinutes\uff09:          0,--\u5728\u5d29\u6e83\u6062\u590d\u65f6\uff0c\u6ede\u540e\u8d85\u8fc7\u7ed9\u5b9a\u5206\u949f\u7684\u526f\u672c\u4ec5\u5728\u4e3b\/ IM\u88ab\u9009\u51fa\u5e76\u6267\u884c\u8fdb\u7a0b\u540e\u624d\u5728\u6062\u590d\u8fc7\u7a0b\u7684\u540e\u671f\u590d\u6d3b\u3002 \u503c\u4e3a0\u5c06\u7981\u7528\u6b64\u529f\u80fd\n        RemoteSSHForMasterFailover:                 false,--orchestrator\u662f\u5426\u5e94\u8be5\u5728\u4e3b\u6545\u969c\u8f6c\u79fb\u65f6\u5c1d\u8bd5\u8fdc\u7a0b-shsh relaylog-synching\uff1f \u9700\u8981RemoteSSHCommand\n        RemoteSSHCommand:                           \\\"\\\",--\u4e00\u4e2a`ssh`\u547d\u4ee4\uff0c\u7531\u6062\u590d\u8fdb\u7a0b\u7528\u4e8e\u8bfb\u53d6\/\u5e94\u7528relaylogs\u3002 \u5982\u679c\u63d0\u4f9b\uff0c\u5219\u6b64\u53d8\u91cf\u5fc5\u987b\u5305\u542b\u6587\u672c\u201c{hostname}\u201d\u3002 \u8fdc\u7a0bSSH\u767b\u5f55\u5fc5\u987b\u5177\u6709\u8bfb\/\u5199\u4e2d\u7ee7\u65e5\u5fd7\u7684\u6743\u9650\u3002 \u793a\u4f8b\uff1a\u201csetuidgid remoteuser ssh {hostname}\u201d\n        RemoteSSHCommandUseSudo:                    true,--\u662f\u5426orchestrator\u5e94\u8be5\u5728SSH\u547d\u4ee4\u4e0b\u5728\u8fdc\u7a0b\u4e3b\u673a\u4e0a\u5e94\u7528\\'sudo\\'\n        OSCIgnoreHostnameFilters:                   []string{},--\u5efa\u8bae\u5c06\u5ffd\u7565\u4e0e\u7ed9\u5b9a\u6a21\u5f0f\u5339\u914d\u7684\u526f\u672c\u4e3b\u673a\u540d\n        GraphiteAddr:                               \\\"\\\",\n        GraphitePath:                               \\\"\\\",\n        GraphiteConvertHostnameDotsToUnderscores:   true,\n        GraphitePollSeconds:                        60,\n        URLPrefix:                                  \\\"\\\",\n        DiscoveryIgnoreReplicaHostnameFilters: []string{},\n        ConsulAddress:                         \\\"\\\",\n        ConsulAclToken:                        \\\"\\\",\n        ZkAddress:                             \\\"\\\",\n        KVClusterMasterPrefix:                 \\\"mysql\/master\\\",\n        WebMessage:                            \\\"\\\",<\/pre>\n<\/div>\n<p>\u6309\u7167\u672c\u6587\u7684\u6d4b\u8bd5\u7528\u4f8b\uff0c\u5b9a\u5236\u4e86\u4e00\u4e2a\u76f8\u5173\u7684<a href=\\\"https:\/\/github.com\/github\/orchestrator\/blob\/master\/docs\/configuration-sample.md\\\" target=\\\"_blank\\\" rel=\\\"noopener noreferrer\\\">\u6a21\u677f<\/a>\uff08\/etc\/orchestrator.conf.json\uff09\uff1a<\/p>\n<div>\n<div class=\\\"cnblogs_code_toolbar\\\"><\/div>\n<pre>{\n  \\\"Debug\\\": true,\n  \\\"EnableSyslog\\\": false,\n  \\\"ListenAddress\\\": \\\":3000\\\",\n  \\\"MySQLTopologyUser\\\": \\\"orchestrator\\\",\n  \\\"MySQLTopologyPassword\\\": \\\"Aa123456\\\",\n  \\\"MySQLTopologyCredentialsConfigFile\\\": \\\"\\\",\n  \\\"MySQLTopologySSLPrivateKeyFile\\\": \\\"\\\",\n  \\\"MySQLTopologySSLCertFile\\\": \\\"\\\",\n  \\\"MySQLTopologySSLCAFile\\\": \\\"\\\",\n  \\\"MySQLTopologySSLSkipVerify\\\": true,\n  \\\"MySQLTopologyUseMutualTLS\\\": false,\n  \\\"MySQLOrchestratorHost\\\": \\\"127.0.0.1\\\",\n  \\\"MySQLOrchestratorPort\\\": 3306,\n  \\\"MySQLOrchestratorDatabase\\\": \\\"orchestrator\\\",\n  \\\"MySQLOrchestratorUser\\\": \\\"orchestrator\\\",\n  \\\"MySQLOrchestratorPassword\\\": \\\"123456\\\",\n  \\\"MySQLOrchestratorCredentialsConfigFile\\\": \\\"\\\",\n  \\\"MySQLOrchestratorSSLPrivateKeyFile\\\": \\\"\\\",\n  \\\"MySQLOrchestratorSSLCertFile\\\": \\\"\\\",\n  \\\"MySQLOrchestratorSSLCAFile\\\": \\\"\\\",\n  \\\"MySQLOrchestratorSSLSkipVerify\\\": true,\n  \\\"MySQLOrchestratorUseMutualTLS\\\": false,\n  \\\"MySQLConnectTimeoutSeconds\\\": 1,\n  \\\"MySQLTopologyReadTimeoutSeconds\\\": 3,\n  \\\"MySQLDiscoveryReadTimeoutSeconds\\\": 3,\n  \\\"DefaultInstancePort\\\": 3306,\n  \\\"DiscoverByShowSlaveHosts\\\": true,\n  \\\"InstancePollSeconds\\\": 3,\n  \\\"UnseenInstanceForgetHours\\\": 240,\n  \\\"SnapshotTopologiesIntervalHours\\\": 0,\n  \\\"InstanceBulkOperationsWaitTimeoutSeconds\\\": 10,\n  \\\"HostnameResolveMethod\\\": \\\"default\\\",\n  \\\"MySQLHostnameResolveMethod\\\": \\\"@@hostname\\\",\n  \\\"SkipBinlogServerUnresolveCheck\\\": true,\n  \\\"SkipMaxScaleCheck\\\":true,\n  \\\"ExpiryHostnameResolvesMinutes\\\": 60,\n  \\\"RejectHostnameResolvePattern\\\": \\\"\\\",\n  \\\"ReasonableReplicationLagSeconds\\\": 10,\n  \\\"ProblemIgnoreHostnameFilters\\\": [],\n  \\\"VerifyReplicationFilters\\\": false,\n  \\\"ReasonableMaintenanceReplicationLagSeconds\\\": 20,\n  \\\"CandidateInstanceExpireMinutes\\\": 1440,\n  \\\"AuditLogFile\\\": \\\"\\\",\n  \\\"AuditToSyslog\\\": false,\n  \\\"RemoveTextFromHostnameDisplay\\\": \\\":3306\\\",\n  \\\"ReadOnly\\\": false,\n  \\\"AuthenticationMethod\\\": \\\"\\\",\n  \\\"HTTPAuthUser\\\": \\\"\\\",\n  \\\"HTTPAuthPassword\\\": \\\"\\\",\n  \\\"AuthUserHeader\\\": \\\"\\\",\n  \\\"PowerAuthUsers\\\": [\n    \\\"*\\\"\n  ],\n  \\\"ClusterNameToAlias\\\": {\n    \\\"127.0.0.1\\\": \\\"test suite\\\"\n  },\n  \\\"SlaveLagQuery\\\": \\\"\\\",\n  \\\"DetectClusterAliasQuery\\\":  \\\"SELECT cluster_name FROM meta.cluster WHERE cluster_name = left(@@hostname,4) \\\",\n  \\\"DetectClusterDomainQuery\\\": \\\"SELECT cluster_domain FROM meta.cluster WHERE cluster_name = left(@@hostname,4) \\\",\n  \\\"DetectInstanceAliasQuery\\\": \\\"SELECT @@hostname as instance_alias\\\",\n  \\\"DetectPromotionRuleQuery\\\": \\\"\\\",\n  \\\"DetectDataCenterQuery\\\": \\\"SELECT data_center FROM meta.cluster WHERE cluster_name = left(@@hostname,4) \\\",\n  \\\"PhysicalEnvironmentPattern\\\": \\\"\\\",\n  \\\"PromotionIgnoreHostnameFilters\\\": [],\n  \\\"DetachLostReplicasAfterMasterFailover\\\": true,\n  \\\"DetectSemiSyncEnforcedQuery\\\": \\\"SELECT 0 AS semisync FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM performance_schema.global_variables WHERE VARIABLE_NAME = \\'rpl_semi_sync_master_wait_no_slave\\' AND VARIABLE_VALUE = \\'ON\\') UNION SELECT 1 FROM DUAL WHERE EXISTS (SELECT 1 FROM performance_schema.global_variables WHERE VARIABLE_NAME = \\'rpl_semi_sync_master_wait_no_slave\\' AND VARIABLE_VALUE = \\'ON\\')\\\",\n  \\\"ServeAgentsHttp\\\": false,\n  \\\"AgentsServerPort\\\": \\\":3001\\\",\n  \\\"AgentsUseSSL\\\": false,\n  \\\"AgentsUseMutualTLS\\\": false,\n  \\\"AgentSSLSkipVerify\\\": false,\n  \\\"AgentSSLPrivateKeyFile\\\": \\\"\\\",\n  \\\"AgentSSLCertFile\\\": \\\"\\\",\n  \\\"AgentSSLCAFile\\\": \\\"\\\",\n  \\\"AgentSSLValidOUs\\\": [],\n  \\\"UseSSL\\\": false,\n  \\\"UseMutualTLS\\\": false,\n  \\\"SSLSkipVerify\\\": false,\n  \\\"SSLPrivateKeyFile\\\": \\\"\\\",\n  \\\"SSLCertFile\\\": \\\"\\\",\n  \\\"SSLCAFile\\\": \\\"\\\",\n  \\\"SSLValidOUs\\\": [],\n  \\\"URLPrefix\\\": \\\"\\\",\n  \\\"StatusEndpoint\\\": \\\"\/api\/status\\\",\n  \\\"StatusSimpleHealth\\\": true,\n  \\\"StatusOUVerify\\\": false,\n  \\\"AgentPollMinutes\\\": 60,\n  \\\"UnseenAgentForgetHours\\\": 6,\n  \\\"StaleSeedFailMinutes\\\": 60,\n  \\\"SeedAcceptableBytesDiff\\\": 8192,\n  \\\"AutoPseudoGTID\\\":true,\n  \\\"PseudoGTIDPattern\\\": \\\"drop view if exists `meta`.`_pseudo_gtid_hint__asc:\\\",\n  \\\"PseudoGTIDPatternIsFixedSubstring\\\": true,\n  \\\"PseudoGTIDMonotonicHint\\\": \\\"asc:\\\",\n  \\\"DetectPseudoGTIDQuery\\\": \\\"select count(*) as pseudo_gtid_exists from meta.pseudo_gtid_status where anchor = 1 and time_generated &gt; now() - interval 2 hour\\\",\n  \\\"BinlogEventsChunkSize\\\": 10000,\n  \\\"SkipBinlogEventsContaining\\\": [],\n  \\\"ReduceReplicationAnalysisCount\\\": true,\n  \\\"FailureDetectionPeriodBlockMinutes\\\": 60,\n  \\\"RecoveryPeriodBlockSeconds\\\": 31,\n  \\\"RecoveryIgnoreHostnameFilters\\\": [],\n  \\\"RecoverMasterClusterFilters\\\": [\\\"*\\\"],\n  \\\"RecoverIntermediateMasterClusterFilters\\\": [\\\"*\\\"],\n  \\\"OnFailureDetectionProcesses\\\": [\n    \\\"echo \\'\u2461  Detected {failureType} on {failureCluster}. Affected replicas: {countSlaves}\\' &gt;&gt; \/tmp\/recovery.log\\\"\n  ],\n  \\\"PreGracefulTakeoverProcesses\\\": [\n    \\\"echo \\'\u2460   Planned takeover about to take place on {failureCluster}. Master will switch to read_only\\' &gt;&gt; \/tmp\/recovery.log\\\"\n  ],\n  \\\"PreFailoverProcesses\\\": [\n    \\\"echo \\'\u2462  Will recover from {failureType} on {failureCluster}\\' &gt;&gt; \/tmp\/recovery.log\\\"\n  ],\n  \\\"PostMasterFailoverProcesses\\\": [\n    \\\"echo \\'\u2463  Recovered from {failureType} on {failureCluster}. Failed: {failedHost}:{failedPort}; Promoted: {successorHost}:{successorPort}\\' &gt;&gt; \/tmp\/recovery.log\\\"\n  ],\n  \\\"PostFailoverProcesses\\\": [\n    \\\"echo \\'\u2464  (for all types) Recovered from {failureType} on {failureCluster}. Failed: {failedHost}:{failedPort}; Successor: {successorHost}:{successorPort}\\' &gt;&gt; \/tmp\/recovery.log\\\"\n  ],\n  \\\"PostUnsuccessfulFailoverProcesses\\\": [\n    \\\"echo \\'\u2467  &gt;&gt; \/tmp\/recovery.log\\'\\\"\n  ],\n  \\\"PostIntermediateMasterFailoverProcesses\\\": [\n    \\\"echo \\'\u2465 Recovered from {failureType} on {failureCluster}. Failed: {failedHost}:{failedPort}; Successor: {successorHost}:{successorPort}\\' &gt;&gt; \/tmp\/recovery.log\\\"\n  ],\n  \\\"PostGracefulTakeoverProcesses\\\": [\n    \\\"echo \\'\u2466 Planned takeover complete\\' &gt;&gt; \/tmp\/recovery.log\\\"\n  ],\n  \\\"CoMasterRecoveryMustPromoteOtherCoMaster\\\": true,\n  \\\"DetachLostSlavesAfterMasterFailover\\\": true,\n  \\\"ApplyMySQLPromotionAfterMasterFailover\\\": true,\n  \\\"PreventCrossDataCenterMasterFailover\\\": false,\n  \\\"MasterFailoverDetachSlaveMasterHost\\\": false,\n  \\\"MasterFailoverLostInstancesDowntimeMinutes\\\": 0,\n  \\\"PostponeSlaveRecoveryOnLagMinutes\\\": 0,\n  \\\"OSCIgnoreHostnameFilters\\\": [],\n  \\\"GraphiteAddr\\\": \\\"\\\",\n  \\\"GraphitePath\\\": \\\"\\\",\n  \\\"GraphiteConvertHostnameDotsToUnderscores\\\": true,\n  \\\"RaftEnabled\\\": true,\n  \\\"BackendDB\\\": \\\"mysql\\\",\n  \\\"RaftBind\\\": \\\"192.168.163.131\\\",\n  \\\"RaftDataDir\\\": \\\"\/var\/lib\/orchestrator\\\",\n  \\\"DefaultRaftPort\\\": 10008,\n  \\\"RaftNodes\\\": [\n    \\\"192.168.163.131\\\",\n    \\\"192.168.163.132\\\",\n    \\\"192.168.163.133\\\"\n    ],\n \\\"ConsulAddress\\\": \\\"\\\",\n \\\"ConsulAclToken\\\": \\\"\\\"\n}<\/pre>\n<\/div>\n<p>\u8fd9\u91cc\u5217\u51fa\u8bf4\u660e\u51e0\u4e2a\u6bd4\u8f83\u91cd\u8981\u7684<a href=\\\"https:\/\/github.com\/github\/orchestrator\/blob\/master\/docs\/configuration.md\\\" target=\\\"_blank\\\" rel=\\\"noopener noreferrer\\\">\u53c2\u6570<\/a>\uff1a<\/p>\n<ul>\n<li>ListenAddress\uff1a<br \/>\nweb\u754c\u9762\u7684http\u7aef\u53e3<\/li>\n<li>MySQLOrchestratorHost<br \/>\norch\u540e\u7aef\u6570\u636e\u5e93\u5730\u5740<\/li>\n<li>MySQLOrchestratorPort<br \/>\norch\u540e\u7aef\u6570\u636e\u5e93\u7aef\u53e3<\/li>\n<li>MySQLOrchestratorDatabase<br \/>\norch\u540e\u7aef\u6570\u636e\u5e93\u540d<\/li>\n<li>MySQLOrchestratorUser<br \/>\norch\u540e\u7aef\u6570\u636e\u5e93\u7528\u6237\u540d\uff08\u660e\u6587\uff09<\/li>\n<li>MySQLOrchestratorPassword<br \/>\norch\u540e\u7aef\u6570\u636e\u5e93\u5bc6\u7801\uff08\u660e\u6587\uff09<\/li>\n<li>MySQLOrchestratorCredentialsConfigFile<br \/>\n\u540e\u7aef\u6570\u636e\u5e93\u7528\u6237\u540d\u5bc6\u7801\u7684\u914d\u7f6e\u6587\u4ef6\u300c \\&#8221;MySQLOrchestratorCredentialsConfigFile\\&#8221;: \\&#8221;\/etc\/mysql\/orchestrator-backend.cnf\\&#8221; \u300d\uff0c\u683c\u5f0f\uff1a<\/p>\n<div>\n<pre>[client]\nuser=orchestrator_srv\npassword=${ORCHESTRATOR_PASSWORD}<\/pre>\n<\/div>\n<p>\u540e\u7aefMySQL\u6570\u636e\u5e93\u7684\u7528\u6237\u6743\u9650\u9700\u8981\u662f\uff1a<\/p>\n<div>\n<pre>CREATE USER \\'orchestrator_srv\\'@\\'orc_host\\' IDENTIFIED BY \\'orc_server_password\\';\nGRANT ALL ON orchestrator.* TO \\'orchestrator_srv\\'@\\'orc_host\\';<\/pre>\n<\/div>\n<\/li>\n<li>MySQLTopologyUser<br \/>\n\u88ab\u7ba1\u7406\u7684MySQL\u7684\u7528\u6237\uff08\u660e\u6587\uff09<\/li>\n<li>MySQLTopologyPassword<br \/>\n\u88ab\u7ba1\u7406\u7684MySQL\u7684\u5bc6\u7801\uff08\u5bc6\u6587\uff09<\/li>\n<li>MySQLTopologyCredentialsConfigFile<br \/>\n\u88ab\u7ba1\u7406\u7684MySQL\u7684\u7528\u6237\u5bc6\u7801\u914d\u7f6e\u6587\u4ef6\u300c\\&#8221;\/etc\/mysql\/orchestrator-topology.cnf\\&#8221;\u300d\uff0c\u683c\u5f0f\uff1a<\/p>\n<div>\n<pre>[client]\nuser=orchestrator_srv\npassword=${ORCHESTRATOR_PASSWORD}<\/pre>\n<\/div>\n<\/li>\n<\/ul>\n<ul>\n<li>\u88ab\u7ba1\u7406MySQL\u6570\u636e\u5e93\u7684\u7528\u6237\u6743\u9650\u9700\u8981\u662f\uff1a\n<div>\n<pre>CREATE USER \\'orchestrator\\'@\\'orc_host\\' IDENTIFIED BY \\'orc_topology_password\\';\nGRANT SUPER, PROCESS, REPLICATION SLAVE, REPLICATION CLIENT, RELOAD ON *.* TO \\'orchestrator\\'@\\'orc_host\\';\nGRANT SELECT ON meta.* TO \\'orchestrator\\'@\\'orc_host\\';\nGRANT SELECT ON ndbinfo.processes TO \\'orchestrator\\'@\\'orc_host\\'; -- Only for NDB Cluster<\/pre>\n<\/div>\n<\/li>\n<\/ul>\n<ul>\n<li>InstancePollSeconds<br \/>\norch\u63a2\u6d4bMySQL\u7684\u95f4\u9694\u79d2\u6570<\/li>\n<li>MySQLConnectTimeoutSeconds<br \/>\norch\u8fde\u63a5MySQL\u7684\u8d85\u65f6\u65f6\u95f4<\/li>\n<li>MySQLOrchestratorReadTimeoutSeconds<br \/>\n\u540e\u7aefMySQL\u8bfb\u8d85\u65f6\u65f6\u95f4<\/li>\n<li>MySQLTopologyReadTimeoutSeconds<br \/>\n\u88ab\u7ba1\u7406MySQL\u8bfb\u8d85\u65f6\u65f6\u95f4\uff0c\u7528\u4e8e\u9664\u53d1\u73b0\u67e5\u8be2\u4ee5\u5916\u7684\u6240\u6709\u67e5\u8be2<\/li>\n<li>MySQLDiscoveryReadTimeoutSeconds<br \/>\n\u88ab\u7ba1\u7406MySQL\u8bfb\u8d85\u65f6\u65f6\u95f4\uff0c\u7528\u4e8e\u53d1\u73b0<\/li>\n<li>DefaultInstancePort<br \/>\n\u88ab\u7ba1\u7406MySQL\u7684\u9ed8\u8ba4\u7aef\u53e3<\/li>\n<li>DiscoverByShowSlaveHosts<br \/>\n\u901a\u8fc7show slave hosts \u6765\u53d1\u73b0\u62d3\u6251\u7ed3\u6784<\/li>\n<li>UnseenInstanceForgetHours<br \/>\n\u5ffd\u7565\u770b\u4e0d\u89c1\u7684\u5b9e\u4f8b\u7684\u5c0f\u65f6\u6570<\/li>\n<li>HostnameResolveMethod<br \/>\n\u89e3\u6790\u4e3b\u673a\u540d\uff0c\u4f7f\u7528\u4e3b\u673a\u540d\uff1adefault\uff1b\u4e0d\u89e3\u6790\u7528none\uff0c\u76f4\u63a5\u7528IP<\/li>\n<li>MySQLHostnameResolveMethod<br \/>\n\u89e3\u6790\u4e3b\u673a\u540d\uff0c\u53d1\u51faselect @@hostname\uff1b\u53d1\u51faselect @@report_host\uff08\u9700\u8981\u914d\u7f6ereport_host\uff09\u3002\u4e0d\u89e3\u6790\u7528\\&#8221;\\&#8221;\uff0c\u76f4\u63a5\u7528IP\u3002<\/li>\n<li>InstanceBulkOperationsWaitTimeoutSeconds<br \/>\n\u8fdb\u884c\u6279\u91cf\u64cd\u4f5c\u65f6\u7b49\u5f85\u5355\u4e2a\u5b9e\u4f8b\u7684\u65f6\u95f4<\/li>\n<li>ReasonableReplicationLagSeconds<br \/>\n\u590d\u5236\u5ef6\u8fdf\u9ad8\u4e8e\u8be5\u503c\u8868\u793a\u5f02\u5e38<\/li>\n<li>VerifyReplicationFilters<br \/>\n\u5728\u62d3\u6251\u91cd\u6784\u4e4b\u524d\u68c0\u67e5\u590d\u5236\u7b5b\u9009\u5668<\/li>\n<li>ReasonableMaintenanceReplicationLagSeconds<br \/>\n\u590d\u5236\u5ef6\u8fdf\u9ad8\u4e8e\u8be5\u503c\u4f1a\u4e0a\u4e0b\u79fb\u52a8\u8c03\u6574MySQL\u62d3\u6251<\/li>\n<li>CandidateInstanceExpireMinutes<br \/>\n\u8be5\u65f6\u95f4\u4e4b\u540e\uff0c\u4f7f\u7528\u5b9e\u4f8b\u4f5c\u4e3a\u5019\u9009\u4ece\u5e93\uff08\u5728\u4e3b\u6545\u969c\u8f6c\u79fb\u65f6\u63d0\u5347\uff09\u7684\u5efa\u8bae\u5230\u671f<\/li>\n<li>ReplicationLagQuery\uff08SlaveLagQuery\uff09<br \/>\n\u4f7f\u7528SHOW SLAVE STATUS\u8fdb\u884c\u5ef6\u8fdf\u5224\u65ad\uff0c\u529b\u5ea6\u4e3a\u79d2\u3002\u4f7f\u7528pt-heartbeat\u3002\u8fd9\u63d0\u4f9b\u4e86\u4e9a\u79d2\u7ea7\u7684\u529b\u5ea6\uff0c\u5141\u8bb8\u81ea\u5df1\u8bbe\u7f6e\u67e5\u8be2\u300c\u00a0\\&#8221;select absolute_lag from meta.heartbeat_view\\&#8221;\u300d<\/li>\n<li><a href=\\\"https:\/\/github.com\/github\/orchestrator\/blob\/master\/docs\/configuration-discovery-classifying.md\\\" target=\\\"_blank\\\" rel=\\\"noopener noreferrer\\\">DetectClusterAliasQuery<\/a><br \/>\n\u67e5\u8be2\u96c6\u7fa4\u522b\u540d\u7684query\uff0c\u4fe1\u606f\u653e\u5230\u6bcf\u4e2a\u88ab\u7ba1\u7406\u5b9e\u4f8b\u7684meta\u5e93\u7684cluster\u8868\u4e2d\u300c\\&#8221;select ifnull(max(cluster_name), \\&#8217;\\&#8217;) as cluster_alias from meta.cluster where anchor=1\\&#8221;\u300d<\/li>\n<li>DetectClusterDomainQuery<br \/>\n\u67e5\u8be2\u96c6\u7fa4Domain\u7684query\uff0c\u4fe1\u606f\u653e\u5230\u6bcf\u4e2a\u88ab\u7ba1\u7406\u5b9e\u4f8b\u7684meta\u5e93\u7684cluster\u8868\u4e2d\u300cselect ifnull(max(cluster_domain), \\&#8217;\\&#8217;) as cluster_domain from meta.cluster where anchor=1\u300d<\/li>\n<li>DetectInstanceAliasQuery<br \/>\n\u67e5\u8be2\u5b9e\u4f8b\u7684\u522b\u540d<\/li>\n<li>DetectDataCenterQuery<br \/>\n\u67e5\u8be2\u6570\u636e\u4e2d\u5fc3\u7684query\uff0c\u4fe1\u606f\u653e\u5230\u6bcf\u4e2a\u88ab\u7ba1\u7406\u5b9e\u4f8b\u7684meta\u5e93\u7684cluster\u8868\u4e2d\u300c\\&#8221;select substring_index(substring_index(@@hostname, \\&#8217;-\\&#8217;,3), \\&#8217;-\\&#8217;, -1) as dc\\&#8221;\u300d<\/li>\n<li>DetachLostReplicasAfterMasterFailover\uff08DetachLostSlavesAfterMasterFailover\uff09<br \/>\n\u662f\u5426\u5f3a\u5236\u5206\u79bb\u5728\u4e3b\u6062\u590d\u4e2d\u4e0d\u4f1a\u4e22\u5931\u7684\u4ece\u5e93<\/li>\n<li>DetectSemiSyncEnforcedQuery<br \/>\n\u68c0\u6d4b\u662f\u5426\u5f3a\u5236\u534a\u540c\u6b65<\/li>\n<li><a href=\\\"https:\/\/github.com\/github\/orchestrator\/blob\/master\/docs\/configuration-discovery-pseudo-gtid.md\\\" target=\\\"_blank\\\" rel=\\\"noopener noreferrer\\\">AutoPseudoGTID<\/a><br \/>\n\u662f\u5426\u81ea\u52a8\u5c06Pseudo-GTID\u6761\u76ee\u6ce8\u5165\u4e3b\u670d\u52a1\u5668\uff0c\u5bf9\u4e8e\u6ca1\u7528GTID\u7684\u590d\u5236\u63a8\u8350\u4f7f\u7528\u3002\u8981\u662f\u4f7f\u7528\u4e86GTID\u7684\u590d\u5236\uff0c\u8bbe\u7f6e\u201cfalse\u201d\u5373\u53ef\u3002<\/li>\n<li>RecoveryPeriodBlockSeconds<br \/>\n\u5728\u8be5\u65f6\u95f4\u5185\u518d\u6b21\u51fa\u73b0\u6545\u969c\uff0c\u4e0d\u4f1a\u8fdb\u884c\u8fc1\u79fb\uff0c\u907f\u514d\u51fa\u73b0\u5e76\u53d1\u6062\u590d\u548c\u4e0d\u7a33\u5b9a\u3002<\/li>\n<li>FailureDetectionPeriodBlockMinutes<br \/>\n\u5728\u8be5\u65f6\u95f4\u5185\u518d\u6b21\u51fa\u73b0\u6545\u969c\uff0c\u4e0d\u4f1a\u88ab\u591a\u6b21\u53d1\u73b0\u3002<\/li>\n<li>RecoverMasterClusterFilters<br \/>\n\u53ea\u5bf9\u5339\u914d\u8fd9\u4e9b\u6b63\u5219\u8868\u8fbe\u5f0f\u6a21\u5f0f\u7684\u96c6\u7fa4\u8fdb\u884c\u4e3b\u6062\u590d\uff08\u201c*\u201d\u6a21\u5f0f\u5339\u914d\u6240\u6709\uff09\u3002<\/li>\n<li>RecoverIntermediateMasterClusterFilters<br \/>\n\u53ea\u5bf9\u5339\u914d\u8fd9\u4e9b\u6b63\u5219\u8868\u8fbe\u5f0f\u6a21\u5f0f\u7684\u96c6\u7fa4\u8fdb\u884c\u4e3b\u6062\u590d\uff08\u201c*\u201d\u6a21\u5f0f\u5339\u914d\u6240\u6709\uff09\u3002<\/li>\n<li>OnFailureDetectionProcesses<br \/>\n\u68c0\u6d4b\u6545\u969c\u8f6c\u79fb\u65f6\u6267\u884c\uff0c\u5c5e\u4e8e<a href=\\\"https:\/\/github.com\/github\/orchestrator\/blob\/master\/docs\/configuration-recovery.md#hooks\\\" target=\\\"_blank\\\" rel=\\\"noopener noreferrer\\\">Hooks<\/a>\u3002<\/li>\n<li>PreGracefulTakeoverProcesses<br \/>\n\u5728\u4e3b\u53d8\u4e3a\u53ea\u8bfb\u4e4b\u524d\u7acb\u5373\u6267\u884c\uff0c\u5c5e\u4e8e<a href=\\\"https:\/\/github.com\/github\/orchestrator\/blob\/master\/docs\/configuration-recovery.md#hooks\\\" target=\\\"_blank\\\" rel=\\\"noopener noreferrer\\\">Hooks<\/a>\u3002<\/li>\n<li>PreFailoverProcesses<br \/>\n\u5728\u6267\u884c\u6062\u590d\u64cd\u4f5c\u4e4b\u524d\u7acb\u5373\u6267\u884c\uff0c\u5c5e\u4e8e<a href=\\\"https:\/\/github.com\/github\/orchestrator\/blob\/master\/docs\/configuration-recovery.md#hooks\\\" target=\\\"_blank\\\" rel=\\\"noopener noreferrer\\\">Hooks<\/a>\u3002<\/li>\n<li>PostMasterFailoverProcesses<br \/>\n\u5728\u4e3b\u6062\u590d\u6210\u529f\u7ed3\u675f\u65f6\u6267\u884c\uff0c\u5c5e\u4e8e<a href=\\\"https:\/\/github.com\/github\/orchestrator\/blob\/master\/docs\/configuration-recovery.md#hooks\\\" target=\\\"_blank\\\" rel=\\\"noopener noreferrer\\\">Hooks<\/a>\u3002<\/li>\n<li>PostFailoverProcesses<br \/>\n\u5728\u6210\u529f\u6062\u590d\u7ed3\u675f\u65f6\u6267\u884c\uff0c\u5c5e\u4e8e<a href=\\\"https:\/\/github.com\/github\/orchestrator\/blob\/master\/docs\/configuration-recovery.md#hooks\\\" target=\\\"_blank\\\" rel=\\\"noopener noreferrer\\\">Hooks<\/a>\u3002<\/li>\n<li>PostUnsuccessfulFailoverProcesses<br \/>\n\u5728\u4efb\u4f55\u4e0d\u6210\u529f\u7684\u6062\u590d\u7ed3\u675f\u65f6\u6267\u884c\uff0c\u5c5e\u4e8e<a href=\\\"https:\/\/github.com\/github\/orchestrator\/blob\/master\/docs\/configuration-recovery.md#hooks\\\" target=\\\"_blank\\\" rel=\\\"noopener noreferrer\\\">Hooks<\/a>\u3002<\/li>\n<li>PostIntermediateMasterFailoverProcesses<br \/>\n\u5728\u6210\u529f\u7684\u4e2d\u95f4\u4e3b\u6062\u590d\u7ed3\u675f\u65f6\u6267\u884c\uff0c\u5c5e\u4e8e<a href=\\\"https:\/\/github.com\/github\/orchestrator\/blob\/master\/docs\/configuration-recovery.md#hooks\\\" target=\\\"_blank\\\" rel=\\\"noopener noreferrer\\\">Hooks<\/a>\u3002<\/li>\n<li>PostGracefulTakeoverProcesses<br \/>\n\u5728\u65e7\u4e3b\u4f4d\u4e8e\u65b0\u664b\u5347\u7684\u4e3b\u4e4b\u540e\u6267\u884c\uff0c\u5c5e\u4e8e<a href=\\\"https:\/\/github.com\/github\/orchestrator\/blob\/master\/docs\/configuration-recovery.md#hooks\\\" target=\\\"_blank\\\" rel=\\\"noopener noreferrer\\\">Hooks<\/a>\u3002<\/li>\n<li>CoMasterRecoveryMustPromoteOtherCoMaster<br \/>\n\u5f53\\&#8217;false\\&#8217;\u65f6\uff0c\u4efb\u4f55\u5b9e\u4f8b\u90fd\u53ef\u4ee5\u5f97\u5230\u63d0\u5347\uff1b \u5f53\\&#8217;true\\&#8217;\u65f6\uff0c\u5c06\u63d0\u5347\u5171\u540c\u4e3b\u4eba\u5426\u5219\u5931\u8d25\u3002<\/li>\n<li>ApplyMySQLPromotionAfterMasterFailover<br \/>\n\u5c06\u91cd\u7f6eslave all\u5e76\u5728\u63d0\u5347\u7684master\u4e0a\u8bbe\u7f6eread_only = 0\uff0c\u9ed8\u8ba4true<\/li>\n<li>PreventCrossDataCenterMasterFailover<br \/>\n\u5982\u679c\u4e3atrue\uff08\u9ed8\u8ba4\u503c\uff1afalse\uff09\uff0c\u5219\u4e0d\u5141\u8bb8\u8de8DC\u4e3b\u6545\u969c\u8f6c\u79fb\uff0corchestrator\u5c06\u5c3d\u5176\u6240\u80fd\u4ec5\u5728\u540c\u4e00DC\u5185\u8fdb\u884c\u6545\u969c\u8f6c\u79fb\uff0c\u5426\u5219\u4e0d\u8fdb\u884c\u6545\u969c\u8f6c\u79fb\u3002<\/li>\n<li>MasterFailoverDetachReplicaMasterHost\uff08MasterFailoverDetachSlaveMasterHost\uff09<br \/>\n\u5426\u5e94\u8be5\u5728\u65b0\u5347\u7ea7\u7684master\u4e0a\u53d1\u51fadetach-replica-master-host\uff0c\u8fd9\u6837\u53ef\u4ee5\u786e\u4fdd\u65b0master\u4e0d\u4f1a\u5c1d\u8bd5\u590d\u5236\u6b63\u5e38\u4e4b\u540e\u7684\u65e7\u7684master\u3002\u5982\u679c\u53c2\u6570ApplyMySQLPromotionAfterMasterFailover\u4e3aTrue\uff0c\u5219\u8be5\u53c2\u6570\u65e0\u610f\u4e49\u3002<\/li>\n<li>MasterFailoverLostInstancesDowntimeMinutes<br \/>\n\u4e3b\u6545\u969c\u8f6c\u79fb\u540e\u4e22\u5931\u7684\u4efb\u4f55\u670d\u52a1\u5668\u505c\u673a\u7684\u5206\u949f\u6570\uff08\u5305\u62ec\u5931\u8d25\u7684\u4e3b\u548c\u4e22\u5931\u7684\u4ece\uff09\u3002 0\u8868\u793a\u7981\u7528\u3002<\/li>\n<li>PostponeReplicaRecoveryOnLagMinutes\uff08PostponeSlaveRecoveryOnLagMinutes\uff09<br \/>\n\u5728\u5d29\u6e83\u6062\u590d\u65f6\uff0c\u5ef6\u8fdf\u8d85\u8fc7\u7ed9\u5b9a\u5206\u949f\u7684\u4ece\u5e93\u5728\u4e3b\u88ab\u9009\u51fa\u540e\u624d\u590d\u6d3b\u3002 \u503c\u4e3a0\u5c06\u7981\u7528\u6b64\u529f\u80fd\u3002<\/li>\n<li>BackendDB<br \/>\n\u540e\u7aef\u6570\u636e\u5e93\u7c7b\u578b\u3002<\/li>\n<li><a href=\\\"https:\/\/github.com\/github\/orchestrator\/blob\/master\/docs\/configuration-raft.md\\\" target=\\\"_blank\\\" rel=\\\"noopener noreferrer\\\">RaftEnabled<\/a><br \/>\n\u662f\u5426\u5f00\u542fRaft\uff0c\u4fdd\u8bc1orch\u7684\u9ad8\u53ef\u7528\u3002<\/li>\n<li><a href=\\\"https:\/\/github.com\/github\/orchestrator\/blob\/master\/docs\/configuration-raft.md\\\" target=\\\"_blank\\\" rel=\\\"noopener noreferrer\\\">RaftDataDir<\/a><br \/>\nRaft\u7684\u6570\u636e\u76ee\u5f55\u3002<\/li>\n<li><a href=\\\"https:\/\/github.com\/github\/orchestrator\/blob\/master\/docs\/configuration-raft.md\\\" target=\\\"_blank\\\" rel=\\\"noopener noreferrer\\\">RaftBind<\/a><br \/>\nRaft \u7684 bind\u5730\u5740\u3002<\/li>\n<li><a href=\\\"https:\/\/github.com\/github\/orchestrator\/blob\/master\/docs\/configuration-raft.md\\\" target=\\\"_blank\\\" rel=\\\"noopener noreferrer\\\">DefaultRaftPort<\/a><br \/>\nRaft\u7684\u7aef\u53e3\u3002<\/li>\n<li><a href=\\\"https:\/\/github.com\/github\/orchestrator\/blob\/master\/docs\/configuration-raft.md\\\" target=\\\"_blank\\\" rel=\\\"noopener noreferrer\\\">RaftNodes<\/a><br \/>\nRaft\u7684\u8282\u70b9\u3002<\/li>\n<li><a href=\\\"https:\/\/github.com\/github\/orchestrator\/blob\/master\/docs\/configuration-kv.md\\\" target=\\\"_blank\\\" rel=\\\"noopener noreferrer\\\">ConsulAddress<br \/>\n<\/a>Consul\u7684\u5730\u5740\u3002<\/li>\n<li><a href=\\\"https:\/\/github.com\/github\/orchestrator\/blob\/master\/docs\/configuration-kv.md\\\" target=\\\"_blank\\\" rel=\\\"noopener noreferrer\\\">ConsulAclToken<br \/>\n<\/a>Consul\u7684token\u3002<\/li>\n<\/ul>\n<h2>\u8fd0\u884c\u90e8\u7f72<\/h2>\n<h3>\u00a0\u73af\u5883\uff1a<\/h3>\n<p>\u5728\u4e09\u53f0\u6d4b\u8bd5\u673a\u4e0a\u5404\u81ea\u5b89\u88c5MySQL2\u4e2a\u5b9e\u4f8b\uff1aorch\u7528\u7684\u540e\u7aefMySQL\uff083306\uff09\u548c\u88aborch\u7ba1\u7406\u7684MySQL\uff083307\uff09\u3002\u6309\u7167\u7ed9\u51fa\u7684\u914d\u7f6e\u6a21\u677f\uff0c\u9996\u5148\u5728\u540e\u7aef\u6570\u636e\u5e93\u7684\u5b9e\u4f8b\u4e0a\u521b\u5efa\u8d26\u53f7\uff1a<\/p>\n<div>\n<pre>CREATE USER \\'orchestrator\\'@\\'127.0.0.1\\' IDENTIFIED BY \\'123456\\';\nGRANT ALL ON orchestrator.* TO \\'orchestrator\\'@\\'127.0.0.1\\';<\/pre>\n<\/div>\n<p>\u518d\u5728\u88ab\u7ba1\u7406\u7684MySQL\uff083307\uff09\u5b9e\u4f8b\u4e0a\u00a0\u521b\u5efa\u8d26\u53f7\uff1a<\/p>\n<div>\n<pre>CREATE USER \\'orchestrator\\'@\\'%\\' IDENTIFIED BY \\'Aa123456\\';\nGRANT SUPER, PROCESS, REPLICATION SLAVE, RELOAD ON *.* TO \\'orchestrator\\'@\\'%\\';\nGRANT SELECT ON mysql.slave_master_info TO \\'orchestrator\\'@\\'%\\';\nGRANT SELECT ON meta.* TO \\'orchestrator\\'@\\'orc_host\\';<\/pre>\n<\/div>\n<p>\u5176\u4e2d<a href=\\\"https:\/\/github.com\/github\/orchestrator\/blob\/622e979722bf433232ae267727933ba055cdbfed\/resources\/pseudo-gtid\/pseudo-gtid.sql\\\" target=\\\"_blank\\\" rel=\\\"noopener noreferrer\\\">meta<\/a>\u5e93\u7684\u4f5c\u7528\u662f\u81ea\u5df1\u7684query\u6240\u7528\u5230\u7684\uff0c\u5982\uff1a<a href=\\\"https:\/\/github.com\/github\/orchestrator\/blob\/622e979722bf433232ae267727933ba055cdbfed\/docs\/configuration-discovery-classifying.md\\\" target=\\\"_blank\\\" rel=\\\"noopener noreferrer\\\">cluster<\/a>\u3001<a href=\\\"https:\/\/github.com\/github\/orchestrator\/blob\/622e979722bf433232ae267727933ba055cdbfed\/resources\/pseudo-gtid\/pseudo-gtid.sql\\\" target=\\\"_blank\\\" rel=\\\"noopener noreferrer\\\">pseudo_gtid_status<\/a>\u7b49\uff0c\u540e\u9762\u4f1a\u6709\u76f8\u5173\u8bf4\u660e\u3002<br \/>\n\u5230\u6b64\uff0c\u5173\u4e8eorch\u7684\u73af\u5883\u5df2\u7ecf\u51c6\u5907\u5b8c\u6bd5\uff0c\u6700\u540e\u53ea\u9700\u8981\u628a\u88ab\u7ba1\u7406\u76843\u53f0MySQL\u90e8\u7f72\u6210\u4e00\u4e3b\u4e8c\u4ece\u5373\u53ef\uff08rep\uff09:<\/p>\n<div>\n<pre>Master\uff1a192.168.163.131:3307\nSlave  \uff1a192.168.163.132:3307\nSlave  \uff1a192.168.163.133:3307<\/pre>\n<\/div>\n<p>\u6700\u540e\uff0c\u56e0\u4e3a\u914d\u7f6e\u6587\u4ef6\u91cc\u5199\u7684\u662f\u57df\u540d(hostname)\uff0c\u6240\u4ee5\u9700\u8981\u4fee\u6539\u4e09\u53f0\u88ab\u7ba1\u7406MySQL\u7684hosts\u3002\u5373\uff1a<\/p>\n<div>\n<pre>192.168.163.131 test1\n192.168.163.132 test2\n192.168.163.133 test3<\/pre>\n<\/div>\n<h3>\u5b89\u88c5\uff1a<\/h3>\n<p>1.\u00a0<a href=\\\"https:\/\/github.com\/github\/orchestrator\/blob\/master\/docs\/execution.md\\\" target=\\\"_blank\\\" rel=\\\"noopener noreferrer\\\">\u5f00\u542forchestrator<\/a><\/p>\n<div>\n<pre>.\/orchestrator --debug --config=\/etc\/orchestrator.conf.json http<\/pre>\n<\/div>\n<p>2.\u00a0\u628a\u914d\u7f6e\u597d\u7684\u590d\u5236\u5b9e\u4f8b\u52a0\u5165\u5230orchestrator\uff0c\u56e0\u4e3aorch\u53ef\u4ee5\u81ea\u52a8\u53d1\u73b0\u6574\u4e2a\u62d3\u6251\u7684\u6240\u6709\u5b9e\u4f8b\uff0c\u6240\u4ee5\u53ea\u9700\u8981\u6dfb\u52a0\u4efb\u610f\u4e00\u53f0\u5b9e\u4f8b\u5373\u53ef\uff0c\u5982\u679c\u6ca1\u6709\u53d1\u73b0\u7684\u8bdd\u53ef\u4ee5\u518d\u6dfb\u52a0\u3002<br \/>\n\u5728web\u4e0a\u6dfb\u52a0\uff08\u5bfc\u822a\u91cc\u7684Clusters -&gt; Discover\uff09\uff1a<br \/>\n<img src=\\\"https:\/\/img2018.cnblogs.com\/blog\/163084\/201902\/163084-20190218104614096-762182805.png\\\" alt=\\\"\\\" width=\\\"677\\\" height=\\\"197\\\" \/><br \/>\n\u6dfb\u52a0\u5b8c\u6210\u4e4b\u540e\uff0c\u6700\u7ec8\u7684\u7ed3\u6784\u56fe\u5982\u4e0b\uff1a<br \/>\n<img src=\\\"https:\/\/img2018.cnblogs.com\/blog\/163084\/201902\/163084-20190218105045870-72472962.png\\\" alt=\\\"\\\" width=\\\"679\\\" height=\\\"266\\\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u80cc\u666f \u5728MySQL\u9ad8\u53ef\u7528\u67b6\u6784\u4e2d\uff0c\u76ee\u524d\u4f7f\u7528\u6bd4\u8f83\u591a\u7684\u662fPercona\u7684PXC\uff0cGalera\u4ee5\u53caMySQL 5.7\u4e4b &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"http:\/\/www.weijing.co\/?p=1841\"> <span class=\"screen-reader-text\">MySQL\u9ad8\u53ef\u7528\u590d\u5236\u7ba1\u7406\u5de5\u5177 \u2014\u2014 Orchestrator\u4ecb\u7ecd<\/span> \u67e5\u770b\u5168\u6587 &raquo;<\/a><\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"default","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"default","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":""},"categories":[90,88],"tags":[],"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false,"mailpoet_newsletter_max":false,"woocommerce_thumbnail":false,"woocommerce_single":false,"woocommerce_gallery_thumbnail":false,"shop_catalog":false,"shop_single":false,"shop_thumbnail":false},"uagb_author_info":{"display_name":"weijing","author_link":"http:\/\/www.weijing.co\/?author=4"},"uagb_comment_info":0,"uagb_excerpt":"\u80cc\u666f \u5728MySQL\u9ad8\u53ef\u7528\u67b6\u6784\u4e2d\uff0c\u76ee\u524d\u4f7f\u7528\u6bd4\u8f83\u591a\u7684\u662fPercona\u7684PXC\uff0cGalera\u4ee5\u53caMySQL 5.7\u4e4b&hellip;","_links":{"self":[{"href":"http:\/\/www.weijing.co\/index.php?rest_route=\/wp\/v2\/posts\/1841"}],"collection":[{"href":"http:\/\/www.weijing.co\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.weijing.co\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.weijing.co\/index.php?rest_route=\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"http:\/\/www.weijing.co\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1841"}],"version-history":[{"count":0,"href":"http:\/\/www.weijing.co\/index.php?rest_route=\/wp\/v2\/posts\/1841\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.weijing.co\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1841"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.weijing.co\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1841"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.weijing.co\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1841"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}