{"id":469,"date":"2020-07-10T12:31:35","date_gmt":"2020-07-10T04:31:35","guid":{"rendered":"http:\/\/www.gbase8.cn\/?p=469"},"modified":"2021-03-08T09:53:31","modified_gmt":"2021-03-08T01:53:31","slug":"gbase-8a%e9%9b%86%e7%be%a4%e6%95%b0%e6%8d%ae%e5%ba%93%e7%94%a8%e6%88%b7%e5%af%86%e7%a0%81%e8%bf%87%e6%9c%9f%e5%8a%9f%e8%83%bd","status":"publish","type":"post","link":"https:\/\/www.gbase8.cn\/en\/469","title":{"rendered":"\u5357\u5927\u901a\u7528GBase 8a\u96c6\u7fa4\u6570\u636e\u5e93\u7528\u6237\u5bc6\u7801\u8fc7\u671f\u529f\u80fd"},"content":{"rendered":"<p>GBase 8a\u96c6\u7fa4\u6570\u636e\u5e93\u7528\u6237\u5bc6\u7801\u8fc7\u671f\u529f\u80fdpassword expire<\/p>\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-6a2d50676e8cc\" 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-6a2d50676e8cc\"  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\/469\/#%E5%8D%95%E7%8B%AC%E8%AE%BE%E7%BD%AE%E4%B8%80%E6%AE%B5%E6%97%B6%E9%97%B4\" >\u5355\u72ec\u8bbe\u7f6e\u4e00\u6bb5\u65f6\u95f4<\/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\/469\/#%E8%AE%BE%E7%BD%AE%E7%AB%8B%E5%8D%B3%E8%BF%87%E6%9C%9F\" >\u8bbe\u7f6e\u7acb\u5373\u8fc7\u671f<\/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\/469\/#%E6%9F%A5%E7%9C%8B%E5%AF%86%E7%A0%81%E8%BF%87%E6%9C%9F%E6%97%B6%E9%97%B4\" >\u67e5\u770b\u5bc6\u7801\u8fc7\u671f\u65f6\u95f4<\/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\/469\/#%E6%B5%8B%E8%AF%95%E8%BF%87%E6%9C%9F%E7%94%A8%E6%88%B7\" >\u6d4b\u8bd5\u8fc7\u671f\u7528\u6237<\/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\/469\/#%E6%9B%B4%E6%94%B9%E6%96%B0%E5%AF%86%E7%A0%81%E5%90%8E%E5%8F%AF%E7%BB%A7%E7%BB%AD%E4%BD%BF%E7%94%A8\" >\u66f4\u6539\u65b0\u5bc6\u7801\u540e\u53ef\u7ee7\u7eed\u4f7f\u7528<\/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\/469\/#JDBC%E4%BF%AE%E6%94%B9%E5%AF%86%E7%A0%81\" >JDBC\u4fee\u6539\u5bc6\u7801<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E5%8D%95%E7%8B%AC%E8%AE%BE%E7%BD%AE%E4%B8%80%E6%AE%B5%E6%97%B6%E9%97%B4\"><\/span>\u5355\u72ec\u8bbe\u7f6e\u4e00\u6bb5\u65f6\u95f4<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>gbase> alter user testdb password expire interval 100 day;\r\nQuery OK, 0 rows affected (Elapsed: 00:00:00.01)\r\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E8%AE%BE%E7%BD%AE%E7%AB%8B%E5%8D%B3%E8%BF%87%E6%9C%9F\"><\/span>\u8bbe\u7f6e\u7acb\u5373\u8fc7\u671f<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>gbase> alter user masked password expire;\r\nQuery OK, 0 rows affected (Elapsed: 00:00:00.21)\r\ngbase> ^CAborted<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E6%9F%A5%E7%9C%8B%E5%AF%86%E7%A0%81%E8%BF%87%E6%9C%9F%E6%97%B6%E9%97%B4\"><\/span>\u67e5\u770b\u5bc6\u7801\u8fc7\u671f\u65f6\u95f4<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>null\u7b49\u4e8enever\u4e0d\u4f1a\u8fc7\u671f\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>gbase> select trim(user),password_life_time from gbase.user_check;\r\n+------------+--------------------+\r\n| trim(user) | password_life_time |\r\n+------------+--------------------+\r\n| root       |               NULL |\r\n| gbase      |               NULL |\r\n| uservc1    |               NULL |\r\n| testdb     |                100 |\r\n+------------+--------------------+\r\n4 rows in set (Elapsed: 00:00:00.00)\r\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E6%B5%8B%E8%AF%95%E8%BF%87%E6%9C%9F%E7%94%A8%E6%88%B7\"><\/span>\u6d4b\u8bd5\u8fc7\u671f\u7528\u6237<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>-- \u6d4b\u8bd5\u8fc7\u671f\u7528\u6237\r\n&#91;root@gbase86_1 zxq]# gccli -umasked -pmasked\r\nGBase client 8.6.2.38-R1.105911. Copyright (c) 2004-2018, GBase. All Rights Reserved.\r\n\r\n-- \u8fd0\u884c\u4e00\u822cSQL\u62a5\u9519\r\ngbase> use testdb;\r\nERROR 1834 (HY000): You must reset your password using ALTER USER statement before executing this statement.<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E6%9B%B4%E6%94%B9%E6%96%B0%E5%AF%86%E7%A0%81%E5%90%8E%E5%8F%AF%E7%BB%A7%E7%BB%AD%E4%BD%BF%E7%94%A8\"><\/span>\u66f4\u6539\u65b0\u5bc6\u7801\u540e\u53ef\u7ee7\u7eed\u4f7f\u7528<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>-- \u66f4\u6539\u5bc6\u7801SQL\u53ef\u4ee5\u8fd0\u884c\r\ngbase> set password=password('masked');\r\nQuery OK, 0 rows affected (Elapsed: 00:00:00.05)\r\n\r\n-- \u66f4\u6539\u540e\uff0c\u5f53\u524d\u8fde\u63a5\u4e0d\u751f\u6548\uff0c\u9700\u8981\u91cd\u65b0\u767b\u9646(\u7528\u4e86\u8fde\u63a5\u6c60\u7684\u8bdd\uff0c\u8001\u7684\u8fde\u63a5\u6bcf\u4e2a\u90fd\u8981\u5173\u95ed\u91cd\u8fde\uff09\r\ngbase> use testdb;\r\nERROR 1834 (HY000): You must reset your password using ALTER USER statement before executing this statement.\r\ngbase> flush privileges;\r\nERROR 1834 (HY000): You must reset your password using ALTER USER statement before executing this statement.\r\ngbase> ^CAborted\r\n\r\n-- \u91cd\u65b0\u767b\u9646\r\n&#91;root@gbase86_1 zxq]# gccli -umasked -pmasked\r\nGBase client 8.6.2.38-R1.105911. Copyright (c) 2004-2018, GBase. All Rights Reserved.\r\n\r\n-- \u6267\u884cSQL\u6210\u529f\r\ngbase> use testdb;\r\nQuery OK, 0 rows affected (Elapsed: 00:00:00.08)<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"JDBC%E4%BF%AE%E6%94%B9%E5%AF%86%E7%A0%81\"><\/span>JDBC\u4fee\u6539\u5bc6\u7801<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<pre class=\"wp-block-preformatted\">JDBC\u4fee\u6539\u9700\u8981\u7528\u65b0\u7248\u7684jar\u4fee\u6539\u5bc6\u7801\ngbase-connector-java-8.3.81.53-build55.4.1-bin\n\u5982\u4e0b\u65b9\u6cd5\u4fee\u6539<\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>import com.gbase.jdbc.util.PasswordChangeUtil;\n\nString url = \"jdbc:gbase:\/\/192.168.163.101:5258\/testdb?user=testdb&amp;password=testdb\";\n\/\/ changePasswordNormal(url, \"testdb\", \"testdb\", \"testdb2\");\nPasswordChangeUtil.changePassword(url, \"testdb2\");\n<\/code><\/pre>\n\n\n\n<p><\/p>","protected":false},"excerpt":{"rendered":"<p>\u5357\u5927\u901a\u7528GBase 8a\u96c6\u7fa4\u6570\u636e\u5e93\u7528\u6237\u5bc6\u7801\u8fc7\u671f\u529f\u80fd\u6d4b\u8bd5password expire<\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[31],"class_list":["post-469","post","type-post","status-publish","format-standard","hentry","category-gbase8a","tag-31"],"_links":{"self":[{"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/posts\/469","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=469"}],"version-history":[{"count":9,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/posts\/469\/revisions"}],"predecessor-version":[{"id":5047,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/posts\/469\/revisions\/5047"}],"wp:attachment":[{"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/media?parent=469"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/categories?post=469"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/tags?post=469"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}