{"id":18047,"date":"2013-09-30T12:22:17","date_gmt":"2013-09-30T04:22:17","guid":{"rendered":"https:\/\/2blog.ilc.edu.tw\/25793\/2013\/09\/30\/mysql-server-%e5%ae%89%e8%a3%9d%e5%be%8c%e7%9a%84%e8%a8%ad%e5%ae%9a\/"},"modified":"2013-09-30T12:22:17","modified_gmt":"2013-09-30T04:22:17","slug":"mysql-server-%e5%ae%89%e8%a3%9d%e5%be%8c%e7%9a%84%e8%a8%ad%e5%ae%9a","status":"publish","type":"post","link":"https:\/\/2blog.ilc.edu.tw\/25793\/2013\/09\/30\/mysql-server-%e5%ae%89%e8%a3%9d%e5%be%8c%e7%9a%84%e8%a8%ad%e5%ae%9a\/","title":{"rendered":"MySQL Server \u5b89\u88dd\u5f8c\u7684\u8a2d\u5b9a"},"content":{"rendered":"<p>MySQL Server\u00a0\u5b89\u88dd\u4e4b\u5f8c\uff0c\u9664\u4e86\u8981\u8a2d\u5b9a\u7ba1\u7406\u8005 root\u00a0\u7684\u5bc6\u78bc\u5916\uff0c\u6700\u597d\u4e5f\u8981\u628a\u4e00\u4e9b\u7528\u4e0d\u5230\u7684\u8cc7\u6599\u5eab \/\u00a0\u8868\u52a0\u4ee5\u79fb\u9664\uff0c\u4e26\u52a0\u4e0a\u4e00\u4e9b\u6b0a\u9650\u7684\u8a2d\u5b9a\uff0c\u9019\u4e9b\u7e41\u96dc\u7684\u8a2d\u5b9a\uff0c\u53ef\u4ee5\u4f7f\u7528 mysql_secure_installation\u00a0\u4f86\u89e3\u6c7a\u3002[@more@]# <span style=\"color: #ff0000;\">\/usr\/bin\/mysql_secure_installation<\/span><\/p>\n<p><span style=\"color: #0000ff;\">NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL<\/span><br \/><span style=\"color: #0000ff;\">\u00a0\u00a0\u00a0\u00a0\u00a0 SERVERS IN PRODUCTION USE!\u00a0 PLEASE READ EACH STEP CAREFULLY!<\/span><\/p>\n<p><span style=\"color: #0000ff;\">In order to log into MySQL to secure it, we&#8217;ll need the current<\/span><br \/><span style=\"color: #0000ff;\">password for the root user.\u00a0 If you&#8217;ve just installed MySQL, and<\/span><br \/><span style=\"color: #0000ff;\">you haven&#8217;t set the root password yet, the password will be blank,<\/span><br \/><span style=\"color: #0000ff;\">so you should just press enter here.<\/span><\/p>\n<p>#\u00a0\u8f38\u5165 root\u00a0\u7684\u5bc6\u78bc\uff0c\u5982\u679c\u6c92\u6709\u8a2d\u5b9a\u904e\uff0c\u76f4\u63a5\u6309 Enter\u00a0\u9375\u5373\u53ef<br \/><span style=\"color: #0000ff;\">Enter current password for root (enter for none):<\/span><br \/><span style=\"color: #0000ff;\">OK, successfully used password, moving on&#8230;<\/span><\/p>\n<p><span style=\"color: #0000ff;\">Setting the root password ensures that nobody can log into the MySQL<\/span><br \/><span style=\"color: #0000ff;\">root user without the proper authorisation.<\/span><\/p>\n<p>#\u00a0\u8a2d\u5b9a root\u00a0\u7684\u5bc6\u78bc<br \/><span style=\"color: #0000ff;\">Set root password? [Y\/n] <span style=\"color: #ff0000;\">y<\/span><\/span><br \/><span style=\"color: #0000ff;\">New password:<\/span><br \/><span style=\"color: #0000ff;\">Re-enter new password:<\/span><br \/><span style=\"color: #0000ff;\">Password updated successfully!<\/span><br \/><span style=\"color: #0000ff;\">Reloading privilege tables..<\/span><br \/><span style=\"color: #0000ff;\">\u00a0&#8230; Success!<\/span><\/p>\n<p><span style=\"color: #0000ff;\">By default, a MySQL installation has an anonymous user, allowing anyone<\/span><br \/><span style=\"color: #0000ff;\">to log into MySQL without having to have a user account created for<\/span><br \/><span style=\"color: #0000ff;\">them.\u00a0 This is intended only for testing, and to make the installation<\/span><br \/><span style=\"color: #0000ff;\">go a bit smoother.\u00a0 You should remove them before moving into a<\/span><br \/><span style=\"color: #0000ff;\">production environment.<\/span><\/p>\n<p>#\u00a0\u79fb\u9664 anonymous\u00a0\u4f7f\u7528\u8005<br \/><span style=\"color: #0000ff;\">Remove anonymous users? [Y\/n] <span style=\"color: #ff0000;\">y<\/span><\/span><br \/><span style=\"color: #0000ff;\">\u00a0&#8230; Success!<\/span><\/p>\n<p><span style=\"color: #0000ff;\">Normally, root should only be allowed to connect from &#8216;localhost&#8217;.\u00a0 This<\/span><br \/><span style=\"color: #0000ff;\">ensures that someone cannot guess at the root password from the network.<\/span><\/p>\n<p>#\u00a0\u53d6\u6d88 root\u00a0\u9060\u7aef\u767b\u5165<br \/><span style=\"color: #0000ff;\">Disallow root login remotely? [Y\/n] <span style=\"color: #ff0000;\">y<\/span><\/span><br \/><span style=\"color: #0000ff;\">\u00a0&#8230; Success!<\/span><\/p>\n<p><span style=\"color: #0000ff;\">By default, MySQL comes with a database named &#8216;test&#8217; that anyone can<\/span><br \/><span style=\"color: #0000ff;\">access.\u00a0 This is also intended only for testing, and should be removed<\/span><br \/><span style=\"color: #0000ff;\">before moving into a production environment.<\/span><\/p>\n<p>#\u00a0\u79fb\u9664 test\u00a0\u8cc7\u6599\u8868<br \/><span style=\"color: #0000ff;\">Remove test database and access to it? [Y\/n] <span style=\"color: #ff0000;\">y<\/span><\/span><br \/><span style=\"color: #0000ff;\">\u00a0&#8211; Dropping test database&#8230;<\/span><br \/><span style=\"color: #0000ff;\">\u00a0&#8230; Success!<\/span><br \/><span style=\"color: #0000ff;\">\u00a0&#8211; Removing privileges on test database&#8230;<\/span><br \/><span style=\"color: #0000ff;\">\u00a0&#8230; Success!<\/span><\/p>\n<p><span style=\"color: #0000ff;\">Reloading the privilege tables will ensure that all changes made so far<\/span><br \/><span style=\"color: #0000ff;\">will take effect immediately.<\/span><\/p>\n<p>#\u00a0\u91cd\u65b0\u8f09\u5165\u8cc7\u6599\u8868\u6b0a\u9650<br \/><span style=\"color: #0000ff;\">Reload privilege tables now? [Y\/n] <span style=\"color: #ff0000;\">y<\/span><\/span><br \/><span style=\"color: #0000ff;\">\u00a0&#8230; Success!<\/span><\/p>\n<p><span style=\"color: #0000ff;\">Cleaning up&#8230;<\/span><\/p>\n<p><span style=\"color: #0000ff;\">All done!\u00a0 If you&#8217;ve completed all of the above steps, your MySQL<\/span><br \/><span style=\"color: #0000ff;\">installation should now be secure.<\/span><\/p>\n<p><span style=\"color: #0000ff;\">Thanks for using MySQL!<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>MySQL Server\u00a0\u5b89\u88dd\u4e4b\u5f8c\uff0c\u9664\u4e86\u8981\u8a2d\u5b9a\u7ba1\u7406\u8005 root\u00a0\u7684\u5bc6\u78bc\u5916\uff0c\u6700\u597d\u4e5f\u8981\u628a\u4e00\u4e9b\u7528\u4e0d\u5230\u7684\u8cc7\u6599\u5eab \/\u00a0\u8868 &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/2blog.ilc.edu.tw\/25793\/2013\/09\/30\/mysql-server-%e5%ae%89%e8%a3%9d%e5%be%8c%e7%9a%84%e8%a8%ad%e5%ae%9a\/\" class=\"more-link\">\u95b1\u8b80\u5168\u6587<span class=\"screen-reader-text\">\u3008MySQL Server \u5b89\u88dd\u5f8c\u7684\u8a2d\u5b9a\u3009<\/span><\/a><\/p>\n","protected":false},"author":55,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[116],"tags":[],"class_list":["post-18047","post","type-post","status-publish","format-standard","hentry","category-c-78461"],"meta_key":{"_encloseme":["1"],"lt_post_id":["427683"]},"_links":{"self":[{"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/posts\/18047"}],"collection":[{"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/users\/55"}],"replies":[{"embeddable":true,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/comments?post=18047"}],"version-history":[{"count":0,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/posts\/18047\/revisions"}],"wp:attachment":[{"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/media?parent=18047"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/categories?post=18047"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/tags?post=18047"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}