{"id":400,"date":"2021-05-06T23:28:03","date_gmt":"2021-05-06T15:28:03","guid":{"rendered":"https:\/\/22pig.com\/?p=400"},"modified":"2021-05-06T23:28:03","modified_gmt":"2021-05-06T15:28:03","slug":"mysql%ef%bc%88mariadb%ef%bc%89%e6%96%b0%e5%bb%ba%e7%94%a8%e6%88%b7%e5%8f%8a%e7%94%a8%e6%88%b7%e6%8e%88%e6%9d%83%e7%ae%a1%e7%90%86","status":"publish","type":"post","link":"http:\/\/22pig.com\/?p=400","title":{"rendered":"mysql\uff08mariadb\uff09\u65b0\u5efa\u7528\u6237\u53ca\u7528\u6237\u6388\u6743\u7ba1\u7406"},"content":{"rendered":"<p>mysql\uff08mariadb\uff09\u65b0\u5efa\u7528\u6237\u53ca\u7528\u6237\u6388\u6743\u7ba1\u7406<\/p>\n<p>create user newuser@localhost identified by <span class=\"hljs-string\">&#8216;123456&#8217;<\/span>;<\/p>\n<p>\u67e5\u770b\u7528\u6237\u6743\u9650<\/p>\n<pre class=\"prettyprint codeblock\"><code class=\"hljs asciidoc vhdl\">MariaDB [(none)]&gt; show grants <span class=\"hljs-keyword\">for<\/span> my@localhost;\n<span class=\"hljs-code\">+<span class=\"hljs-comment\">--------------------------------------------------------------------------------------------------------------------+<\/span><\/span>\n<span class=\"hljs-header\">| Grants <span class=\"hljs-keyword\">for<\/span> my@localhost                                                                                            |\n+<span class=\"hljs-comment\">--------------------------------------------------------------------------------------------------------------------+<\/span><\/span>\n<span class=\"hljs-header\">| GRANT <span class=\"hljs-keyword\">ALL<\/span> PRIVILEGES <span class=\"hljs-keyword\">ON<\/span> *.* <span class=\"hljs-keyword\">TO<\/span> <span class=\"hljs-symbol\">'my<\/span>'@<span class=\"hljs-symbol\">'localhost<\/span>' IDENTIFIED BY PASSWORD '*<span class=\"hljs-number\">6<\/span>BB4837EB74329105EE4568DDA7DC67ED2CA2AD9' |\n+<span class=\"hljs-comment\">--------------------------------------------------------------------------------------------------------------------+<\/span><\/span>\n<span class=\"hljs-number\">1<\/span> row <span class=\"hljs-keyword\">in<\/span> set (<span class=\"hljs-number\">0.00<\/span> sec)\n\nMariaDB [(none)]&gt; \n<\/code><\/pre>\n<p>\u6307\u5b9a\u6388\u6743(\u5168\u90e8\u6743\u9650)<\/p>\n<pre class=\"prettyprint codeblock\"><code class=\"hljs sql\"> <span class=\"hljs-operator\"><span class=\"hljs-keyword\">grant<\/span> <span class=\"hljs-keyword\">insert<\/span>,<span class=\"hljs-keyword\">update<\/span>,<span class=\"hljs-keyword\">delete<\/span>,<span class=\"hljs-keyword\">select<\/span> <span class=\"hljs-keyword\">on<\/span> *.* <span class=\"hljs-keyword\">to<\/span> mytest@localhost;<\/span><\/code><\/pre>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>mysql\uff08mariadb\uff09\u65b0\u5efa\u7528\u6237\u53ca\u7528\u6237\u6388\u6743\u7ba1\u7406 create user newuser@localhost identified by &#8216;123456&#8217;; \u67e5\u770b\u7528\u6237\u6743\u9650 MariaDB [(none)]&gt; show grants for my@localhost; +&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+ | Grants for my@localhost | +&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+ | GRANT ALL PRIVILEGES ON *.* TO &#8216;my&#8217;@&#8217;localhost&#8217; IDENTIFIED BY PASSWORD &#8216;*6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9&#8217; | +&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+ 1 row in set (0.00 sec) MariaDB [(none)]&gt; \u6307\u5b9a\u6388\u6743(\u5168\u90e8\u6743\u9650) grant insert,update,delete,select on *.* to mytest@localhost; &nbsp; &nbsp;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15],"tags":[],"class_list":["post-400","post","type-post","status-publish","format-standard","hentry","category-mysql"],"_links":{"self":[{"href":"http:\/\/22pig.com\/index.php?rest_route=\/wp\/v2\/posts\/400","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/22pig.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/22pig.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/22pig.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/22pig.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=400"}],"version-history":[{"count":0,"href":"http:\/\/22pig.com\/index.php?rest_route=\/wp\/v2\/posts\/400\/revisions"}],"wp:attachment":[{"href":"http:\/\/22pig.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=400"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/22pig.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=400"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/22pig.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=400"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}