{"id":120254,"date":"2026-10-31T09:16:55","date_gmt":"2026-10-31T01:16:55","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/120254.html"},"modified":"2026-10-31T09:16:55","modified_gmt":"2026-10-31T01:16:55","slug":"04_mysql-dba-%e6%97%a5%e5%b8%b8%e8%bf%90%e7%bb%b4%e6%89%8b%e5%86%8c-%e4%bc%9a%e8%af%9d%e7%ae%a1%e7%90%86%e3%80%81%e9%94%81%e4%b8%8e%e9%98%bb%e5%a1%9e%e3%80%81%e4%ba%8b%e5%8a%a1","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/120254.html","title":{"rendered":"04_MySQL DBA \u65e5\u5e38\u8fd0\u7ef4\u624b\u518c \u2014\u2014 \u4f1a\u8bdd\u7ba1\u7406\u3001\u9501\u4e0e\u963b\u585e\u3001\u4e8b\u52a1\u76d1\u63a7\u3001\u6162\u67e5\u8be2\u4e0e\u65e5\u5fd7\u5de1\u68c0"},"content":{"rendered":"<h2>04_MySQL DBA \u65e5\u5e38\u8fd0\u7ef4\u624b\u518c \u2014\u2014 \u4f1a\u8bdd\u7ba1\u7406\u3001\u9501\u4e0e\u963b\u585e\u3001\u4e8b\u52a1\u76d1\u63a7\u3001\u6162\u67e5\u8be2\u4e0e\u65e5\u5fd7\u5de1\u68c0<\/h2>\n<p>\u7cfb\u5217\u5b9a\u4f4d&#xff1a;\u300aMySQL \u6570\u636e\u5e93\u5168\u6808\u8fd0\u7ef4\u5b9e\u6218\u7cfb\u5217\u300b\u7b2c 04 \u7bc7&#xff0c;\u4e0e\u300aOracle \u6570\u636e\u5e93\u5168\u6808\u8fd0\u7ef4\u5b9e\u6218\u7cfb\u5217&#xff08;VMware \u7248&#xff09;\u300b\u540c\u6784\u5bf9\u6807\u3002\u9002\u7528\u7248\u672c&#xff1a;MySQL 8.0&#xff08;5.7 \u5dee\u5f02\u968f\u6587\u6807\u6ce8&#xff09;\u3002\u5b98\u65b9\u6587\u6863&#xff1a;MySQL 8.0 Reference Manual\u3001Server Status Variables \/ InnoDB Locking \/ The Slow Query Log\u3002<\/p>\n<hr \/>\n<h3>\u4e00\u3001\u65e5\u5e38\u8fd0\u7ef4\u5168\u666f&#xff08;DBA \u6bcf\u65e5\u6e05\u5355&#xff09;<\/h3>\n<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/10\/20261031011652-6ae54184c24e6.png\" alt=\"\u56fe 1\" \/><\/p>\n<p>\u56fe 1<\/p>\n<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/10\/20261031011653-6ae5418544cd3.png\" alt=\"\u56fe 2\" \/><\/p>\n<p>\u56fe 2<\/p>\n<\/p>\n<table>\n<tr>\u5217\u8bf4\u660e\u7c7b\u6bd4 Oracle<\/tr>\n<tbody>\n<tr>\n<td>Id<\/td>\n<td>\u8fde\u63a5\u7ebf\u7a0b ID<\/td>\n<td>sid\/serial#<\/td>\n<\/tr>\n<tr>\n<td>User<\/td>\n<td>\u7528\u6237\u540d<\/td>\n<td>username<\/td>\n<\/tr>\n<tr>\n<td>Host<\/td>\n<td>\u5ba2\u6237\u7aef IP:\u7aef\u53e3<\/td>\n<td>machine<\/td>\n<\/tr>\n<tr>\n<td>db<\/td>\n<td>\u5f53\u524d\u6570\u636e\u5e93<\/td>\n<td>schema<\/td>\n<\/tr>\n<tr>\n<td>Command<\/td>\n<td>Sleep\/Query\/Connect \u7b49<\/td>\n<td>status<\/td>\n<\/tr>\n<tr>\n<td>Time<\/td>\n<td>\u5f53\u524d\u72b6\u6001\u6301\u7eed\u79d2\u6570<\/td>\n<td>seconds_in_wait<\/td>\n<\/tr>\n<tr>\n<td>State<\/td>\n<td>\u8be6\u7ec6\u72b6\u6001<\/td>\n<td>event<\/td>\n<\/tr>\n<tr>\n<td>Info<\/td>\n<td>\u6b63\u5728\u6267\u884c\u7684 SQL<\/td>\n<td>sql_text<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>2.2 \u8fde\u63a5\u6570\u76d1\u63a7\u4e0e\u5904\u7406<\/h4>\n<\/p>\n<p>&#8212; \u89e3\u91ca&#xff1a;\u5f53\u524d\u8fde\u63a5\u6570 \/ \u6700\u5927\u8fde\u63a5\u6570<br \/>\nSHOW VARIABLES LIKE &#039;max_connections&#039;;          &#8212; \u4e0a\u9650<br \/>\nSHOW STATUS LIKE &#039;Threads_connected&#039;;            &#8212; \u5f53\u524d\u8fde\u63a5\u6570<br \/>\nSHOW STATUS LIKE &#039;Threads_running&#039;;               &#8212; \u6d3b\u8dc3&#xff08;\u6b63\u5728\u6267\u884c&#xff09;\u7ebf\u7a0b\u6570<\/p>\n<p>&#8212; \u89e3\u91ca&#xff1a;\u6740\u6389\u7a7a\u95f2\u8fde\u63a5&#xff08;Sleep \u72b6\u6001\u8d85\u8fc7 N \u79d2&#xff09;<br \/>\n&#8212; \u6ce8\u610f&#xff1a;KILL \u662f\u5f02\u6b65\u7684&#xff0c;\u4e0d\u4f1a\u7acb\u5373\u7ec8\u6b62<br \/>\nKILL 12345;                                      &#8212; \u89e3\u91ca&#xff1a;\u6309 Id \u6740\u8fde\u63a5<\/p>\n<p>&#8212; \u6279\u91cf\u6740 Sleep \u8fde\u63a5&#xff08;\u751f\u6210 SQL&#xff09;<br \/>\nSELECT CONCAT(&#039;KILL &#039;, id, &#039;;&#039;) AS kill_sql<br \/>\nFROM information_schema.PROCESSLIST<br \/>\nWHERE COMMAND &#061; &#039;Sleep&#039; AND TIME &gt; 600;          &#8212; \u7a7a\u95f2\u8d85\u8fc7 10 \u5206\u949f<\/p>\n<p>\u751f\u4ea7\u5efa\u8bae&#xff1a;- wait_timeout&#061;28800&#xff08;8 \u5c0f\u65f6&#xff0c;\u9ed8\u8ba4&#xff09;\u2192 \u5efa\u8bae\u6539\u4e3a 600&#xff08;10 \u5206\u949f&#xff09;&#xff0c;\u914d\u5408\u5e94\u7528\u4fa7\u8fde\u63a5\u6c60\u3002- \u8fde\u63a5\u6570\u6253\u6ee1\u62a5 ERROR 1040 (08004): Too many connections&#xff1a;\u5148\u67e5\u5e94\u7528\u4fa7\u8fde\u63a5\u6c60\u914d\u7f6e&#xff0c;\u518d\u8003\u8651\u8c03\u5927 max_connections\u3002<\/p>\n<hr \/>\n<h3>\u4e09\u3001\u9501\u4e0e\u963b\u585e\u6392\u67e5&#xff08;\u5b98\u65b9&#xff1a;InnoDB Locking&#xff09;<\/h3>\n<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/10\/20261031011653-6ae5418560c3a.png\" alt=\"\u56fe 3\" \/><\/p>\n<p>\u56fe 3<\/p>\n<\/p>\n<h4>3.1 \u9501\u7c7b\u578b\u4f53\u7cfb<\/h4>\n<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/10\/20261031011653-6ae54185a03e2.png\" alt=\"\u56fe 4\" \/><\/p>\n<p>\u56fe 4<\/p>\n<\/p>\n<table>\n<tr>\u9501\u7c7b\u578b\u8bf4\u660e\u7c7b\u6bd4 Oracle<\/tr>\n<tbody>\n<tr>\n<td>Record Lock<\/td>\n<td>\u9501\u5b9a\u5355\u884c\u8bb0\u5f55<\/td>\n<td>row lock<\/td>\n<\/tr>\n<tr>\n<td>Gap Lock<\/td>\n<td>\u9501\u5b9a\u7d22\u5f15\u95f4\u9699&#xff0c;\u9632\u6b62\u5176\u4ed6\u4e8b\u52a1\u63d2\u5165<\/td>\n<td>\u95f4\u9699\u9501<\/td>\n<\/tr>\n<tr>\n<td>Next-Key Lock<\/td>\n<td>Record &#043; Gap&#xff0c;InnoDB RR \u9694\u79bb\u7ea7\u522b\u9ed8\u8ba4<\/td>\n<td>\u4e34\u952e\u9501<\/td>\n<\/tr>\n<tr>\n<td>\u610f\u5411\u9501<\/td>\n<td>\u8868\u7ea7&#xff0c;\u6807\u8bc6\u672c\u4e8b\u52a1\u8981\u52a0\u4ec0\u4e48\u884c\u9501<\/td>\n<td>TM \u9501<\/td>\n<\/tr>\n<tr>\n<td>AUTO-INC Lock<\/td>\n<td>\u81ea\u589e ID \u5206\u914d\u65f6\u7684\u8868\u7ea7\u9501<\/td>\n<td>sequence lock<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>3.2 \u6392\u67e5\u963b\u585e\u94fe<\/h4>\n<\/p>\n<p>&#8212; \u89e3\u91ca&#xff1a;8.0 \u67e5\u770b\u5f53\u524d\u6240\u6709\u9501&#xff08;performance_schema.data_locks&#xff09;<br \/>\nSELECT * FROM performance_schema.data_locks\\\\G<\/p>\n<p>&#8212; \u89e3\u91ca&#xff1a;\u67e5\u770b\u9501\u7b49\u5f85\u5173\u7cfb&#xff08;\u8c01\u5728\u7b49\u8c01&#xff09;<br \/>\nSELECT * FROM performance_schema.data_lock_waits\\\\G<\/p>\n<p>&#8212; \u89e3\u91ca&#xff1a;\u7efc\u5408\u89c6\u56fe&#xff1a;\u8c01\u963b\u585e\u4e86\u8c01&#xff08;sys schema \u5c01\u88c5&#xff09;<br \/>\nSELECT * FROM sys.innodb_lock_waits\\\\G<\/p>\n<p>&#8212; \u89e3\u91ca&#xff1a;\u67e5\u770b\u5f53\u524d\u6d3b\u8dc3\u4e8b\u52a1<br \/>\nSELECT trx_id, trx_state, trx_started, trx_mysql_thread_id,<br \/>\n       trx_query, trx_rows_locked, trx_rows_modified<br \/>\nFROM information_schema.innodb_trx<br \/>\nORDER BY trx_started ASC;<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/10\/20261031011653-6ae54185bf999.png\" alt=\"\u56fe 5\" \/><\/p>\n<p>\u56fe 5<\/p>\n<\/p>\n<h4>3.3 \u5904\u7406\u963b\u585e<\/h4>\n<\/p>\n<p>&#8212; \u89e3\u91ca&#xff1a;\u627e\u5230\u963b\u585e\u6e90\u5934&#xff08;trx_mysql_thread_id \u5c31\u662f SHOW PROCESSLIST \u7684 Id&#xff09;<br \/>\n&#8212; \u5728 innodb_lock_waits \u4e2d&#xff1a;<br \/>\n&#8212; requesting_engine_lock_id &#061; \u7b49\u5f85\u65b9<br \/>\n&#8212; blocking_engine_lock_id &#061; \u963b\u585e\u65b9<\/p>\n<p>&#8212; \u89e3\u91ca&#xff1a;\u6740\u6389\u963b\u585e\u6e90\u5934&#xff08;\u8c28\u614e&#xff01;\u5148\u786e\u8ba4\u4e1a\u52a1\u5f71\u54cd&#xff09;<br \/>\nKILL &lt;blocking_thread_id&gt;;<\/p>\n<p>&#8212; \u89e3\u91ca&#xff1a;\u9501\u7b49\u5f85\u8d85\u65f6\u8bbe\u7f6e<br \/>\nSHOW VARIABLES LIKE &#039;innodb_lock_wait_timeout&#039;;    &#8212; \u9ed8\u8ba4 50 \u79d2<br \/>\nSET GLOBAL innodb_lock_wait_timeout &#061; 10;           &#8212; \u751f\u4ea7\u5efa\u8bae 10 \u79d2\u5feb\u901f\u5931\u8d25<\/p>\n<p>5.7 \u5dee\u5f02&#xff1a;5.7 \u7528 information_schema.INNODB_LOCKS \u548c INNODB_LOCK_WAITS \u89c6\u56fe&#xff1b;8.0 \u8fc1\u79fb\u5230 performance_schema.data_locks \u548c data_lock_waits&#xff0c;\u4fe1\u606f\u66f4\u8be6\u7ec6\u3002<\/p>\n<hr \/>\n<h3>\u56db\u3001\u4e8b\u52a1\u76d1\u63a7<\/h3>\n<\/p>\n<p>&#8212; \u89e3\u91ca&#xff1a;\u5f53\u524d\u6240\u6709\u4e8b\u52a1<br \/>\nSELECT trx_id, trx_state, trx_started,<br \/>\n       TIMESTAMPDIFF(SECOND, trx_started, NOW()) AS trx_age_sec,<br \/>\n       trx_mysql_thread_id, trx_query<br \/>\nFROM information_schema.innodb_trx<br \/>\nORDER BY trx_started;<\/p>\n<p>&#8212; \u89e3\u91ca&#xff1a;\u67e5\u627e\u957f\u4e8b\u52a1&#xff08;\u8fd0\u884c\u8d85\u8fc7 60 \u79d2&#xff09;<br \/>\nSELECT trx_id, trx_started,<br \/>\n       TIMESTAMPDIFF(SECOND, trx_started, NOW()) AS age_sec,<br \/>\n       trx_query, trx_mysql_thread_id<br \/>\nFROM information_schema.innodb_trx<br \/>\nWHERE TIME_TO_SEC(TIMEDIFF(NOW(), trx_started)) &gt; 60<br \/>\nORDER BY trx_started;<\/p>\n<p>&#8212; \u89e3\u91ca&#xff1a;\u672a\u63d0\u4ea4\u4e8b\u52a1&#xff08;\u5bfc\u81f4 undo \u81a8\u80c0 &#043; \u9501\u4e0d\u91ca\u653e&#xff09;<br \/>\nSELECT * FROM information_schema.innodb_trx<br \/>\nWHERE trx_state &#061; &#039;RUNNING&#039; AND trx_rows_modified &gt; 0;<\/p>\n<table>\n<tr>\u4e8b\u52a1\u5f02\u5e38\u5371\u5bb3\u5904\u7406<\/tr>\n<tbody>\n<tr>\n<td>\u957f\u4e8b\u52a1&#xff08;&gt;5 \u5206\u949f&#xff09;<\/td>\n<td>undo \u81a8\u80c0\u3001\u9501\u4e0d\u91ca\u653e\u3001purge \u6ede\u540e<\/td>\n<td>\u5b9a\u4f4d\u5e94\u7528&#xff0c;\u5fc5\u8981\u65f6 KILL<\/td>\n<\/tr>\n<tr>\n<td>\u672a\u63d0\u4ea4\u4e8b\u52a1<\/td>\n<td>\u8fde\u63a5 Sleep \u4f46\u4e8b\u52a1\u6ca1 commit<\/td>\n<td>\u68c0\u67e5\u5e94\u7528\u662f\u5426\u5fd8\u8bb0 commit<\/td>\n<\/tr>\n<tr>\n<td>\u5927\u4e8b\u52a1<\/td>\n<td>\u4e3b\u4ece\u5ef6\u8fdf\u5927\u3001binlog \u4f53\u79ef\u5927<\/td>\n<td>\u62c6\u5c0f\u4e8b\u52a1&#xff0c;\u5206\u6279\u63d0\u4ea4<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr \/>\n<h3>\u4e94\u3001\u6162\u67e5\u8be2\u65e5\u5fd7&#xff08;\u5b98\u65b9&#xff1a;The Slow Query Log&#xff09;<\/h3>\n<h4>5.1 \u914d\u7f6e<\/h4>\n<\/p>\n<p># my.cnf \u6162\u67e5\u8be2\u914d\u7f6e<br \/>\nslow_query_log                  &#061; ON<br \/>\nslow_query_log_file             &#061; \/data\/mysql\/slow.log<br \/>\nlong_query_time                 &#061; 1            # \u8d85\u8fc7 1 \u79d2\u8bb0\u5f55<br \/>\nlog_queries_not_using_indexes   &#061; ON           # \u6ca1\u8d70\u7d22\u5f15\u7684\u4e5f\u8bb0\u5f55<br \/>\nlog_slow_admin_statements       &#061; ON           # \u7ba1\u7406\u8bed\u53e5&#xff08;ALTER\/CREATE&#xff09;\u4e5f\u8bb0\u5f55<br \/>\nmin_examined_row_limit          &#061; 100          # \u626b\u63cf\u884c\u6570\u4f4e\u4e8e 100 \u4e0d\u8bb0\u5f55<\/p>\n<h4>5.2 \u5206\u6790\u6162\u67e5\u8be2<\/h4>\n<\/p>\n<p># \u89e3\u91ca&#xff1a;mysqldumpslow \u662f MySQL \u81ea\u5e26\u7684\u6162\u67e5\u8be2\u5206\u6790\u5de5\u5177<br \/>\n# -s t \u6309\u603b\u65f6\u95f4\u6392\u5e8f&#xff0c;-s c \u6309\u6b21\u6570\u6392\u5e8f<br \/>\n# -t 10 \u53d6 Top 10<br \/>\nmysqldumpslow -s t -t 10 \/data\/mysql\/slow.log<\/p>\n<p># \u89e3\u91ca&#xff1a;\u66f4\u5f3a\u5927\u7684\u5de5\u5177 pt-query-digest&#xff08;Percona Toolkit&#xff09;<br \/>\npt-query-digest \/data\/mysql\/slow.log | less<\/p>\n<table>\n<tr>\u5de5\u5177\u8bf4\u660e<\/tr>\n<tbody>\n<tr>\n<td>mysqldumpslow<\/td>\n<td>MySQL \u81ea\u5e26&#xff0c;\u57fa\u7840\u7edf\u8ba1<\/td>\n<\/tr>\n<tr>\n<td>pt-query-digest<\/td>\n<td>Percona Toolkit&#xff0c;\u6df1\u5ea6\u5206\u6790&#xff0c;\u751f\u4ea7\u63a8\u8350<\/td>\n<\/tr>\n<tr>\n<td>explain<\/td>\n<td>\u5bf9\u5355\u6761\u6162 SQL \u770b\u6267\u884c\u8ba1\u5212<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&#8212; \u89e3\u91ca&#xff1a;performance_schema \u4e5f\u53ef\u4ee5\u770b\u6162 SQL \u6c47\u603b&#xff08;\u65e0\u9700\u8bfb\u65e5\u5fd7&#xff09;<br \/>\nSELECT DIGEST_TEXT, COUNT_STAR,<br \/>\n       ROUND(SUM_TIMER_WAIT\/1000000000000, 2) AS total_sec,<br \/>\n       ROUND(AVG_TIMER_WAIT\/1000000000000, 2) AS avg_sec,<br \/>\n       SUM_ROWS_EXAMINED<br \/>\nFROM performance_schema.events_statements_summary_by_digest<br \/>\nORDER BY SUM_TIMER_WAIT DESC<br \/>\nLIMIT 10\\\\G<\/p>\n<hr \/>\n<h3>\u516d\u3001\u9519\u8bef\u65e5\u5fd7\u4e0e\u5e38\u89c4\u65e5\u5fd7<\/h3>\n<h4>6.1 \u9519\u8bef\u65e5\u5fd7<\/h4>\n<\/p>\n<p>&#8212; \u89e3\u91ca&#xff1a;\u67e5\u770b\u9519\u8bef\u65e5\u5fd7\u8def\u5f84<br \/>\nSHOW VARIABLES LIKE &#039;log_error&#039;;<\/p>\n<p>&#8212; \u89e3\u91ca&#xff1a;\u67e5\u770b\u6700\u8fd1\u7684\u9519\u8bef&#xff08;8.0 \u652f\u6301\u4ece error log \u8bfb&#xff09;<br \/>\nSELECT * FROM performance_schema.error_log<br \/>\nWHERE SUPPRESSED &#061; &#039;&#039;<br \/>\nORDER by EVENT_TIMESTAMP DESC<br \/>\nLIMIT 20;<\/p>\n<table>\n<tr>\u5e38\u89c1\u9519\u8bef\u8bf4\u660e\u5904\u7406<\/tr>\n<tbody>\n<tr>\n<td>Can&#039;t connect to server<\/td>\n<td>\u8fde\u63a5\u88ab\u62d2<\/td>\n<td>\u68c0\u67e5\u7aef\u53e3\/\u9632\u706b\u5899\/\u8fde\u63a5\u6570<\/td>\n<\/tr>\n<tr>\n<td>Too many connections<\/td>\n<td>\u8fde\u63a5\u6570\u6253\u6ee1<\/td>\n<td>\u8c03\u5927 max_connections \u6216\u6392\u67e5\u6cc4\u6f0f<\/td>\n<\/tr>\n<tr>\n<td>Deadlock found<\/td>\n<td>\u6b7b\u9501<\/td>\n<td>\u67e5\u770b\u6b7b\u9501\u65e5\u5fd7&#xff0c;\u4f18\u5316\u4e8b\u52a1\u987a\u5e8f<\/td>\n<\/tr>\n<tr>\n<td>Table doesn&#039;t exist<\/td>\n<td>\u8868\u4e0d\u5b58\u5728<\/td>\n<td>\u68c0\u67e5\u5e93\u540d\/\u8868\u540d\u62fc\u5199<\/td>\n<\/tr>\n<tr>\n<td>Got error 28 from storage engine<\/td>\n<td>\u78c1\u76d8\u6ee1<\/td>\n<td>\u6e05\u7406\u78c1\u76d8\u7a7a\u95f4<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>6.2 \u6b7b\u9501\u5206\u6790<\/h4>\n<\/p>\n<p>&#8212; \u89e3\u91ca&#xff1a;\u67e5\u770b\u6700\u8fd1\u4e00\u6b21\u6b7b\u9501\u8be6\u60c5<br \/>\nSHOW ENGINE INNODB STATUS\\\\G<br \/>\n&#8212; \u91cd\u70b9\u770b LATEST DETECTED DEADLOCK \u6bb5<\/p>\n<p>&#8212; \u89e3\u91ca&#xff1a;\u5f00\u542f\u6b7b\u9501\u65e5\u5fd7\u8bb0\u5f55\u5230 error log<br \/>\nSET GLOBAL innodb_print_all_deadlocks &#061; ON;<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/10\/20261031011653-6ae54185d7184.png\" alt=\"\u56fe 6\" \/><\/p>\n<p>\u56fe 6<\/p>\n<\/p>\n<hr \/>\n<h3>\u4e03\u3001\u5907\u4efd\u68c0\u67e5&#xff08;\u65e5\u5e38\u5fc5\u505a&#xff09;<\/h3>\n<\/p>\n<p># \u89e3\u91ca&#xff1a;\u68c0\u67e5\u6628\u65e5\u5907\u4efd\u6587\u4ef6\u662f\u5426\u5b58\u5728\u3001\u5927\u5c0f\u662f\u5426\u6b63\u5e38<br \/>\nls -lh \/backup\/mysql\/<br \/>\n# \u671f\u671b&#xff1a;\u5907\u4efd\u6587\u4ef6\u5927\u5c0f &gt; 0&#xff0c;\u4e14\u4e0e\u5e93\u5927\u5c0f\u6bd4\u4f8b\u5408\u7406<\/p>\n<p># \u89e3\u91ca&#xff1a;\u68c0\u67e5\u5907\u4efd\u65e5\u5fd7\u662f\u5426\u6709\u62a5\u9519<br \/>\ntail -50 \/backup\/mysql\/backup.log<\/p>\n<p>&#8212; \u89e3\u91ca&#xff1a;\u68c0\u67e5 binlog \u662f\u5426\u6b63\u5e38\u751f\u6210&#xff08;\u5907\u4efd\u4f9d\u8d56 binlog \u505a\u589e\u91cf&#xff09;<br \/>\nSHOW BINARY LOGS;<\/p>\n<p>&#8212; \u89e3\u91ca&#xff1a;\u68c0\u67e5\u4e3b\u4ece\u590d\u5236\u72b6\u6001&#xff08;\u5982\u679c\u6709\u4ece\u5e93&#xff09;<br \/>\nSHOW REPLICA STATUS\\\\G    &#8212; 8.0 \u7528 REPLICA&#xff0c;5.7 \u7528 SLAVE<\/p>\n<table>\n<tr>\u68c0\u67e5\u9879\u6b63\u5e38\u6807\u51c6<\/tr>\n<tbody>\n<tr>\n<td>\u5907\u4efd\u6587\u4ef6\u5b58\u5728<\/td>\n<td>\u6bcf\u65e5\u5907\u4efd\u6587\u4ef6\u751f\u6210\u4e14\u5927\u5c0f &gt; 0<\/td>\n<\/tr>\n<tr>\n<td>\u5907\u4efd\u65e5\u5fd7<\/td>\n<td>\u65e0 ERROR\/WARNING<\/td>\n<\/tr>\n<tr>\n<td>binlog \u8fde\u7eed<\/td>\n<td>SHOW BINARY LOGS \u65e0 gaps<\/td>\n<\/tr>\n<tr>\n<td>\u4ece\u5e93\u5ef6\u8fdf<\/td>\n<td>Seconds_Behind_Source &lt; 60 \u79d2<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr \/>\n<h3>\u516b\u3001\u78c1\u76d8\u4e0e\u7a7a\u95f4\u5de1\u68c0<\/h3>\n<\/p>\n<p># \u89e3\u91ca&#xff1a;\u6570\u636e\u76ee\u5f55\u78c1\u76d8\u4f7f\u7528\u7387<br \/>\ndf -h \/data<\/p>\n<p># \u89e3\u91ca&#xff1a;binlog \u76ee\u5f55\u5927\u5c0f<br \/>\ndu -sh \/data\/mysql\/binlog\/<\/p>\n<p># \u89e3\u91ca&#xff1a;error log \/ slow log \u5927\u5c0f<br \/>\ndu -sh \/data\/mysql\/error.log \/data\/mysql\/slow.log<\/p>\n<p>&#8212; \u89e3\u91ca&#xff1a;\u67e5\u770b\u5404\u5e93\u5927\u5c0f\u6392\u884c<br \/>\nSELECT TABLE_SCHEMA,<br \/>\n       ROUND(SUM(DATA_LENGTH&#043;INDEX_LENGTH)\/1024\/1024\/1024, 2) AS total_gb<br \/>\nFROM information_schema.TABLES<br \/>\nGROUP BY TABLE_SCHEMA<br \/>\nORDER BY total_gb DESC;<\/p>\n<p>&#8212; \u89e3\u91ca&#xff1a;\u67e5\u770b\u6700\u5927\u7684 10 \u5f20\u8868<br \/>\nSELECT TABLE_SCHEMA, TABLE_NAME,<br \/>\n       ROUND((DATA_LENGTH&#043;INDEX_LENGTH)\/1024\/1024\/1024, 2) AS total_gb<br \/>\nFROM information_schema.TABLES<br \/>\nORDER BY (DATA_LENGTH&#043;INDEX_LENGTH) DESC<br \/>\nLIMIT 10;<\/p>\n<hr \/>\n<h3>\u4e5d\u3001VMware \u865a\u673a\u8fd0\u7ef4\u6ce8\u610f\u4e8b\u9879<\/h3>\n<table>\n<tr>\u9879\u5efa\u8bae\u539f\u56e0<\/tr>\n<tbody>\n<tr>\n<td>\u5feb\u7167\u7ba1\u7406<\/td>\n<td>\u4e0d\u8981\u5728\u4e1a\u52a1\u8fd0\u884c\u65f6\u9891\u7e41\u5feb\u7167&#xff0c;\u5feb\u7167\u94fe\u4e0d\u5b9c\u8d85\u8fc7 2 \u5c42<\/td>\n<td>\u5feb\u7167\u4f1a\u5bfc\u81f4\u78c1\u76d8 IO \u6027\u80fd\u6025\u5267\u4e0b\u964d<\/td>\n<\/tr>\n<tr>\n<td>\u65f6\u95f4\u540c\u6b65<\/td>\n<td>VMware Tools \u65f6\u95f4\u540c\u6b65\u4fdd\u6301\u5f00\u542f<\/td>\n<td>\u6162\u67e5\u8be2\u65e5\u5fd7\u65f6\u95f4\u6233\u3001binlog \u4f4d\u70b9\u4f9d\u8d56\u51c6\u786e\u65f6\u95f4<\/td>\n<\/tr>\n<tr>\n<td>\u78c1\u76d8\u7a7a\u95f4\u76d1\u63a7<\/td>\n<td>\u9884\u7559 20% \u4ee5\u4e0a\u7a7a\u95f2\u7a7a\u95f4<\/td>\n<td>\u5feb\u7167 delta \u4f1a\u6301\u7eed\u589e\u957f&#xff0c;\u78c1\u76d8\u6ee1\u5bfc\u81f4 MySQL crash<\/td>\n<\/tr>\n<tr>\n<td>\u5185\u5b58\u81a8\u80c0<\/td>\n<td>\u76d1\u63a7 VMware \u5185\u5b58\u81a8\u80c0\u9a71\u52a8&#xff08;ballooning&#xff09;<\/td>\n<td>\u5bbf\u4e3b\u673a\u5185\u5b58\u7d27\u5f20\u65f6 ballooning \u4f1a\u997f\u6b7b\u865a\u673a<\/td>\n<\/tr>\n<tr>\n<td>\u5907\u4efd\u65b9\u5f0f<\/td>\n<td>\u4e0d\u8981\u7528 VMware \u5feb\u7167\u66ff\u4ee3 MySQL \u5907\u4efd<\/td>\n<td>\u5feb\u7167\u4e0d\u662f\u6570\u636e\u5e93\u4e00\u81f4\u6027\u5907\u4efd&#xff0c;\u6062\u590d\u540e\u53ef\u80fd\u9700 crash recovery<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr \/>\n<h3>\u5341\u3001\u8e29\u5751\u8bb0\u5f55&#xff08;\u5b9e\u6d4b\u6c47\u603b&#xff09;<\/h3>\n<table>\n<tr>#\u5751\u73b0\u8c61\u89e3\u51b3<\/tr>\n<tbody>\n<tr>\n<td>1<\/td>\n<td>\u8fde\u63a5\u6570\u6253\u6ee1<\/td>\n<td>\u5e94\u7528\u62a5 Too many connections<\/td>\n<td>\u6392\u67e5\u5e94\u7528\u8fde\u63a5\u6c60\u6cc4\u6f0f&#xff0c;\u8c03\u5927 max_connections<\/td>\n<\/tr>\n<tr>\n<td>2<\/td>\n<td>\u957f\u4e8b\u52a1\u672a\u63d0\u4ea4<\/td>\n<td>undo \u81a8\u80c0\u3001\u9501\u4e0d\u91ca\u653e<\/td>\n<td>\u67e5 innodb_trx&#xff0c;KILL \u957f\u4e8b\u52a1<\/td>\n<\/tr>\n<tr>\n<td>3<\/td>\n<td>\u6b7b\u9501\u672a\u76d1\u63a7<\/td>\n<td>\u4e1a\u52a1\u5076\u53d1 ERROR 1213<\/td>\n<td>\u5f00 innodb_print_all_deadlocks&#xff0c;\u5b9a\u671f\u5206\u6790<\/td>\n<\/tr>\n<tr>\n<td>4<\/td>\n<td>\u6162\u67e5\u8be2\u65e5\u5fd7\u6ca1\u5f00<\/td>\n<td>\u4e0d\u77e5\u9053\u54ea\u6761 SQL \u6162<\/td>\n<td>\u5f00\u542f slow_query_log&#xff0c;\u8bbe long_query_time&#061;1<\/td>\n<\/tr>\n<tr>\n<td>5<\/td>\n<td>binlog \u5360\u6ee1\u78c1\u76d8<\/td>\n<td>\u78c1\u76d8\u6ee1 MySQL crash<\/td>\n<td>\u8c03\u5c0f expire_logs_days&#xff0c;\u5b9a\u671f PURGE BINARY LOGS<\/td>\n<\/tr>\n<tr>\n<td>6<\/td>\n<td>error log \u8def\u5f84\u4e0d\u5bf9<\/td>\n<td>\u627e\u4e0d\u5230\u9519\u8bef\u4fe1\u606f<\/td>\n<td>\u786e\u8ba4 log_error \u53c2\u6570&#xff0c;\u5b9a\u671f\u8f6e\u8f6c\u65e5\u5fd7<\/td>\n<\/tr>\n<tr>\n<td>7<\/td>\n<td>KILL \u8fde\u63a5\u4e0d\u751f\u6548<\/td>\n<td>KILL \u540e\u8fde\u63a5\u8fd8\u5728<\/td>\n<td>KILL \u662f\u5f02\u6b65\u7684&#xff0c;\u5927\u4e8b\u52a1\u9700\u8981\u7b49\u9501\u91ca\u653e<\/td>\n<\/tr>\n<tr>\n<td>8<\/td>\n<td>\u4ece\u5e93\u5ef6\u8fdf\u5927<\/td>\n<td>\u4e3b\u5e93\u66f4\u65b0\u4ece\u5e93\u770b\u4e0d\u5230<\/td>\n<td>\u67e5Seconds_Behind_Source&#xff0c;\u4f18\u5316\u5927\u4e8b\u52a1<\/td>\n<\/tr>\n<tr>\n<td>9<\/td>\n<td>VMware \u5feb\u7167\u6ca1\u5220<\/td>\n<td>\u78c1\u76d8\u8d8a\u6765\u8d8a\u5927\u3001IO \u53d8\u6162<\/td>\n<td>\u505a\u5b8c\u9a8c\u8bc1\u540e\u7acb\u5373\u5220\u9664\u5feb\u7167<\/td>\n<\/tr>\n<tr>\n<td>10<\/td>\n<td>time_zone \u672a\u8bbe\u7f6e<\/td>\n<td>\u65f6\u95f4\u51fd\u6570\u8fd4\u56de UTC<\/td>\n<td>my.cnf \u8bbe\u7f6e default-time-zone&#061;&#039;&#043;8:00&#039;<\/td>\n<\/tr>\n<tr>\n<td>11<\/td>\n<td>performance_schema \u6ca1\u5f00<\/td>\n<td>\u9501\/\u4e8b\u52a1\u67e5\u4e0d\u4e86<\/td>\n<td>8.0 \u9ed8\u8ba4\u5f00\u542f&#xff0c;\u786e\u8ba4 performance_schema&#061;ON<\/td>\n<\/tr>\n<tr>\n<td>12<\/td>\n<td>\u5907\u4efd\u6ca1\u9a8c\u8bc1<\/td>\n<td>\u771f\u6062\u590d\u65f6\u624d\u53d1\u73b0\u5907\u4efd\u635f\u574f<\/td>\n<td>\u5b9a\u671f\u505a\u6062\u590d\u6f14\u7ec3&#xff0c;\u4e0d\u80fd\u53ea\u770b\u5907\u4efd\u6210\u529f<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr \/>\n<h3>\u5341\u4e00\u3001\u8981\u70b9\u901f\u8bb0<\/h3>\n<li>\u65e5\u5e38\u5de1\u68c0\u4e09\u677f\u65a7&#xff1a;processlist \u770b\u8fde\u63a5\u3001innodb_trx \u770b\u4e8b\u52a1\u3001data_locks \u770b\u9501\u3002<\/li>\n<li>\u6162\u67e5\u8be2\u662f\u6027\u80fd\u4f18\u5316\u5165\u53e3&#xff1a;slow.log &#043; pt-query-digest \u662f\u6807\u914d\u3002<\/li>\n<li>\u957f\u4e8b\u52a1\u662f\u4e07\u6076\u4e4b\u6e90&#xff1a;undo \u81a8\u80c0\u3001\u9501\u4e0d\u91ca\u653e\u3001\u4e3b\u4ece\u5ef6\u8fdf\u90fd\u8ddf\u5b83\u6709\u5173\u3002<\/li>\n<li>\u5907\u4efd\u4e0d\u80fd\u53ea\u770b\u6210\u529f&#xff1a;\u5fc5\u987b\u5b9a\u671f\u6062\u590d\u6f14\u7ec3&#xff0c;\u5907\u4efd\u2260\u53ef\u6062\u590d\u3002<\/li>\n<li>VMware \u5feb\u7167 \u2260 \u6570\u636e\u5e93\u5907\u4efd&#xff1a;\u5feb\u7167\u53ea\u662f\u865a\u673a\u5c42\u9762&#xff0c;\u6570\u636e\u5e93\u4e00\u81f4\u6027\u4ecd\u9700 mysqldump\/xtrabackup\u3002<\/li>\n<hr \/>\n<h3>\u5341\u4e8c\u3001\u53c2\u8003\u8d44\u6599&#xff08;\u5b98\u65b9\u6b63\u5f0f\u6587\u6863&#xff09;<\/h3>\n<table>\n<tr>\u4e3b\u9898\u5b98\u65b9\u94fe\u63a5<\/tr>\n<tbody>\n<tr>\n<td>MySQL 8.0 Reference Manual<\/td>\n<td>https:\/\/dev.mysql.com\/doc\/refman\/8.0\/en\/<\/td>\n<\/tr>\n<tr>\n<td>InnoDB Locking&#xff08;\u9501\u673a\u5236&#xff09;<\/td>\n<td>https:\/\/dev.mysql.com\/doc\/refman\/8.0\/en\/innodb-locking.html<\/td>\n<\/tr>\n<tr>\n<td>InnoDB Transaction Model<\/td>\n<td>https:\/\/dev.mysql.com\/doc\/refman\/8.0\/en\/innodb-transaction-model.html<\/td>\n<\/tr>\n<tr>\n<td>The Slow Query Log<\/td>\n<td>https:\/\/dev.mysql.com\/doc\/refman\/8.0\/en\/slow-query-log.html<\/td>\n<\/tr>\n<tr>\n<td>The Error Log<\/td>\n<td>https:\/\/dev.mysql.com\/doc\/refman\/8.0\/en\/error-log.html<\/td>\n<\/tr>\n<tr>\n<td>SHOW PROCESSLIST<\/td>\n<td>https:\/\/dev.mysql.com\/doc\/refman\/8.0\/en\/show-processlist.html<\/td>\n<\/tr>\n<tr>\n<td>Performance Schema Lock Tables<\/td>\n<td>https:\/\/dev.mysql.com\/doc\/refman\/8.0\/en\/performance-schema-lock-tables.html<\/td>\n<\/tr>\n<tr>\n<td>sys Schema&#xff08;innodb_lock_waits&#xff09;<\/td>\n<td>https:\/\/dev.mysql.com\/doc\/refman\/8.0\/en\/sys-schema.html<\/td>\n<\/tr>\n<tr>\n<td>Percona Toolkit (pt-query-digest)<\/td>\n<td>https:\/\/www.percona.com\/software\/database-tools\/percona-toolkit<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr \/>\n<p>\u672c\u6587\u7ae0\u5c5e\u4e8e\u300aMySQL \u6570\u636e\u5e93\u5168\u6808\u8fd0\u7ef4\u5b9e\u6218\u7cfb\u5217\u300b\u65e5\u5e38\u8fd0\u7ef4\u7bc7\u3002\u6b22\u8fce\u6536\u85cf\u3001\u4ea4\u6d41\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>04_MySQL DBA \u65e5\u5e38\u8fd0\u7ef4\u624b\u518c \u2014\u2014 \u4f1a\u8bdd\u7ba1\u7406\u3001\u9501\u4e0e\u963b\u585e\u3001\u4e8b\u52a1\u76d1\u63a7\u3001\u6162\u67e5\u8be2\u4e0e\u65e5\u5fd7\u5de1\u68c0<br \/>\n\u7cfb\u5217\u5b9a\u4f4d&#xff1a;\u300aMySQL \u6570\u636e\u5e93\u5168\u6808\u8fd0\u7ef4\u5b9e\u6218\u7cfb\u5217\u300b\u7b2c 04 \u7bc7&#xff0c;\u4e0e\u300aOracle \u6570\u636e\u5e93\u5168\u6808\u8fd0\u7ef4\u5b9e\u6218\u7cfb\u5217&#xff08;VMware \u7248&#xff09;\u300b\u540c\u6784\u5bf9\u6807\u3002\u9002\u7528\u7248\u672c&#xff1a;MySQL 8.0&#xff08;5.7 \u5dee\u5f02\u968f\u6587\u6807\u6ce8&#xff09;\u3002\u5b98\u65b9\u6587\u6863&#xff1a;MySQL 8.0 Reference Manual\u3001Server Stat<\/p>\n","protected":false},"author":2,"featured_media":120248,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[114,768,100,188,44],"topic":[],"class_list":["post-120254","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-mysql","tag-sql","tag-100","tag-188","tag-44"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>04_MySQL DBA \u65e5\u5e38\u8fd0\u7ef4\u624b\u518c \u2014\u2014 \u4f1a\u8bdd\u7ba1\u7406\u3001\u9501\u4e0e\u963b\u585e\u3001\u4e8b\u52a1\u76d1\u63a7\u3001\u6162\u67e5\u8be2\u4e0e\u65e5\u5fd7\u5de1\u68c0 - \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\/120254.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"04_MySQL DBA \u65e5\u5e38\u8fd0\u7ef4\u624b\u518c \u2014\u2014 \u4f1a\u8bdd\u7ba1\u7406\u3001\u9501\u4e0e\u963b\u585e\u3001\u4e8b\u52a1\u76d1\u63a7\u3001\u6162\u67e5\u8be2\u4e0e\u65e5\u5fd7\u5de1\u68c0 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"04_MySQL DBA \u65e5\u5e38\u8fd0\u7ef4\u624b\u518c \u2014\u2014 \u4f1a\u8bdd\u7ba1\u7406\u3001\u9501\u4e0e\u963b\u585e\u3001\u4e8b\u52a1\u76d1\u63a7\u3001\u6162\u67e5\u8be2\u4e0e\u65e5\u5fd7\u5de1\u68c0 \u7cfb\u5217\u5b9a\u4f4d&#xff1a;\u300aMySQL \u6570\u636e\u5e93\u5168\u6808\u8fd0\u7ef4\u5b9e\u6218\u7cfb\u5217\u300b\u7b2c 04 \u7bc7&#xff0c;\u4e0e\u300aOracle \u6570\u636e\u5e93\u5168\u6808\u8fd0\u7ef4\u5b9e\u6218\u7cfb\u5217&#xff08;VMware \u7248&#xff09;\u300b\u540c\u6784\u5bf9\u6807\u3002\u9002\u7528\u7248\u672c&#xff1a;MySQL 8.0&#xff08;5.7 \u5dee\u5f02\u968f\u6587\u6807\u6ce8&#xff09;\u3002\u5b98\u65b9\u6587\u6863&#xff1a;MySQL 8.0 Reference Manual\u3001Server Stat\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/120254.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-10-31T01:16:55+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/10\/20261031011652-6ae54184c24e6.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=\"5 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/120254.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/120254.html\",\"name\":\"04_MySQL DBA \u65e5\u5e38\u8fd0\u7ef4\u624b\u518c \u2014\u2014 \u4f1a\u8bdd\u7ba1\u7406\u3001\u9501\u4e0e\u963b\u585e\u3001\u4e8b\u52a1\u76d1\u63a7\u3001\u6162\u67e5\u8be2\u4e0e\u65e5\u5fd7\u5de1\u68c0 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-10-31T01:16:55+00:00\",\"dateModified\":\"2026-10-31T01:16:55+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/120254.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/120254.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/120254.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"04_MySQL DBA \u65e5\u5e38\u8fd0\u7ef4\u624b\u518c \u2014\u2014 \u4f1a\u8bdd\u7ba1\u7406\u3001\u9501\u4e0e\u963b\u585e\u3001\u4e8b\u52a1\u76d1\u63a7\u3001\u6162\u67e5\u8be2\u4e0e\u65e5\u5fd7\u5de1\u68c0\"}]},{\"@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":"04_MySQL DBA \u65e5\u5e38\u8fd0\u7ef4\u624b\u518c \u2014\u2014 \u4f1a\u8bdd\u7ba1\u7406\u3001\u9501\u4e0e\u963b\u585e\u3001\u4e8b\u52a1\u76d1\u63a7\u3001\u6162\u67e5\u8be2\u4e0e\u65e5\u5fd7\u5de1\u68c0 - \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\/120254.html","og_locale":"zh_CN","og_type":"article","og_title":"04_MySQL DBA \u65e5\u5e38\u8fd0\u7ef4\u624b\u518c \u2014\u2014 \u4f1a\u8bdd\u7ba1\u7406\u3001\u9501\u4e0e\u963b\u585e\u3001\u4e8b\u52a1\u76d1\u63a7\u3001\u6162\u67e5\u8be2\u4e0e\u65e5\u5fd7\u5de1\u68c0 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"04_MySQL DBA \u65e5\u5e38\u8fd0\u7ef4\u624b\u518c \u2014\u2014 \u4f1a\u8bdd\u7ba1\u7406\u3001\u9501\u4e0e\u963b\u585e\u3001\u4e8b\u52a1\u76d1\u63a7\u3001\u6162\u67e5\u8be2\u4e0e\u65e5\u5fd7\u5de1\u68c0 \u7cfb\u5217\u5b9a\u4f4d&#xff1a;\u300aMySQL \u6570\u636e\u5e93\u5168\u6808\u8fd0\u7ef4\u5b9e\u6218\u7cfb\u5217\u300b\u7b2c 04 \u7bc7&#xff0c;\u4e0e\u300aOracle \u6570\u636e\u5e93\u5168\u6808\u8fd0\u7ef4\u5b9e\u6218\u7cfb\u5217&#xff08;VMware \u7248&#xff09;\u300b\u540c\u6784\u5bf9\u6807\u3002\u9002\u7528\u7248\u672c&#xff1a;MySQL 8.0&#xff08;5.7 \u5dee\u5f02\u968f\u6587\u6807\u6ce8&#xff09;\u3002\u5b98\u65b9\u6587\u6863&#xff1a;MySQL 8.0 Reference Manual\u3001Server Stat","og_url":"https:\/\/www.wsisp.com\/helps\/120254.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-10-31T01:16:55+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/10\/20261031011652-6ae54184c24e6.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"5 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/120254.html","url":"https:\/\/www.wsisp.com\/helps\/120254.html","name":"04_MySQL DBA \u65e5\u5e38\u8fd0\u7ef4\u624b\u518c \u2014\u2014 \u4f1a\u8bdd\u7ba1\u7406\u3001\u9501\u4e0e\u963b\u585e\u3001\u4e8b\u52a1\u76d1\u63a7\u3001\u6162\u67e5\u8be2\u4e0e\u65e5\u5fd7\u5de1\u68c0 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-10-31T01:16:55+00:00","dateModified":"2026-10-31T01:16:55+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/120254.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/120254.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/120254.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"04_MySQL DBA \u65e5\u5e38\u8fd0\u7ef4\u624b\u518c \u2014\u2014 \u4f1a\u8bdd\u7ba1\u7406\u3001\u9501\u4e0e\u963b\u585e\u3001\u4e8b\u52a1\u76d1\u63a7\u3001\u6162\u67e5\u8be2\u4e0e\u65e5\u5fd7\u5de1\u68c0"}]},{"@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\/120254","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=120254"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/120254\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/120248"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=120254"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=120254"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=120254"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=120254"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}