{"id":213,"date":"2024-12-18T11:02:55","date_gmt":"2024-12-18T11:02:55","guid":{"rendered":"https:\/\/www.isvmspace.com\/?p=213"},"modified":"2024-12-18T11:02:55","modified_gmt":"2024-12-18T11:02:55","slug":"mysql-%e6%97%a5%e5%bf%97%e5%88%86%e7%b1%bb","status":"publish","type":"post","link":"https:\/\/www.isvmspace.com\/?p=213","title":{"rendered":"Mysql-\u65e5\u5fd7\u5206\u7c7b"},"content":{"rendered":"<table>\n<thead>\n<tr>\n<th>\u65e5\u5fd7\u7c7b\u578b<\/th>\n<th>\u63cf\u8ff0<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>\u9519\u8bef\u65e5\u5fd7 \uff08Error Log\uff09<\/td>\n<td>\u8be5\u65e5\u5fd7\u6587\u4ef6\u4f1a\u8bb0\u5f55 MySQL \u670d\u52a1\u5668\u7684\u542f\u52a8\u3001\u5173\u95ed\u548c\u8fd0\u884c\u9519\u8bef\u7b49\u4fe1\u606f<\/td>\n<\/tr>\n<tr>\n<td>\u901a\u7528\u67e5\u8be2\u65e5\u5fd7\uff08General Query Log\uff09<\/td>\n<td>\u8be5\u65e5\u5fd7\u8bb0\u5f55 MySQL \u670d\u52a1\u5668\u7684\u542f\u52a8\u548c\u5173\u95ed\u4fe1\u606f\u3001\u5ba2\u6237\u7aef\u7684\u8fde\u63a5\u4fe1\u606f\u3001\u66f4\u65b0\u3001\u67e5\u8be2\u6570\u636e\u8bb0\u5f55\u7684 SQL \u8bed\u53e5\u7b49<\/td>\n<\/tr>\n<tr>\n<td>\u6162\u67e5\u8be2\u65e5\u5fd7\uff08Slow Query Log\uff09<\/td>\n<td>\u8bb0\u5f55\u6267\u884c\u4e8b\u4ef6\u8d85\u8fc7\u6307\u5b9a\u65f6\u95f4\u7684\u64cd\u4f5c\uff0c\u901a\u8fc7\u5de5\u5177\u5206\u6790\u6162\u67e5\u8be2\u65e5\u5fd7\u53ef\u4ee5\u5b9a\u4f4d MySQL \u670d\u52a1\u5668\u6027\u80fd\u74f6\u9888\u6240\u5728<\/td>\n<\/tr>\n<tr>\n<td>\u4e8c\u8fdb\u5236\u65e5\u5fd7\uff08Binary Log\uff09<\/td>\n<td>\u8be5\u65e5\u5fd7\u6587\u4ef6\u4f1a\u4ee5\u4e8c\u8fdb\u5236\u7684\u5f62\u5f0f\u8bb0\u5f55\u6570\u636e\u5e93\u7684\u5404\u79cd\u64cd\u4f5c\uff0c\u4f46\u4e0d\u8bb0\u5f55\u67e5\u8be2\u8bed\u53e5<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h1>\u9519\u8bef\u65e5\u5fd7<\/h1>\n<p><strong>\u53c2\u6570<\/strong><\/p>\n<pre><code class=\"language-txt line-numbers\">mysql&gt; show variables where  variable_name=\"log_error\" or variable_name=\"log_warnings\";\n+---------------+---------------------------------------------------+\n| Variable_name | Value                                             |\n+---------------+---------------------------------------------------+\n| log_error     | D:\\application\\mysql-5.7.9-winx64\\data\\xxx_x.err |\n| log_warnings  | 2                                                 |\n+---------------+---------------------------------------------------+\n\n<\/code><\/pre>\n<p><strong>log_error\uff1a<\/strong>\u9519\u8bef\u65e5\u5fd7\u7684\u5b58\u653e\u8def\u5f84<\/p>\n<p><strong>log_warnings\uff1a<\/strong>\u8868\u793a\u662f\u5426\u8bb0\u5f55\u544a\u8b66\u4fe1\u606f\u5230\u9519\u8bef\u65e5\u5fd7\uff0c0\u8868\u793a\u4e0d\u8bb0\u5f55\u544a\u8b66\u4fe1\u606f\uff0c1\u8868\u793a\u8bb0\u5f55\u544a\u8b66\u4fe1\u606f\uff0c\u5927\u4e8e1\u8868\u793a\u5404\u7c7b\u544a\u8b66\u4fe1\u606f\uff0c\u4f8b\u5982\u6709\u5173\u7f51\u7edc\u6545\u969c\u7684\u4fe1\u606f\u548c\u91cd\u65b0\u8fde\u63a5\u4fe1\u606f\u5199\u5165\u9519\u8bef\u65e5\u5fd7<\/p>\n<h1>\u901a\u7528\u67e5\u8be2\u65e5\u5fd7<\/h1>\n<p><strong>\u53c2\u6570<\/strong><\/p>\n<pre><code class=\"language-txt line-numbers\">mysql&gt; show variables where variable_name like \"%general_log%\" or variable_name = \"log_output\";\n+------------------+---------------------------------------------------+\n| Variable_name    | Value                                             |\n+------------------+---------------------------------------------------+\n| general_log      | OFF                                               |\n| general_log_file | D:\\application\\mysql-5.7.9-winx64\\data\\sp0029.log |\n| log_output       | FILE                                              |\n+------------------+---------------------------------------------------+\n\n<\/code><\/pre>\n<p><strong>general_log\uff1a<\/strong>\u8868\u793a\u67e5\u8be2\u65e5\u5fd7\u662f\u5426\u5f00\u542f\uff0cON\u8868\u793a\u5f00\u542f\uff0cOFF\u8868\u793a\u672a\u5f00\u542f\uff0c\u9ed8\u8ba4\u4e3aOFF<br \/>\n<strong>log_output\uff1a<\/strong>\u8868\u793a\u5f53\u67e5\u8be2\u65e5\u5fd7\u5f00\u542f\u4ee5\u540e\uff0c\u4ee5\u54ea\u79cd\u65b9\u5f0f\u5b58\u653e\u3002FILE\u8868\u793a\u5b58\u653e\u4e8e\u6587\u4ef6\u4e2d\uff0cTABLE\u8868\u793a\u5b58\u653e\u4e8e\u8868mysql.general_log\u4e2d(\u6162\u67e5\u8be2\u5b58\u653e\u4e8e\u8868mysql.slow_log)\uff0cFILE,TABLE\u8868\u793a\u540c\u65f6\u5b58\u653e\u4e8e\u6587\u4ef6\u548c\u8868\u4e2d\uff0cNONE\u8868\u793a\u4e0d\u8bb0\u5f55\u65e5\u5fd7,log_output\u4e0d\u4ec5\u63a7\u5236\u67e5\u8be2\u65e5\u5fd7\uff0c\u8fd8\u63a7\u5236\u6162\u67e5\u8be2\u65e5\u5fd7\u3002<br \/>\n<strong>general_log_file\uff1a<\/strong>\u8868\u793a\u67e5\u8be2\u65e5\u5fd7\u5b58\u653e\u4e8e\u6587\u4ef6\u7684\u8def\u5f84<\/p>\n<p><strong>\u4fee\u6539my.ini\u914d\u7f6e\u6587\u4ef6,\u9700\u91cd\u542fmysql\u670d\u52a1\u751f\u6548<\/strong><\/p>\n<pre><code class=\"language-txt line-numbers\">[mysqld]\ngeneral_log=ON\nlog_output=FILE\ngeneral_log_file=D:\/application\/mysql-5.7.9-winx64\/general_log.log\n<\/code><\/pre>\n<p><strong>\u52a8\u6001\u8bbe\u7f6e\u901a\u7528\u67e5\u8be2\u65e5\u5fd7,\u65e0\u9700\u91cd\u542fmysql\u670d\u52a1<\/strong><\/p>\n<pre><code class=\"language-txt line-numbers\">-- \u5f00\u542f\nmysql&gt; SET GLOBAL general_log = 'ON\u2019; \n-- \u5173\u95ed\nmysql&gt; SET GLOBAL general_log = 'OFF';\n<\/code><\/pre>\n<h1>\u6162\u67e5\u8be2\u65e5\u5fd7<\/h1>\n<p><strong>\u53c2\u6570<\/strong><\/p>\n<pre><code class=\"language-txt line-numbers\">mysql&gt; SHOW VARIABLES WHERE variable_name LIKE 'slow_query%' OR variable_name = 'long_query_time' OR variable_name = 'log_queries_not_using_indexes';\n+-------------------------------+--------------------------------------------------------+\n| Variable_name              | Value                                                                 |\n+-------------------------------+--------------------------------------------------------+\n| log_queries_not_using_indexes | OFF                                                    |\n| long_query_time                           | 10.000000                                              |\n| slow_query_log                             | OFF                                                    |\n| slow_query_log_file                     | D:\\application\\mysql-5.7.9-winx64\\data\\sp0029-slow.log |\n+-------------------------------+--------------------------------------------------------+\n<\/code><\/pre>\n<p><strong>slow_query_log\uff1a<\/strong>\u8868\u793a\u67e5\u8be2\u65e5\u5fd7\u662f\u5426\u5f00\u542f\uff0cON\u8868\u793a\u5f00\u542f\uff0cOFF\u8868\u793a\u672a\u5f00\u542f\uff0c\u9ed8\u8ba4OFF<\/p>\n<p><strong>slow_query_log_file\uff1a<\/strong>\u8868\u793a\u67e5\u8be2\u65e5\u5fd7\u5b58\u653e\u4e8e\u6587\u4ef6\u7684\u8def\u5f84<\/p>\n<p><strong>long_query_time\uff1a<\/strong>\u8868\u793a\u591a\u957f\u65f6\u95f4\u7684\u67e5\u8be2\u88ab\u8ba4\u4e3a\"\u6162\u67e5\u8be2\"\uff0c\u9ed8\u8ba410s<\/p>\n<p><strong>log_queries_not_using_indexes\uff1a<\/strong>\u8868\u793a\u5982\u679c\u8fd0\u884c\u7684sql\u8bed\u53e5\u6ca1\u6709\u4f7f\u7528\u5230\u7d22\u5f15\uff0c\u4e5f\u88ab\u8bb0\u5f55\u5230\u6162\u67e5\u8be2\u65e5\u5fd7\uff0cOFF\u8868\u793a\u4e0d\u8bb0\u5f55\uff0cON\u8868\u793a\u8bb0\u5f55\uff0c\u9ed8\u8ba4OFF<\/p>\n<p><strong>\u4fee\u6539my.ini\u914d\u7f6e\u6587\u4ef6,\u9700\u91cd\u542fmysql\u670d\u52a1\u751f\u6548<\/strong><\/p>\n<pre><code class=\"language-txt line-numbers\">[mysqld]\nslow_query_log=ON\nslow_query_log_file=D:\/application\/mysql-5.7.9-winx64\/slow_query_log.log\nlong_query_time=0.01\n<\/code><\/pre>\n<p><strong>\u52a8\u6001\u8bbe\u7f6e\u6162\u67e5\u8be2\u65e5\u5fd7,\u65e0\u9700\u91cd\u542fmysql\u670d\u52a1<\/strong><\/p>\n<pre><code class=\"language-txt line-numbers\">-- \u5f00\u542f\nmysql&gt; SET GLOBAL slow_query_log = 'ON'; \n-- \u5173\u95ed\nmysql&gt; SET GLOBAL slow_query_log = 'OFF';\n<\/code><\/pre>\n<p><strong>\u5206\u6790\u6162\u65e5\u5fd7<\/strong><\/p>\n<p>mysqldumpslow\u5de5\u5177<br \/>\n\u53ef\u4ee5\u501f\u52a9perl (windows\u7248\u4e0b\u8f7d\u5730\u5740: http:\/\/strawberryperl.com\/)<\/p>\n<pre><code class=\"language-txt line-numbers\">perl .\/bin\/mysqldumpslow.pl slow_query_log.log\n<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/isvm-blogs.oss-cn-shanghai.aliyuncs.com\/static\/imgs\/mysql\/perl_mysql_slow_log.png\" alt=\"\" \/><\/p>\n<h1>\u4e8c\u8fdb\u5236\u65e5\u5fd7<\/h1>\n<p><strong>\u53c2\u6570<\/strong><\/p>\n<pre><code class=\"language-txt line-numbers\">mysql&gt; show variables where variable_name=\"log_bin\" or\nvariable_name=\"log_bin_basename\" or variable_name=\"max_binlog_size\" or\nvariable_name=\"log_bin_index\" or\nvariable_name=\"binlog_format\" or\nvariable_name=\"sql_log_bin\" or\nvariable_name=\"sync_binlog\";\n+------------------+------------+\n| Variable_name    | Value      |\n+------------------+------------+\n| binlog_format    | ROW        |\n| log_bin          | OFF        |\n| log_bin_basename |            |\n| log_bin_index    |            |\n| max_binlog_size  | 1073741824 |\n| sql_log_bin      | ON         |\n| sync_binlog      | 1          |\n+------------------+------------+\n<\/code><\/pre>\n<p><strong>log_bin\uff1a<\/strong>\u8868\u793a\u4e8c\u8fdb\u5236\u65e5\u5fd7\u662f\u5426\u5f00\u542f\uff0cON\u8868\u793a\u5f00\u542f\uff0cOFF\u8868\u793a\u672a\u5f00\u542f\uff0c\u9ed8\u8ba4OFF<\/p>\n<p><strong>max_binlog_size\uff1a<\/strong>\u4e8c\u8fdb\u5236\u65e5\u5fd7\u6587\u4ef6\u7684\u6700\u5927\u5927\u5c0f\uff0c\u8d85\u8fc7\u6b64\u5927\u5c0f\uff0c\u4e8c\u8fdb\u5236\u6587\u4ef6\u4f1a\u81ea\u52a8\u6eda\u52a8<\/p>\n<p><strong>log_bin_index\uff1a<\/strong>\u4e8c\u8fdb\u5236\u65e5\u5fd7\u6587\u4ef6\u7d22\u5f15\u6587\u4ef6\u540d\uff0c\u7528\u4e8e\u8bb0\u5f55\u6240\u6709\u7684\u4e8c\u8fdb\u5236\u6587\u4ef6<\/p>\n<p><strong>binlog_format\uff1a<\/strong>\u51b3\u5b9a\u4e86\u4e8c\u8fdb\u5236\u65e5\u5fd7\u7684\u8bb0\u5f55\u65b9\u5f0f\uff0cSTATEMENT\u4ee5\u8bed\u53e5\u7684\u5f62\u5f0f\u8bb0\u5f55\uff0cROW\u4ee5\u6570\u636e\u4fee\u6539\u7684\u5f62\u5f0f\u8bb0\u5f55\uff0cMIXED\u4ee5\u8bed\u53e5\u548c\u6570\u636e\u4fee\u6539\u6df7\u5408\u5f62\u5f0f\u8bb0\u5f55<\/p>\n<p><strong>sql_log_bin\uff1a<\/strong>\u51b3\u5b9a\u662f\u5426\u5bf9\u4e8c\u8fdb\u5236\u65e5\u5fd7\u8fdb\u884c\u65e5\u5fd7\u8bb0\u5f55\uff0cON\u8868\u793a\u6267\u884c\u8bb0\u5f55\uff0cOFF\u8868\u793a\u4e0d\u6267\u884c\u8bb0\u5f55\uff0c\u9ed8\u8ba4OFF\uff0c\u8fd9\u4e2a\u662f\u4f1a\u8bdd\u7ea7\u522b\u53d8\u91cf\u53ef\u4ee5\u901aSET sql_log_bin = {0|1}\u6765\u6539\u53d8\u8be5\u53d8\u91cf\u503c<\/p>\n<p><strong>sync_binlog\uff1a<\/strong>\u51b3\u5b9a\u4e8c\u8fdb\u5236\u65e5\u5fd7\u5199\u5165\u78c1\u76d8\u65f6\u673a\uff0c\u5982\u679csync_binlog\u4e3a0\uff0c\u64cd\u4f5c\u7cfb\u7edf\u6765\u51b3\u5b9a\u4ec0\u4e48\u65f6\u5019\u5199\u5165\u78c1\u76d8\uff0c\u5982\u679csync_binlog\u4e3aN\uff08N=1,2,3..\uff09\uff0c\u5219\u6bcfN\u6b21\u4e8b\u52a1\u63d0\u4ea4\u540e\uff0c\u90fd\u7acb\u5373\u5c06\u5185\u5b58\u4e2d\u7684\u4e8c\u8fdb\u5236\u65e5\u5fd7\u5199\u5165\u78c1\u76d8\uff0c\u5982\u4f55\u9009\u62e9\u53d6\u51b3\u4e8e\u5b89\u5168\u6027\u4e0e\u6027\u80fd\u7684\u6743\u8861<\/p>\n<h2>\u4e8c\u8fdb\u5236\u65e5\u5fd7\u8bb0\u5f55\u65b9\u5f0f<\/h2>\n<ol>\n<li>STATEMENT<br \/>\n\u8bb0\u5f55\u5bf9\u6570\u636e\u5e93\u505a\u51fa\u4fee\u6539\u7684\u8bed\u53e5\uff0c\u6bd4\u5982\uff0cupdate A set test='test'\uff0c\u90a3\u4e48\u8fd9\u6761update\u8bed\u53e5\u5c06\u88ab\u8bb0\u5f55\u5230\u4e8c\u8fdb\u5236\u65e5\u5fd7\u4e2d<br \/>\n<strong>\u4f18\u70b9\uff1a<\/strong><br \/>\nbinlog\u65e5\u5fd7\u91cf\u5c11\uff0cIO\u538b\u529b\u5c0f\uff0c\u6027\u80fd\u9ad8<br \/>\n<strong>\u7f3a\u70b9\uff1a<\/strong><br \/>\n\u8bb0\u5f55\u8bed\u53e5\u672c\u8eab\u5916\uff0c\u53ef\u80fd\u8fd8\u9700\u8981\u8bb0\u5f55\u4e00\u4e9b\u76f8\u5173\u4fe1\u606f\uff0c\u800c\u4e14\uff0c\u5728\u4f7f\u7528\u4e00\u4e9b\u7279\u5b9a\u51fd\u6570\u65f6\uff0c\u5e76\u4e0d\u80fd\u4fdd\u8bc1\u6062\u590d\u64cd\u4f5c\u4e0e\u8bb0\u5f55\u5b8c\u5168\u4e00\u81f4<\/p>\n<\/li>\n<li>\n<p>ROW<br \/>\n\u8bb0\u5f55\u5bf9\u6570\u636e\u5e93\u505a\u51fa\u7684\u4fee\u6539\u7684\u8bed\u53e5\u6240\u5f71\u54cd\u5230\u7684\u6570\u636e\u884c\u4ee5\u53ca\u8fd9\u4e9b\u884c\u7684\u4fee\u6539\uff0c\u6bd4\u5982\uff0cupdate A set test='test'\uff0c\u5982\u679c\u4f7f\u7528row\u6a21\u5f0f\uff0c\u90a3\u4e48\u8fd9\u6761update\u6240\u5f71\u54cd\u5230\u7684\u884c\u6240\u5bf9\u5e94\u7684\u4fee\u6539\uff0c\u5c06\u4f1a\u8bb0\u5f55\u5728binlog\u4e2d<br \/>\n<strong>\u4f18\u70b9\uff1a<\/strong><br \/>\n\u80fd\u5b8c\u8fd8\u539f\u548c\u590d\u5236\u88ab\u65e5\u5fd7\u8bb0\u5f55\u65f6\u7684\u64cd\u4f5c<br \/>\n<strong>\u7f3a\u70b9<\/strong><br \/>\n\u65e5\u5fd7\u91cf\u8f83\u5927\uff0cIO\u538b\u529b\u6bd4\u8f83\u5927\uff0c\u6027\u80fd\u6d88\u8017\u6bd4\u8f83\u5927<\/p>\n<\/li>\n<li>\n<p>MIXED<br \/>\n\u6df7\u5408\u4e0a\u8ff0\u4e24\u79cd\u6a21\u5f0f\uff0c\u4e00\u822c\u4f7f\u7528statement\u65b9\u5f0f\u8fdb\u884c\u8bb0\u5f55\uff0c\u5982\u679c\u9047\u5230\u4e00\u4e9b\u7279\u6b8a\u51fd\u6570\u4f7f\u7528row\u65b9\u5f0f\u8fdb\u884c\u8bb0\u5f55\uff0c\u8fd9\u79cd\u8bb0\u5f55\u65b9\u5f0f\u79f0\u4e3amixed<\/p>\n<\/li>\n<\/ol>\n<p><strong>\u4fee\u6539my.ini\u914d\u7f6e\u6587\u4ef6,\u9700\u91cd\u542fmysql\u670d\u52a1\u751f\u6548<\/strong><\/p>\n<pre><code class=\"language-properties line-numbers\">[mysqld]\nserver-id=1\nlog_bin=my-bin\nbinlog_format=MIXED\n<\/code><\/pre>\n<h2>\u5e38\u7528binlog\u65e5\u5fd7\u64cd\u4f5c\u547d\u4ee4<\/h2>\n<p>\u67e5\u770b\u6240\u6709binlog\u65e5\u5fd7\u5217\u8868<\/p>\n<pre><code class=\"language-txt line-numbers\">show master logs;\n<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/isvm-blogs.oss-cn-shanghai.aliyuncs.com\/static\/imgs\/mysql\/showmasterlogs.png\" alt=\"\" \/><\/p>\n<p>\u67e5\u770bmaster\u72b6\u6001\uff0c\u5373\u6700\u540e\uff08\u6700\u65b0\uff09\u4e00\u4e2abinlog\u65e5\u5fd7\u7684\u7f16\u53f7\u540d\u79f0\uff0c\u53ca\u5176\u6700\u540e\u4e00\u4e2a\u64cd\u4f5c\u4e8b\u4ef6pos\u7ed3\u675f\u70b9(Position)\u503c<\/p>\n<pre><code class=\"language-txt line-numbers\">show master status;\n<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/isvm-blogs.oss-cn-shanghai.aliyuncs.com\/static\/imgs\/mysql\/binlog_status.png\" alt=\"\" \/><\/p>\n<p>flush \u5237\u65b0log\u65e5\u5fd7\uff0c\u81ea\u6b64\u523b\u5f00\u59cb\u4ea7\u751f\u4e00\u4e2a\u65b0\u7f16\u53f7\u7684binlog\u65e5\u5fd7\u6587\u4ef6<\/p>\n<pre><code class=\"language-txt line-numbers\">flush logs;\n<\/code><\/pre>\n<p>\u91cd\u7f6e\uff08\u6e05\u7a7a\uff09\u6240\u6709binlog\u65e5\u5fd7<\/p>\n<pre><code class=\"language-txt line-numbers\">reset master;\n<\/code><\/pre>\n<h2>\u67e5\u770bbinlog\u65e5\u5fd7<\/h2>\n<p>mysqlbinlog\u5de5\u5177<\/p>\n<pre><code class=\"language-txt line-numbers\">Usage: mysqlbinlog [options] log-files\n       mysqlbinlog --base64-output=decode-rows -v my-bin.000003 \n[options]\u8282\u9009\n--base64-output=name \uff1abase64\u8f93\u51fa\uff0c[never\/ decode-rows \/ auto]\n-d, --database=name : \u6307\u5b9a\u6570\u636e\u5e93\n--start-datetime=name \uff1a\u5f00\u59cb\u65f6\u95f4\uff0c for example: 2004-12-25 11:25:56\n--stop-datetime=name \uff1a\u7ed3\u675f\u65f6\u95f4\uff0c for example: 2004-12-25 11:25:56\n--start-position=# \uff1a\u4ece\u4e8c\u8fdb\u5236\u65e5\u5fd7\u4e2d\u8bfb\u53d6\u6307\u5b9aposition \u4e8b\u4ef6\u4f4d\u7f6e\u4f5c\u4e3a\u5f00\u59cb\n--stop-position=# \uff1a\u4ece\u4e8c\u8fdb\u5236\u65e5\u5fd7\u4e2d\u8bfb\u53d6\u6307\u5b9aposition \u4e8b\u4ef6\u4f4d\u7f6e\u4f5c\u4e3a\u4e8b\u4ef6\u622a\u81f3\n<\/code><\/pre>\n<p>binlog events<\/p>\n<pre><code class=\"language-txt line-numbers\">mysql&gt;\u00a0show binlog events [IN 'log_name'] [FROM pos] [LIMIT [offset,] row_count]; \n\u53c2\u6570\u63cf\u8ff0\nIN 'log_name':\u6307\u5b9a\u8981\u67e5\u8be2\u7684binlog\u6587\u4ef6\u540d\uff08\u4e0d\u6307\u5b9a\u5c31\u662f\u7b2c\u4e00\u4e2abinlog\u6587\u4ef6\uff09\nFROM pos:\u6307\u5b9a\u4ece\u54ea\u4e2apos\u8d77\u59cb\u70b9\u5f00\u59cb\u67e5\u8d77\uff08\u4e0d\u6307\u5b9a\u5c31\u662f\u4ece\u6574\u4e2a\u6587\u4ef6\u9996\u4e2apos\u70b9\u5f00\u59cb\u7b97\uff09\nLIMIT [offset]\uff1a\u504f\u79fb\u91cf(\u4e0d\u6307\u5b9a\u5c31\u662f0)\nrow_count :\u67e5\u8be2\u603b\u6761\u6570\uff08\u4e0d\u6307\u5b9a\u5c31\u662f\u6240\u6709\u884c\uff09\n<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/isvm-blogs.oss-cn-shanghai.aliyuncs.com\/static\/imgs\/mysql\/binlog_events.png\" alt=\"\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u65e5\u5fd7\u7c7b\u578b \u63cf\u8ff0 \u9519\u8bef\u65e5\u5fd7 \uff08Error Log\uff09 \u8be5\u65e5\u5fd7\u6587\u4ef6\u4f1a\u8bb0\u5f55 MySQL \u670d\u52a1\u5668\u7684\u542f\u52a8\u3001\u5173\u95ed\u548c\u8fd0\u884c\u9519\u8bef\u7b49 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[],"_links":{"self":[{"href":"https:\/\/www.isvmspace.com\/index.php?rest_route=\/wp\/v2\/posts\/213"}],"collection":[{"href":"https:\/\/www.isvmspace.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.isvmspace.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.isvmspace.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.isvmspace.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=213"}],"version-history":[{"count":6,"href":"https:\/\/www.isvmspace.com\/index.php?rest_route=\/wp\/v2\/posts\/213\/revisions"}],"predecessor-version":[{"id":219,"href":"https:\/\/www.isvmspace.com\/index.php?rest_route=\/wp\/v2\/posts\/213\/revisions\/219"}],"wp:attachment":[{"href":"https:\/\/www.isvmspace.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=213"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.isvmspace.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=213"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.isvmspace.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=213"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}