{"id":467,"date":"2020-07-10T12:27:51","date_gmt":"2020-07-10T04:27:51","guid":{"rendered":"http:\/\/www.gbase8.cn\/?p=467"},"modified":"2021-03-08T09:01:37","modified_gmt":"2021-03-08T01:01:37","slug":"gbase-8a%e9%9b%86%e7%be%a4%e5%88%9b%e5%bb%ba%e7%94%a8%e6%88%b7create-user%e5%ae%8c%e6%95%b4%e8%af%ad%e6%b3%95","status":"publish","type":"post","link":"https:\/\/www.gbase8.cn\/en\/467","title":{"rendered":"\u5357\u5927\u901a\u7528GBase 8a\u96c6\u7fa4\u521b\u5efa\u7528\u6237create user\u5b8c\u6574\u8bed\u6cd5"},"content":{"rendered":"<pre id=\"block-2a946a08-10b5-4d04-bd1e-74a06ca1d79b\" class=\"wp-block-preformatted\">\u672c\u6587\u4ecb\u7ecdGBase 8a\u6570\u636e\u5e93\u96c6\u7fa4\u91cc\uff0c\u521b\u5efa\u6570\u636e\u5e93\u7528\u6237\u7684\u5b8c\u6574\u8bed\u6cd5\u3002\u540c\u65f6\u4e5f\u5305\u62ec\u4e00\u4e9b\u9ed8\u8ba4\u53c2\u6570\u914d\u7f6e\u3002<\/pre>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_84 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Directory Navigation<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-6a2b0b99511d5\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewbox=\"0 0 24 24\" version=\"1.2\" baseprofile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-6a2b0b99511d5\"  aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.gbase8.cn\/en\/467\/#%E8%AF%AD%E6%B3%95\" >\u8bed\u6cd5<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.gbase8.cn\/en\/467\/#%E8%AF%B4%E6%98%8E\" >\u8bf4\u660e<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.gbase8.cn\/en\/467\/#%E6%9F%A5%E7%9C%8B\" >\u67e5\u770b<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.gbase8.cn\/en\/467\/#%E6%A0%B7%E4%BE%8B\" >\u6837\u4f8b<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.gbase8.cn\/en\/467\/#%E8%AE%BE%E7%BD%AE%E9%BB%98%E8%AE%A4VC\" >\u8bbe\u7f6e\u9ed8\u8ba4VC<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.gbase8.cn\/en\/467\/#%E5%8F%82%E8%80%83\" >\u53c2\u8003<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E8%AF%AD%E6%B3%95\"><\/span>\u8bed\u6cd5<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>CREATE\/ALTER USER\nuser &#91;auth_option]\n&#91;require {NONE | tls_option} ]\n&#91;expiration_option | lock_option | host_option] \u2026\nauth_option: {\n    IDENTIFIED BY 'auth_string'\n  | IDENTIFIED WITH auth_plugin\n  | IDENTIFIED WITH auth_plugin BY 'auth_string'\n  | IDENTIFIED WITH auth_plugin AS 'auth_string'\n  | IDENTIFIED BY PASSWORD 'auth_string'\n}\n\ntls_option: {\n   SSL\n | X509\n | CIPHER 'cipher'\n | ISSUER 'issuer'\n | SUBJECT 'subject'\n}\n\nexpiration_option: {\nPASSWORD EXPIRE\n| PASSWORD EXPIRE DEFAULT\n| PASSWORD EXPIRE NEVER\n| PASSWORD EXPIRE INTERVAL N DAY\n}\nlock_option: {\nACCOUNT LOCK\n| ACCOUNT UNLOCK\n}\nhost_option: {\nhosts 'host_list'\n}<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E8%AF%B4%E6%98%8E\"><\/span>\u8bf4\u660e<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>auth_option  \u5bc6\u7801\u8ba4\u8bc1\u65b9\u6cd5<br>tls_option \u662f\u5426\u542f\u7528\u901a\u4fe1\u52a0\u5bc6<br>expiration_option \u8fc7\u671f\u8bbe\u7f6e<br>lock_option \u8d26\u53f7\u9501\u5b9a\u8bbe\u7f6e<br>host_option \u4e3b\u673a\u8bbe\u7f6e<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E6%9F%A5%E7%9C%8B\"><\/span>\u67e5\u770b<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<pre id=\"block-2a946a08-10b5-4d04-bd1e-74a06ca1d79b\" class=\"wp-block-preformatted\">\u4ecegbase.user\u8868\uff0c\u53ef\u4ee5\u67e5\u770b\u5230\u7528\u6237\u7684\u57fa\u672c\u4fe1\u606f\u3002<br>\u4ecegbase.user_check\u7cfb\u7edf\u8868\u4e2d\u53ef\u4ee5\u67e5\u8be2\u5230\u7528\u6237\u5b89\u5168\u4fe1\u606f\u3002<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E6%A0%B7%E4%BE%8B\"><\/span>\u6837\u4f8b<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<pre id=\"block-2a946a08-10b5-4d04-bd1e-74a06ca1d79b\" class=\"wp-block-preformatted\">expire\u540e\u9762\u4e0d\u5199\u53c2\u6570\uff0c\u4ee3\u8868\u7acb\u5373\u8fc7\u671f<\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>create user testdb identified by 'testdb'\n password expire<\/code><\/pre>\n\n\n\n<pre id=\"block-2a946a08-10b5-4d04-bd1e-74a06ca1d79b\" class=\"wp-block-preformatted\">host_list \u662f\u3010\u7a7a\u683c\u3011\u5206\u5272\u7684IP\u5217\u8868\uff0c\u5141\u8bb8\u201c%\u201d\u548c\u201c_\u201d\u505a\u901a\u914d\u7b26\u3002\u6ce8\u610f\u672c\u673a\u767b\u9646\u8981\u589e\u52a0localhost\u53c2\u6570<\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>create user testdb identified by 'testdb' hosts \"localhost 192.168.250.100 192.168.250.101';<\/code><\/pre>\n\n\n\n<pre id=\"block-2a946a08-10b5-4d04-bd1e-74a06ca1d79b\" class=\"wp-block-preformatted\">\u5b8c\u6574\u4f8b\u5b50\uff0c\u6ce8\u610f\u5176\u4e2d\u7684reqire ssl\u5982\u679c\u4f60\u4e0d\u5e0c\u671b\u7528ssl\u8fde\u63a5\uff0c\u5219\u4e0d\u8981\u586b\u5199\uff0c\u6b64\u5904\u53ea\u662f\u4e2a\u4f8b\u5b50\u3002\n<a href=\"https:\/\/www.gbase8.cn\/en\/224\/\">\u53c2\u8003 GBase 8a\u96c6\u7fa4SSL\u914d\u7f6e-\u5f3a\u5236\u7528\u6237\u7528SSL<\/a><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>gbase&gt; create user uservc1 identified by 'uservc1' require ssl password expire default account unlock hosts 'localhost 10.0.2.%';\nQuery OK, 0 rows affected (Elapsed: 00:00:00.03)\n\ngbase&gt;\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E8%AE%BE%E7%BD%AE%E9%BB%98%E8%AE%A4VC\"><\/span>\u8bbe\u7f6e\u9ed8\u8ba4VC<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>\u5728V95\u96c6\u7fa4\u91cc\uff0c\u901a\u8fc7\u5982\u4e0b\u547d\u4ee4\u8bbe\u7f6e\u9ed8\u8ba4\u7684VC<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>set default_vc for user_name = vc_name<\/code><\/pre>\n\n\n\n<p>\u8fd0\u884c\u6548\u679c<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>gbase&gt; set default_vc for uservc1 =vc01;\nQuery OK, 0 rows affected (Elapsed: 00:00:00.00)\n\ngbase&gt;\n<\/code><\/pre>\n\n\n\n<p>\u66f4\u591a\u7ec6\u8282\u8bf7\u53c2\u8003 <a href=\"https:\/\/www.gbase8.cn\/en\/5019\/\">GBase 8a V95\u8bbe\u7f6e\u66f4\u6539\u6570\u636e\u5e93\u7528\u6237\u9ed8\u8ba4VC\u7684\u65b9\u6cd5<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E5%8F%82%E8%80%83\"><\/span>\u53c2\u8003<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<pre id=\"block-65aafc45-da98-4c45-bc5e-78b9ffc93def\" class=\"wp-block-preformatted\"><a href=\"https:\/\/www.gbase8.cn\/en\/224\/\">GBase 8a\u96c6\u7fa4SSL\u914d\u7f6e-\u5f3a\u5236\u7528\u6237\u7528SSL<\/a>\n<a href=\"https:\/\/www.gbase8.cn\/en\/2394\/\">GBase 8a\u7528\u6237\u89d2\u8272role\u3001\u7528\u6237\u7ec4\u7684\u7ba1\u7406<\/a>\n<a href=\"https:\/\/www.gbase8.cn\/en\/2386\/\">GBase 8a\u5b9e\u73b0\u7528\u6237\u78c1\u76d8\u7a7a\u95f4\u914d\u989d\u9650\u5236<\/a>\n<a href=\"https:\/\/www.gbase8.cn\/en\/845\/\">GBase 8a\u6570\u636e\u5e93\u7528\u6237\u5143\u6570\u636e\u8868gbase.user\u67e5\u770b<\/a><\/pre>","protected":false},"excerpt":{"rendered":"<p>\u672c\u6587\u4ecb\u7ecdGBase 8a\u6570\u636e\u5e93\u96c6\u7fa4\u91cc\uff0c\u521b\u5efa\u6570\u636e\u5e93\u7528\u6237\u7684\u5b8c\u6574\u8bed\u6cd5\u3002\u540c\u65f6\u4e5f\u5305\u62ec\u4e00\u4e9b\u9ed8\u8ba4\u53c2\u6570\u914d\u7f6e\u3002<\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-467","post","type-post","status-publish","format-standard","hentry","category-gbase8a"],"_links":{"self":[{"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/posts\/467","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/comments?post=467"}],"version-history":[{"count":10,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/posts\/467\/revisions"}],"predecessor-version":[{"id":5023,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/posts\/467\/revisions\/5023"}],"wp:attachment":[{"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/media?parent=467"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/categories?post=467"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/tags?post=467"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}