{"id":13262,"date":"2025-04-18T20:17:34","date_gmt":"2025-04-18T12:17:34","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/13262.html"},"modified":"2025-04-18T20:17:34","modified_gmt":"2025-04-18T12:17:34","slug":"linux-%e9%85%8d%e7%bd%ae-mysql-%e5%ae%9a%e6%97%b6%e8%87%aa%e5%8a%a8%e5%a4%87%e4%bb%bd%e5%88%b0%e5%8f%a6%e4%b8%80%e5%8f%b0%e6%9c%8d%e5%8a%a1%e5%99%a8","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/13262.html","title":{"rendered":"Linux \u914d\u7f6e MySQL \u5b9a\u65f6\u81ea\u52a8\u5907\u4efd\u5230\u53e6\u4e00\u53f0\u670d\u52a1\u5668"},"content":{"rendered":"<\/p>\n<h4>Linux \u914d\u7f6e MySQL \u5b9a\u65f6\u81ea\u52a8\u5907\u4efd\u5230\u53e6\u4e00\u53f0\u670d\u52a1\u5668<\/h4>\n<ul>\n<li>\u524d\u8a00<\/li>\n<li>1\u3001\u914d\u7f6e\u670d\u52a1\u5668\u901a\u4fe1<\/li>\n<li>\n<ul>\n<li>1.1&#xff1a;\u914d\u7f6e\u8fc7\u7a0b<\/li>\n<\/ul>\n<\/li>\n<li>2\u3001\u7f16\u5199\u81ea\u52a8\u5907\u4efdsh\u811a\u672c\u6587\u4ef6<\/li>\n<li>3&#xff1a;\u8bbe\u7f6e\u5b9a\u65f6\u81ea\u52a8\u6267\u884c<\/li>\n<\/ul>\n<h2>\u524d\u8a00<\/h2>\n<p>\u6b64\u65b9\u6848\u53ef\u4f7f\u4e00\u53f0\u670d\u52a1\u5668\u4e0a\u7684 MySQL \u4e2d\u7684\u6240\u6709\u6570\u636e\u5e93\u6bcf\u5929 0 \u70b9\u81ea\u52a8\u8f6c\u50a8\u4e3a .sql \u6587\u4ef6&#xff0c;\u7136\u540e\u5c06\u6587\u4ef6\u540c\u6b65\u5230\u53e6\u4e00\u53f0\u670d\u52a1\u5668\u4e0a&#xff0c;\u53ef\u4ee5\u4f5c\u4e3a\u4e00\u4e2a\u7b80\u5355\u7684\u6570\u636e\u5bb9\u707e\u3002<\/p>\n<h2>1\u3001\u914d\u7f6e\u670d\u52a1\u5668\u901a\u4fe1<\/h2>\n<p>\u4f5c\u7528\u662f\u53ef\u4ee5\u4f7f\u5907\u4efd\u597d\u7684sql\u53ef\u4ee5\u901a\u8fc7scp\u590d\u5236\u5230\u76ee\u6807\u670d\u52a1\u5668<\/p>\n<ul>\n<li>A\u670d\u52a1\u5668&#xff1a;\u6570\u636e\u5e93\u6240\u5728\u670d\u52a1\u5668<\/li>\n<li>B\u670d\u52a1\u5668&#xff1a;\u9700\u8981\u5907\u4efd\u7684\u670d\u52a1\u5668(\u5373\u76ee\u6807\u670d\u52a1\u5668)<\/li>\n<\/ul>\n<h3>1.1&#xff1a;\u914d\u7f6e\u8fc7\u7a0b<\/h3>\n<ul>\n<li>A\u548cB\u670d\u52a1\u5668\u6267\u884c\u5982\u4e0b\u547d\u4ee4&#xff0c;\u4e00\u76f4\u6572\u56de\u8f66<\/li>\n<\/ul>\n<p>ssh-keygen -t rsa<\/p>\n<ul>\n<li>\u4f1a\u5728\/root\/.ssh\u76ee\u5f55\u4e0b\u751f\u6210\u4e24\u4e2a\u6587\u4ef6(id_rsa,id_rsa.pub) <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418121733-680242dd12e87.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/li>\n<li>\u628aA\u670d\u52a1\u5668\u7684 id_rsa.pub \u91cc\u7684\u5185\u5bb9\u5168\u9009\u590d\u5236\u5230B\u670d\u52a1\u5668\u7684\u76f8\u540c\u76ee\u5f55&#xff0c;\u521b\u5efa\u65b0\u6587\u4ef6authorized_keys&#xff0c;\u628a\u5185\u5bb9\u590d\u5236\u5230\u6b64\u6587\u4ef6<\/li>\n<li>\u521b\u5efa\u65b0\u6587\u4ef6\u547d\u4ee4<\/li>\n<\/ul>\n<p>cd \/root\/.ssh\/<br \/>\nvim authorized_keys<\/p>\n<ul>\n<li>\n<p>B\u670d\u52a1\u5668\u76ee\u5f55\u6587\u4ef6\u5982\u56fe <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418121733-680242dd32735.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<\/li>\n<li>\n<p>A\u670d\u52a1\u5668\u76ee\u5f55\u6587\u4ef6\u5982\u56fe <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418121733-680242dd6a481.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<\/li>\n<li>\n<p>\u8fd9\u6837\u4e24\u53f0\u670d\u52a1\u5668SSH\u94fe\u63a5\u5c31\u5efa\u7acb\u597d\u4e86&#xff0c;\u4f7f\u7528SCP\u547d\u4ee4\u5c31\u4e0d\u9700\u8981\u8f93\u5165\u5bc6\u7801\u4e86<\/p>\n<\/li>\n<li>\n<p>B\u670d\u52a1\u5668\u521b\u5efa\u6587\u4ef6\u5939\u7528\u4e8e\u5b58\u653e\u5907\u4efd\u6587\u4ef6<\/p>\n<\/li>\n<\/ul>\n<p>mkdir -p \/data\/mysqlAutoBackupFrom16<\/p>\n<h2>2\u3001\u7f16\u5199\u81ea\u52a8\u5907\u4efdsh\u811a\u672c\u6587\u4ef6<\/h2>\n<li>A\u670d\u52a1\u5668\u521b\u5efa\u5b58\u653e\u811a\u672c\u6587\u4ef6\u76ee\u5f55\u548c\u5907\u4efd\u76ee\u5f55,\u8fdb\u5165mysqlAutoBackupTo24<\/li>\n<p>mkdir -p \/data\/mysqlAutoBackupTo24\/backup<br \/>\ncd \/data\/mysqlAutoBackupTo24<\/p>\n<li>\u521b\u5efa\u811a\u672c\u6587\u4ef6<\/li>\n<p>vim AutoBackup.sh<\/p>\n<li>\u7c98\u8d34AutoBackup.sh \u91cc\u9762\u7684\u5185\u5bb9<\/li>\n<p>#\u4e0b\u9762\u751f\u6210\u7684sql\u5728\u672c\u670d\u52a1\u5668\u5b58\u653e\u7684\u6587\u4ef6\u5939&#xff0c;\u5c31\u662f\u6211\u4e0a\u9762\u5efa\u7acb\u7684<br \/>\nBACKUP&#061;\/data\/mysqlAutoBackupTo24\/backup\/<br \/>\n#\u5f53\u524d\u65f6\u95f4&#xff0c;\u7528\u6765\u547d\u540dsql\u6587\u4ef6<br \/>\nDATETIME&#061;$(date &#043;%Y-%m-%d)<br \/>\necho &#034;&#061;&#061;&#061;\u5907\u4efd\u5f00\u59cb&#061;&#061;&#061;&#034;<br \/>\necho &#034;\u5907\u4efd\u6587\u4ef6\u5b58\u653e\u4e8e${BACKUP}\/$DATABASE-$DATETIME.sql&#034;<br \/>\n#\u751f\u6210sql\u6587\u4ef6&#xff0c;\u547d\u540d<br \/>\nDATABASE&#061;dbBackup<br \/>\necho $DATABASE-$DATETIME<br \/>\n#mysqldump -h localhost -u${DB_USER} -p${DB_PW} &#8211;all-databases &gt; ${BACKUP}\/$DATABASE-$DATETIME.sql<br \/>\nmysqldump -h 192.168.90.16 -uroot -pWuyuanDev001 &#8211;databases xxl_job xxl_job_hf_test &gt; ${BACKUP}\/$DATABASE-$DATETIME.sql<br \/>\necho &#034;&#061;&#061;&#061;\u5bfc\u51fa\u6210\u529f&#xff0c;\u5f00\u59cb\u4f20\u8f93&#061;&#061;&#061;&#034;<br \/>\n#\u5c06sql\u6587\u4ef6\u4ece\u670d\u52a1\u566816\u5907\u4efd\u5230\u670d\u52a1\u566824\u81ea\u5df1\u5efa\u7acb\u7684\u6587\u4ef6\u5939\/data\/mysqlAutoBackupFrom16\u4e0b\u9762<br \/>\nscp -P 22 $BACKUP$DATABASE-$DATETIME.sql root&#064;192.168.90.24:\/data\/mysqlAutoBackupFrom16<br \/>\n#\u5220\u9664\u5907\u4efd\u76ee\u5f55<br \/>\n#rm -rf ${BACKUP}\/$DATETIME<br \/>\n#\u5220\u96647\u5929\u524d\u5907\u4efd\u7684\u6570\u636e&#xff0c;\u81ea\u884c\u66f4\u6539<br \/>\n#find $BACKUP -mtime &#043;7 -name &#034;*.sql&#034; -exec rm -rf {} \\\\;<br \/>\necho &#034;&#061;&#061;&#061;\u6570\u636e\u5e93\u5907\u4efd\u5230\u670d\u52a1\u5668\u6210\u529f&#061;&#061;&#061;&#034;<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418121733-680242dd927b3.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> 4. \u6587\u4ef6\u5173\u952e\u4ee3\u7801\u89e3\u91ca mysqldump \u7684 -h \u540e\u9762\u5199\u5f53\u524d\u670d\u52a1\u5668\u7684 IP&#xff0c;\u4e5f\u5c31\u662f192.168.90.16&#xff0c;\u4e0d\u8981\u5199 localhost&#xff0c;\u56e0\u4e3a\u5982\u679c\u662f\u79bb\u7ebf\u5b89\u88c5\u7684 mysql \u53ef\u80fd\u6ca1\u6709 mysqld.socket &#xff0c;\u5bfc\u81f4\u8fde\u63a5\u5931\u8d25\u3002<\/p>\n<p>&#8211;databases xxl_job xxl_job_hf_test \u7684\u610f\u601d\u662f\u6307\u5b9a\u5907\u4efd xxl_job \u548c xxl_job_hf_test \u8fd9\u4e2a\u4e24\u4e2a\u6570\u636e\u5e93&#xff0c;\u6307\u5b9a\u591a\u4e2a\u6570\u636e\u5e93\u8981\u52a0 &#8211;databases &#xff0c;\u6570\u636e\u5e93\u7528\u7a7a\u683c\u9694\u5f00&#xff0c;\u4e0a\u9762\u4e00\u53e5\u6ce8\u91ca\u6389\u7684\u662f &#8211;all-databases &#xff0c;\u610f\u601d\u662f\u5907\u4efd\u5168\u90e8\u6570\u636e\u5e93\u3002<\/p>\n<p>scp -P 22 \u662f\u6307\u5b9a ssh \u7aef\u53e3&#xff0c;\u4e0d\u6307\u5b9a\u9ed8\u8ba4\u4e3a 22&#xff0c;root \u662f\u76ee\u6807\u670d\u52a1\u5668192.168.90.24 \u7684\u7528\u6237\u540d<\/p>\n<p>\u4e0b\u9762\u6211\u4eec\u8fd0\u884c\u4e00\u4e0b\u8fd9\u4e2a sh \u770b\u770b\u6548\u679c&#xff0c;cd \u5230\u4f60\u7684 sh \u5b58\u653e\u7684\u6587\u4ef6\u5939 sh AutoBackup.sh&#xff0c;\u9996\u6b21\u8fdb\u884c ssh \u8fde\u63a5\u8981\u8f93\u5165\u4e00\u4e2a yes \u56de\u8f66&#xff0c;\u7136\u540e\u53bb\u76ee\u6807\u670d\u52a1\u5668 24 \u67e5\u770b&#xff0c;sql \u6587\u4ef6\u5df2\u7ecf\u540c\u6b65\u8fc7\u53bb\u3002<\/p>\n<li>\u6267\u884c\u6d4b\u8bd5 <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418121733-680242ddb4f35.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/li>\n<li>\u6210\u529f\u622a\u56fe <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418121733-680242ddcadcf.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/li>\n<h2>3&#xff1a;\u8bbe\u7f6e\u5b9a\u65f6\u81ea\u52a8\u6267\u884c<\/h2>\n<li>\u4e0a\u9762\u7684\u6d4b\u8bd5\u6ca1\u6709\u95ee\u9898&#xff0c;\u4e0b\u9762\u6211\u4eec\u8bbe\u5b9a\u4e00\u4e2a\u6bcf\u5929 0 \u70b9\u81ea\u52a8\u6267\u884c sh \u811a\u672c&#xff0c;\u5c31\u53ef\u4ee5\u5931\u6548\u6bcf\u5929\u7684\u81ea\u52a8\u540c\u6b65\u3002\u9996\u5148\u8d4b\u4e88\u8981\u6267\u884c\u7684 shell \u811a\u672c\u6743\u9650&#xff0c;\u7ed9\u9ad8\u4e00\u70b9&#xff0c;\u4e0d\u7136\u6ca1\u6cd5\u81ea\u52a8\u6267\u884c<\/li>\n<p>chmod 777 \/data\/mysqlAutoBackupTo24\/AutoBackup.sh<\/p>\n<li>\u8f93\u5165\u4e0b\u9762\u8bed\u53e5&#xff0c;vim \u4f1a\u6253\u5f00\u4e00\u4e2a\u6587\u4ef6<\/li>\n<p>crontab -e<\/p>\n<li>\u91cc\u9762\u8fd9\u6837\u5199&#xff0c;\u4fdd\u5b58&#xff0c;\u524d\u9762\u7684 02 00 * * * \u662f cron \u8868\u8fbe\u5f0f&#xff0c;\u4ee3\u8868\u6bcf\u5929 00:02 \u6267\u884c \/data\/mysqlAutoBackupTo24\/AutoBackup.sh&#xff0c;\u4e4b\u6240\u4ee5\u8bbe\u7f6e 00:02 \u662f\u56e0\u4e3a\u907f\u514d\u670d\u52a1\u5668\u5728 0 \u70b9\u7684\u65f6\u5019\u6709\u5176\u4ed6\u6570\u636e\u540c\u6b65\u4efb\u52a1&#xff0c;\u6240\u4ee5\u665a\u4e00\u70b9\u3002cron \u8868\u8fbe\u5f0f\u7684\u8bed\u6cd5\u4f60\u4eec\u53ef\u4ee5\u5b66\u4e00\u4e0b\u3002<\/li>\n<p>02 00 * * * sh \/data\/mysqlAutoBackupTo24\/AutoBackup.sh<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418121733-680242dddb6fd.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<li>\u4fdd\u9669\u8d77\u89c1\u518d\u5237\u65b0\u4e00\u4e0b\u914d\u7f6e<\/li>\n<p>service crond reload<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.2k\u6b21\uff0c\u70b9\u8d5e21\u6b21\uff0c\u6536\u85cf17\u6b21\u3002\u6b64\u65b9\u6848\u53ef\u4f7f\u4e00\u53f0\u670d\u52a1\u5668\u4e0a\u7684 MySQL \u4e2d\u7684\u6240\u6709\u6570\u636e\u5e93\u6bcf\u5929 0 \u70b9\u81ea\u52a8\u8f6c\u50a8\u4e3a .sql \u6587\u4ef6\uff0c\u7136\u540e\u5c06\u6587\u4ef6\u540c\u6b65\u5230\u53e6\u4e00\u53f0\u670d\u52a1\u5668\u4e0a\uff0c\u53ef\u4ee5\u4f5c\u4e3a\u4e00\u4e2a\u7b80\u5355\u7684\u6570\u636e\u5bb9\u707e\u3002\u4f5c\u7528\u662f\u53ef\u4ee5\u4f7f\u5907\u4efd\u597d\u7684sql\u53ef\u4ee5\u901a\u8fc7scp\u590d\u5236\u5230\u76ee\u6807\u670d\u52a1\u5668\u4f1a\u5728\/root\/.ssh\u76ee\u5f55\u4e0b\u751f\u6210\u4e24\u4e2a\u6587\u4ef6(id_rsa,id_rsa.pub)\u628aA\u670d\u52a1\u5668\u7684 id_rsa.pub \u91cc\u7684\u5185\u5bb9\u5168\u9009\u590d\u5236\u5230B\u670d\u52a1\u5668\u7684\u76f8\u540c\u76ee\u5f55\uff0c\u521b\u5efa\u65b0\u6587\u4ef6authorized_keys\uff0c\u628a\u5185\u5bb9\u590d\u5236\u5230\u6b64\u6587\u4ef6\u521b\u5efa\u65b0\u6587\u4ef6\u547d\u4ee4B\u670d\u52a1\u5668\u76ee\u5f55\u6587\u4ef6\u5982\u56feA\u670d\u52a1\u5668\u76ee\u5f55\u6587\u4ef6\u5982\u56fe\u8fd9\u6837\u4e24\u53f0\u670d\u52a1_mysql \u5907\u4efd\u5230\u53e6\u4e00\u53f0\u670d\u52a1\u5668\u4e0a<\/p>\n","protected":false},"author":2,"featured_media":13255,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[58,114,43],"topic":[],"class_list":["post-13262","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-linux","tag-mysql","tag-43"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Linux \u914d\u7f6e MySQL \u5b9a\u65f6\u81ea\u52a8\u5907\u4efd\u5230\u53e6\u4e00\u53f0\u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/13262.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Linux \u914d\u7f6e MySQL \u5b9a\u65f6\u81ea\u52a8\u5907\u4efd\u5230\u53e6\u4e00\u53f0\u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.2k\u6b21\uff0c\u70b9\u8d5e21\u6b21\uff0c\u6536\u85cf17\u6b21\u3002\u6b64\u65b9\u6848\u53ef\u4f7f\u4e00\u53f0\u670d\u52a1\u5668\u4e0a\u7684 MySQL \u4e2d\u7684\u6240\u6709\u6570\u636e\u5e93\u6bcf\u5929 0 \u70b9\u81ea\u52a8\u8f6c\u50a8\u4e3a .sql \u6587\u4ef6\uff0c\u7136\u540e\u5c06\u6587\u4ef6\u540c\u6b65\u5230\u53e6\u4e00\u53f0\u670d\u52a1\u5668\u4e0a\uff0c\u53ef\u4ee5\u4f5c\u4e3a\u4e00\u4e2a\u7b80\u5355\u7684\u6570\u636e\u5bb9\u707e\u3002\u4f5c\u7528\u662f\u53ef\u4ee5\u4f7f\u5907\u4efd\u597d\u7684sql\u53ef\u4ee5\u901a\u8fc7scp\u590d\u5236\u5230\u76ee\u6807\u670d\u52a1\u5668\u4f1a\u5728\/root\/.ssh\u76ee\u5f55\u4e0b\u751f\u6210\u4e24\u4e2a\u6587\u4ef6(id_rsa,id_rsa.pub)\u628aA\u670d\u52a1\u5668\u7684 id_rsa.pub \u91cc\u7684\u5185\u5bb9\u5168\u9009\u590d\u5236\u5230B\u670d\u52a1\u5668\u7684\u76f8\u540c\u76ee\u5f55\uff0c\u521b\u5efa\u65b0\u6587\u4ef6authorized_keys\uff0c\u628a\u5185\u5bb9\u590d\u5236\u5230\u6b64\u6587\u4ef6\u521b\u5efa\u65b0\u6587\u4ef6\u547d\u4ee4B\u670d\u52a1\u5668\u76ee\u5f55\u6587\u4ef6\u5982\u56feA\u670d\u52a1\u5668\u76ee\u5f55\u6587\u4ef6\u5982\u56fe\u8fd9\u6837\u4e24\u53f0\u670d\u52a1_mysql \u5907\u4efd\u5230\u53e6\u4e00\u53f0\u670d\u52a1\u5668\u4e0a\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/13262.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-04-18T12:17:34+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418121733-680242dd12e87.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/13262.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/13262.html\",\"name\":\"Linux \u914d\u7f6e MySQL \u5b9a\u65f6\u81ea\u52a8\u5907\u4efd\u5230\u53e6\u4e00\u53f0\u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-04-18T12:17:34+00:00\",\"dateModified\":\"2025-04-18T12:17:34+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/13262.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/13262.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/13262.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Linux \u914d\u7f6e MySQL \u5b9a\u65f6\u81ea\u52a8\u5907\u4efd\u5230\u53e6\u4e00\u53f0\u670d\u52a1\u5668\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Linux \u914d\u7f6e MySQL \u5b9a\u65f6\u81ea\u52a8\u5907\u4efd\u5230\u53e6\u4e00\u53f0\u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/13262.html","og_locale":"zh_CN","og_type":"article","og_title":"Linux \u914d\u7f6e MySQL \u5b9a\u65f6\u81ea\u52a8\u5907\u4efd\u5230\u53e6\u4e00\u53f0\u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.2k\u6b21\uff0c\u70b9\u8d5e21\u6b21\uff0c\u6536\u85cf17\u6b21\u3002\u6b64\u65b9\u6848\u53ef\u4f7f\u4e00\u53f0\u670d\u52a1\u5668\u4e0a\u7684 MySQL \u4e2d\u7684\u6240\u6709\u6570\u636e\u5e93\u6bcf\u5929 0 \u70b9\u81ea\u52a8\u8f6c\u50a8\u4e3a .sql \u6587\u4ef6\uff0c\u7136\u540e\u5c06\u6587\u4ef6\u540c\u6b65\u5230\u53e6\u4e00\u53f0\u670d\u52a1\u5668\u4e0a\uff0c\u53ef\u4ee5\u4f5c\u4e3a\u4e00\u4e2a\u7b80\u5355\u7684\u6570\u636e\u5bb9\u707e\u3002\u4f5c\u7528\u662f\u53ef\u4ee5\u4f7f\u5907\u4efd\u597d\u7684sql\u53ef\u4ee5\u901a\u8fc7scp\u590d\u5236\u5230\u76ee\u6807\u670d\u52a1\u5668\u4f1a\u5728\/root\/.ssh\u76ee\u5f55\u4e0b\u751f\u6210\u4e24\u4e2a\u6587\u4ef6(id_rsa,id_rsa.pub)\u628aA\u670d\u52a1\u5668\u7684 id_rsa.pub \u91cc\u7684\u5185\u5bb9\u5168\u9009\u590d\u5236\u5230B\u670d\u52a1\u5668\u7684\u76f8\u540c\u76ee\u5f55\uff0c\u521b\u5efa\u65b0\u6587\u4ef6authorized_keys\uff0c\u628a\u5185\u5bb9\u590d\u5236\u5230\u6b64\u6587\u4ef6\u521b\u5efa\u65b0\u6587\u4ef6\u547d\u4ee4B\u670d\u52a1\u5668\u76ee\u5f55\u6587\u4ef6\u5982\u56feA\u670d\u52a1\u5668\u76ee\u5f55\u6587\u4ef6\u5982\u56fe\u8fd9\u6837\u4e24\u53f0\u670d\u52a1_mysql \u5907\u4efd\u5230\u53e6\u4e00\u53f0\u670d\u52a1\u5668\u4e0a","og_url":"https:\/\/www.wsisp.com\/helps\/13262.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-04-18T12:17:34+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418121733-680242dd12e87.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/13262.html","url":"https:\/\/www.wsisp.com\/helps\/13262.html","name":"Linux \u914d\u7f6e MySQL \u5b9a\u65f6\u81ea\u52a8\u5907\u4efd\u5230\u53e6\u4e00\u53f0\u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-04-18T12:17:34+00:00","dateModified":"2025-04-18T12:17:34+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/13262.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/13262.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/13262.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"Linux \u914d\u7f6e MySQL \u5b9a\u65f6\u81ea\u52a8\u5907\u4efd\u5230\u53e6\u4e00\u53f0\u670d\u52a1\u5668"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/13262","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=13262"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/13262\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/13255"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=13262"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=13262"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=13262"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=13262"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}