{"id":2668,"date":"2023-02-21T15:25:41","date_gmt":"2023-02-21T07:25:41","guid":{"rendered":"https:\/\/nj.transwarp.cn:8180\/?p=2668"},"modified":"2023-02-21T15:25:40","modified_gmt":"2023-02-21T07:25:40","slug":"txsql%e7%9b%b8%e5%85%b3%e6%bc%8f%e6%b4%9e%e5%8d%87%e7%ba%a7mysql%e8%87%b35-6-43-84-3%e7%89%88%e6%9c%ac","status":"publish","type":"post","link":"https:\/\/kbwp.transwarp.cn\/?p=2668","title":{"rendered":"txsql\u76f8\u5173\u6f0f\u6d1e\u5347\u7ea7mysql\u81f35.6.43-84.3\u7248\u672c"},"content":{"rendered":"<h3>\u6982\u8981\u63cf\u8ff0<\/h3>\n<hr \/>\n<p>\u5ba2\u6237\u73af\u5883\u6f0f\u626b\uff0c\u5728txsql\u6240\u5728\u8282\u70b9\u626b\u63cf\u51fa\u5927\u91cfmysql\u76f8\u5173\u6f0f\u6d1e\u3002<br \/>\n\u8fdb\u5165txsql\u7684pod\uff0c\u901a\u8fc7 <strong><code>mysql -V<\/code><\/strong> \u547d\u4ee4\u67e5\u770b\u5f53\u524dmysql\u7684\u7248\u672c\u53f7\uff0c\u5982\u679cTDH\u7248\u672c\u662f6.2.0\u4e4b\u524d\u7684\uff0c\u7248\u672c\u53f7\u5e94\u8be5\u90fd\u662f <strong>mysql-5.6.31-77.0<\/strong>\uff0c\u6b64\u65f6\u9700\u8981\u5c06mysql\u7248\u672c\u5347\u5230 <strong>mysql-5.6.43-84.3<\/strong>\uff0c\u6765\u4fee\u590d\u76f8\u5173\u6f0f\u6d1e\u3002<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2020\/03\/image-1585012035305.png\" alt=\"file\" \/><\/p>\n<h3>\u8be6\u7ec6\u8bf4\u660e<\/h3>\n<hr \/>\n<h4>\u5907\u4efd\u7528\u6237\u6570\u636e<\/h4>\n<p><strong>\u6ce8\u610f\uff1a<\/strong>\u5907\u4efd\u7528\u6237\u6570\u636e\u65f6\uff0c\u91c7\u7528 <strong><code>\u9010\u4e2a\u6570\u636e\u5e93\u5907\u4efd<\/code><\/strong> \u7684\u65b9\u5f0f\u6765\u5907\u4efd\uff0c\u5982\u679c\u91c7\u7528\u5168\u91cf\u5907\u4efd\uff0c\u7531\u4e8e\u4e0d\u540c\u7248\u672c\u7684MySQL\u7684\u6743\u9650\u7ba1\u7406\uff0c\u56e0\u6b64MySQL\u7248\u672c\u4e0d\u540c\u65f6\uff0c\u5168\u91cf\u5907\u4efd\u65b9\u6cd5\u53ef\u80fd\u4f1a\u5f15\u8d77\u4e25\u91cd\u7684\u6570\u636e\u635f\u574f\u3002<\/p>\n<ol>\n<li>\n<p>\u8fdb\u5165txsql\u4efb\u4e00pod<\/p>\n<\/li>\n<li>\n<p>\u67e5\u770btxsql\u7684master\u8282\u70b9\uff0c\u53ef\u77e5txsql\u7684master\u8282\u70b9\u662f172.22.17.1\u8282\u70b9<\/p>\n<pre><code class=\"language-shell\">[root@tdh524-01 \/]# \/usr\/bin\/txsql\/tools\/txsql.sh list\nget master 172.22.17.1 expire time 1585013661 Tue Mar 24 09:34:21 2020\nip 172.22.17.1 port 17000\nip 172.22.17.2 port 17000\nip 172.22.17.3 port 17000<\/code><\/pre>\n<\/li>\n<li>\n<p>\u5728\u6587\u4ef6 <strong>\/etc\/txsql1\/conf\/db.properties<\/strong> \u7684\u53d8\u91cf <strong>db.password<\/strong> \u67e5\u770b\u767b\u5f55txsql\u7684\u5bc6\u7801\uff0c\u53ef\u77e5\u5bc6\u7801\u662f 207898110<br \/>\n<img decoding=\"async\" src=\"\/wp-content\/uploads\/2020\/03\/image-1585013484409.png\" alt=\"file\" \/><\/p>\n<\/li>\n<li>\n<p>\u8fdb\u5165txsql\u6570\u636e\u5e93 <strong>\/usr\/bin\/txsql\/tools\/txsql.sh shell<\/strong>\uff0c\u786e\u8ba4\u9700\u8981\u5907\u4efd\u7684\u6570\u636e\u5e93\uff0c\u5176\u4e2d\u9ed8\u8ba4\u7684information_schema\u3001mysql\u3001performance_schema\u3001test\u5e93\u4e0d\u9700\u8981\u5907\u4efd\u3002<br \/>\n<img decoding=\"async\" src=\"\/wp-content\/uploads\/2020\/03\/image-1585013602598.png\" alt=\"file\" \/><\/p>\n<\/li>\n<li>\n<p>\u8fdb\u5165\u6301\u4e45\u5316\u8def\u5f84 <strong>\/var\/log\/txsql1\/<\/strong> \u5907\u4efd\u7528\u6237\u6570\u636e\uff0c\u5907\u4efd\u5b8c\u4e4b\u540e\u9000\u51fapod\uff0c\u786e\u8ba4\u5907\u4efd\u6587\u4ef6\u5df2\u7ecf\u5b58\u5728\u4e8e\u5bbf\u4e3b\u673a\u5bf9\u5e94\u8def\u5f84\u4e0b\u3002<\/p>\n<pre><code class=\"language-shell\">\/usr\/bin\/txsql\/percona.src\/bin\/mysqldump -h172.22.17.1 -P3316 -uroot -p207898110 --set-gtid-purged=off --triggers --routines  --databases workflow_workflow1 > workflow.sql<\/code><\/pre>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2020\/03\/image-1585013812827.png\" alt=\"file\" \/><\/p>\n<\/li>\n<\/ol>\n<h4>\u51c6\u5907\u5347\u7ea7\u955c\u50cf<\/h4>\n<ol>\n<li>\u67e5\u770b\u81ea\u5df1\u672c\u5730\u73af\u5883txsql\u955c\u50cf<br \/>\n\u901a\u8fc7 <strong>docker images | grep txsql<\/strong> \u547d\u4ee4\u67e5\u770b\u5f53\u524d\u73af\u5883\u955c\u50cf\uff1a<br \/>\n<img decoding=\"async\" src=\"\/wp-content\/uploads\/2020\/03\/image-1585014055076.png\" alt=\"file\" \/><\/li>\n<li>\u62c9\u53d6\u5347\u7ea7\u955c\u50cf\u5230\u672c\u5730\u73af\u5883\n<pre><code class=\"language-shell\">docker pull 172.16.1.41:5000\/postcommit\/txsql:master-mysql5.6.43<\/code><\/pre>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2020\/03\/image-1585014134344.png\" alt=\"file\" \/><\/p>\n<\/li>\n<li>\u5c06\u521a\u62c9\u53d6\u7684\u955c\u50cf\u6253\u5305\u6210tar\u5305\n<pre><code class=\"language-shell\">docker save 172.16.1.41:5000\/postcommit\/txsql:master-mysql5.6.43 > txsql-5-6-43.tar<\/code><\/pre>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2020\/03\/image-1585014317730.png\" alt=\"file\" \/><\/p>\n<\/li>\n<li>\u5c06\u6253\u5305\u7684tar\u5305\u4e0a\u4f20\u5230\u9700\u8981\u5347\u7ea7\u7684txsql\u8282\u70b9\uff0c\u52a0\u8f7d\u955c\u50cf\n<pre><code class=\"language-shell\">docker load < txsql-5-6-43.tar<\/code><\/pre>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2020\/03\/image-1585014393545.png\" alt=\"file\" \/><\/p>\n<\/li>\n<\/ol>\n<h4>\u5347\u7ea7\u8282\u70b9\u5347\u7ea7mysql\u670d\u52a1<\/h4>\n<ol>\n<li>\u5907\u4efd\u4e4b\u524d\u7684txsql\u955c\u50cf\uff0c\u5e76\u4fee\u6539\u5347\u7ea7\u955c\u50cf\u7684tag\n<pre><code class=\"language-shell\">docker tag tdh524-01:5000\/transwarp\/txsql:transwarp-5.2.4-final tdh524-01:5000\/transwarp\/txsql:transwarp-5.2.4-final-5.4.36\ndocker tag 172.16.1.41:5000\/postcommit\/txsql:master-mysql5.6.43 tdh524-01:5000\/transwarp\/txsql:transwarp-5.2.4-final<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/nj.transwarp.cn:8180\/wp-content\/uploads\/2020\/03\/image-1585014502318.png\" alt=\"file\" \/><\/p>\n<\/li>\n<li>\u5c06\u955c\u50cfpush\u5230\u4ed3\u5e93\n<pre><code class=\"language-shell\">docker push tdh524-01:5000\/transwarp\/txsql:transwarp-5.2.4-final<\/code><\/pre>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2020\/03\/image-1585014533670.png\" alt=\"file\" \/><\/p>\n<\/li>\n<li>manager\u9875\u9762\u91cd\u542ftxsql\u670d\u52a1<br \/>\n<img decoding=\"async\" src=\"\/wp-content\/uploads\/2020\/03\/image-1585014802049.png\" alt=\"file\" \/><\/li>\n<li>\u8fdb\u5165\u91cd\u542f\u540e\u7684txsql\u7684pod\uff0c\u67e5\u770bmysql\u7248\u672c\u53f7\uff0c\u5df2\u7ecf\u5347\u7ea7\u81f3 mysql-5.6.43-84.3 \u7248\u672c<br \/>\n<img decoding=\"async\" src=\"\/wp-content\/uploads\/2020\/03\/image-1585014924604.png\" alt=\"file\" \/><\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>\u6982\u8981\u63cf\u8ff0 \u5ba2\u6237\u73af\u5883\u6f0f\u626b\uff0c\u5728txsql\u6240\u5728\u8282\u70b9\u626b\u63cf\u51fa\u5927\u91cfmysql\u76f8\u5173\u6f0f\u6d1e\u3002 \u8fdb\u5165txsql\u7684pod\uff0c\u901a\u8fc7 my ..<\/p>\n<div class=\"clear-fix\"><\/div>\n<p><a href=\"https:\/\/kbwp.transwarp.cn\/?p=2668\" title=\"read more...\">Read more<\/a><\/p>\n","protected":false},"author":14,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[122],"tags":[],"class_list":["post-2668","post","type-post","status-publish","format-standard","hentry","category-vulnerabilities_info"],"acf":[],"_links":{"self":[{"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=\/wp\/v2\/posts\/2668","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=\/wp\/v2\/users\/14"}],"replies":[{"embeddable":true,"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2668"}],"version-history":[{"count":2,"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=\/wp\/v2\/posts\/2668\/revisions"}],"predecessor-version":[{"id":9700,"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=\/wp\/v2\/posts\/2668\/revisions\/9700"}],"wp:attachment":[{"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2668"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2668"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2668"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}