{"id":491,"date":"2021-06-24T11:33:46","date_gmt":"2021-06-24T03:33:46","guid":{"rendered":"https:\/\/blog.73007300.xyz\/?p=491"},"modified":"2021-06-24T11:33:46","modified_gmt":"2021-06-24T03:33:46","slug":"mysql%e7%89%b9%e6%ae%8a%e6%9f%a5%e8%af%a2%e6%8a%80%e5%b7%a7","status":"publish","type":"post","link":"https:\/\/blog.73007300.xyz\/?p=491","title":{"rendered":"Mysql\u7279\u6b8a\u67e5\u8be2\u6280\u5de7"},"content":{"rendered":"<div>\n    \u4eca\u5929\u6709\u4e2a\u7fa4\u53cb\u5728\u7fa4\u91cc\u63d0\u51fa\u4e86\u7c7b\u4f3c\u7684\u7591\u95ee\uff1a<\/div>\n<div data-mode=\"Python\" data-theme=\"default\">\n<pre><code>select * from USER_PRIVILEGES where GRANTEE = char(111)+char(1);\n+---------------------------+---------------+--------------------------+--------------+\n| GRANTEE                   | TABLE_CATALOG | PRIVILEGE_TYPE           | IS_GRANTABLE |\n+---------------------------+---------------+--------------------------+--------------+\n| 'mariadb.sys'@'localhost' | def           | USAGE                    | NO           |\n| 'mysql'@'localhost'       | def           | SELECT                   | YES          |\n| 'mysql'@'localhost'       | def           | INSERT                   | YES          |\n| 'mysql'@'localhost'       | def           | UPDATE                   | YES          |\n| 'mysql'@'localhost'       | def           | DELETE                   | YES          |\n| 'mysql'@'localhost'       | def           | CREATE                   | YES          |\n...<\/code><\/pre>\n<\/div>\n<div>&nbsp;GRANTEE = char(111)+char(1) \u53ef\u4ee5\u67e5\u51fa\u5168\u7ed3\u679c\u3002<\/div>\n<div>\u601d\u8003\u4e86\u4e00\u4e0b\uff0c\u53d1\u73b0\u633a\u6709\u8da3\u7684\u3002\u8bb0\u5f55\u4e0b\u6765\u3002<\/div>\n<div>char(1)+char(1) \u8868\u793a0<\/div>\n<div data-mode=\"SQL\" data-theme=\"default\">\n<pre><code> select (char(1)+char(1)) from USER_PRIVILEGES;\n+-------------------+\n| (char(1)+char(1)) |\n+-------------------+\n|                 0 |\n|                 0 |\n|                 0 |<\/code><\/pre>\n<\/div>\n<div><span>GRANTEE<\/span>=0 \u8868\u793a1<\/div>\n<div data-mode=\"SQL\" data-theme=\"default\">\n<pre><code>select GRANTEE=0 from USER_PRIVILEGES;\n+-----------+\n| GRANTEE=0 |\n+-----------+\n|         1 |\n|         1 |\n|         1 |<\/code><\/pre>\n<\/div>\n<div><\/div>\n<div>where 1 \u8868\u793a\u5168\u7ed3\u679c<\/div>\n<div data-mode=\"SQL\" data-theme=\"default\">\n<pre><code>select count(*) from USER_PRIVILEGES where 1;\n+----------+\n| count(*) |\n+----------+\n|       77 |\n+----------+<\/code><\/pre>\n<\/div>\n<div>\u56e0\u6b64\u5c31\u53ef\u4ee5\u7528 GRANTEE = char(111)+char(1) \u67e5\u51fa\u5168\u7ed3\u679c\u4e86\uff0c\u6709\u70b9\u7ed5\u3002<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u4eca\u5929\u6709\u4e2a\u7fa4\u53cb\u5728\u7fa4\u91cc\u63d0\u51fa\u4e86\u7c7b\u4f3c\u7684\u7591\u95ee\uff1a select * from USER_PRIVILEGES where GRANTEE = char(111)+char(1); +&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8211;+ | GRANTEE | TABLE_CATALOG | PRIVILEGE_TYPE | IS_GRANTABLE | +&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8211;+ | &#8216;mariadb.sys&#8217;@&#8217;localhost&#8217; | def | USAGE | NO | | &#8216;mysql&#8217;@&#8217;localhost&#8217; | def | SELECT | YES | | &#8216;mysql&#8217;@&#8217;localhost&#8217; | def | INSERT | YES | | &#8216;mysql&#8217;@&#8217;localhost&#8217; | def | UPDATE | YES [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.73007300.xyz\/index.php?rest_route=\/wp\/v2\/posts\/491"}],"collection":[{"href":"https:\/\/blog.73007300.xyz\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.73007300.xyz\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.73007300.xyz\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.73007300.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=491"}],"version-history":[{"count":1,"href":"https:\/\/blog.73007300.xyz\/index.php?rest_route=\/wp\/v2\/posts\/491\/revisions"}],"predecessor-version":[{"id":492,"href":"https:\/\/blog.73007300.xyz\/index.php?rest_route=\/wp\/v2\/posts\/491\/revisions\/492"}],"wp:attachment":[{"href":"https:\/\/blog.73007300.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=491"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.73007300.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=491"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.73007300.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=491"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}