{"id":319839,"date":"2024-01-20T04:21:03","date_gmt":"2024-01-19T20:21:03","guid":{"rendered":"https:\/\/www.idc.net\/help\/319839\/"},"modified":"2024-01-20T04:21:03","modified_gmt":"2024-01-19T20:21:03","slug":"%e6%95%99%e6%82%a8%e5%a6%82%e4%bd%95%e8%ae%be%e7%bd%aemysql%e8%ae%bf%e9%97%ae%e9%99%90%e5%88%b6","status":"publish","type":"post","link":"https:\/\/idc.net\/help\/319839\/","title":{"rendered":"\u6559\u60a8\u5982\u4f55\u8bbe\u7f6eMySql\u8bbf\u95ee\u9650\u5236"},"content":{"rendered":"<p>\u5982\u679c\u8981\u8bbe\u7f6eMySql\u8bbf\u95ee\u9650\u5236\uff0c\u5e94\u8be5\u5982\u4f55\u64cd\u4f5c\u5462\uff1f\u4e0b\u9762\u5c31\u5c06\u4e3a\u60a8\u4ecb\u7ecdMySql\u8bbf\u95ee\u9650\u5236\u7684\u8bbe\u7f6e\u65b9\u6cd5\uff0c\u4f9b\u60a8\u53c2\u8003\u3002<\/p>\n<p>\u6211\u4eec\u91c7\u7528\u4e24\u79cd\u65b9\u6cd5\u6765\u8bbe\u7f6eMySql\u8bbf\u95ee\u9650\u5236\u3002\u8fdb\u5165\u5230Mysql\u6267\u884c\u76ee\u5f55\u4e0b\uff08\u901a\u5e38\u662fc:\\mysql\\bin\uff09\u3002\u8f93\u5165mysqld- shareware.exe\uff0c\u8f93\u5165mysql --user=root mysql ,\u4e0d\u7136\u4e0d\u80fd\u6dfb\u52a0\u65b0\u7528\u6237\u3002\u8fdb\u5165\u5230mysql&gt;\u63d0\u793a\u7b26\u4e0b\u8fdb\u884c\u64cd\u4f5c\u3002<\/p>\n<p>\u5047\u8bbe\u6211\u4eec\u8981\u5efa\u7acb\u4e00\u4e2a\u8d85\u7ea7\u7528\u6237\uff0c\u7528\u6237\u540d\u4e3asystem\uff0c\u7528\u6237\u53e3\u4ee4\u4e3amanager\u3002\u65b9\u6cd5\u4e00\u7528Grant \u547d\u4ee4\u6388\u6743\uff0c\u8f93\u5165\u7684\u4ee3\u7801\u5982\u4e0b\uff1amysql&gt;GRANT ALL PRIVILEGES ON *.* TO system@localhost IDENTIFIED BY \\'manager\\' WITH GRANT OPTION;<\/p>\n<p>\u5e94\u663e\u793a:Query OK, 0 rows affected (0.38 sec)<\/p>\n<p>\u65b9\u6cd5\u4e8c\u5bf9\u7528\u6237\u7684\u6bcf\u4e00\u9879\u6743\u9650\u8fdb\u884c\u8bbe\u7f6e\uff1a<\/p>\n<p>mysql&gt;INSERT INTO user VALUES(\\'localhost\\',\\'system\\',PASSWORD(\\'manager\\'), \\'Y\\',\\'Y\\',\\'Y\\',\\'Y\\',\\'Y\\',\\'Y\\',\\'Y\\',\\'Y\\',\\'Y\\',\\'Y\\',\\'Y\\',\\'Y\\',\\'Y\\',\\'Y\\');<\/p>\n<p>\u5bf9\u4e8e3.22.34\u7248\u672c\u7684MySQL,\u8fd9\u91cc\u517114\u4e2a\\\"Y\\\",\u5176\u76f8\u5e94\u7684\u6743\u9650\u5982\u4e0b(\u6309\u5b57\u6bb5\u987a\u5e8f\u6392\u5217):<\/p>\n<\/p>\n<table cellspacing=\"0\" cellpadding=\"2\" width=\"100%\" border=\"1\">\n<tbody>\n<tr>\n<td width=\"10%\">\u6743\u9650<\/td>\n<td width=\"20%\">\u8868\u5217\u540d\u79f0<\/td>\n<td width=\"55%\">\u76f8\u5e94\u89e3\u91ca<\/td>\n<td width=\"15%\">\u4f7f\u7528\u8303\u56f4<\/td>\n<\/tr>\n<tr>\n<td width=\"10%\">select<\/td>\n<td width=\"20%\">Select_priv<\/td>\n<td width=\"55%\">\u53ea\u6709\u5728\u771f\u6b63\u4ece\u4e00\u4e2a\u8868\u4e2d\u68c0\u7d22\u65f6\u624d\u9700\u8981select\u6743\u9650<\/td>\n<td width=\"15%\">\u8868<\/td>\n<\/tr>\n<tr>\n<td width=\"10%\">insert<\/td>\n<td width=\"20%\">Insert_priv<\/td>\n<td width=\"55%\">\u5141\u8bb8\u60a8\u628a\u65b0\u884c\u63d2\u5165\u5230\u4e00\u4e2a\u5b58\u5728\u7684\u8868\u4e2d<\/td>\n<td width=\"15%\">\u8868<\/td>\n<\/tr>\n<tr>\n<td width=\"10%\">update<\/td>\n<td width=\"20%\">Update_priv<\/td>\n<td width=\"55%\">\u5141\u8bb8\u4f60\u7528\u65b0\u503c\u66f4\u65b0\u73b0\u5b58\u8868\u4e2d\u884c\u7684\u5217&nbsp;<\/td>\n<td width=\"15%\">\u8868<\/td>\n<\/tr>\n<tr>\n<td width=\"10%\">delete<\/td>\n<td width=\"20%\">Delete_priv<\/td>\n<td width=\"55%\">\u5141\u8bb8\u4f60\u5220\u9664\u6ee1\u8db3\u6761\u4ef6\u7684\u884c<\/td>\n<td width=\"15%\">\u8868<\/td>\n<\/tr>\n<tr>\n<td width=\"10%\">create<\/td>\n<td width=\"20%\">Create_priv<\/td>\n<td width=\"55%\">\u5141\u8bb8\u4f60\u521b\u5efa\u65b0\u7684\u6570\u636e\u5e93\u548c\u8868<\/td>\n<td width=\"15%\">\u6570\u636e\u5e93\u3001\u8868\u6216\u7d22\u5f15<\/td>\n<\/tr>\n<tr>\n<td width=\"10%\">drop<\/td>\n<td width=\"20%\">Drop_priv<\/td>\n<td width=\"55%\">\u629b\u5f03(\u5220\u9664)\u73b0\u5b58\u7684\u6570\u636e\u5e93\u548c\u8868<\/td>\n<td width=\"15%\">\u6570\u636e\u5e93\u6216\u8868<\/td>\n<\/tr>\n<tr>\n<td width=\"10%\">reload<\/td>\n<td width=\"20%\">Reload_priv<\/td>\n<td width=\"55%\">\u5141\u8bb8\u60a8\u544a\u8bc9\u670d\u52a1\u5668\u518d\u8bfb\u5165\u6388\u6743\u8868<\/td>\n<td width=\"15%\">\u670d\u52a1\u5668\u7ba1\u7406<\/td>\n<\/tr>\n<tr>\n<td width=\"10%\">shutdown<\/td>\n<td width=\"20%\">Shutdown_priv<\/td>\n<td width=\"55%\">\u53ef\u80fd\u88ab\u6ee5\u7528(\u901a\u8fc7\u7ec8\u6b62\u670d\u52a1\u5668\u62d2\u7edd\u4e3a\u5176\u4ed6\u7528\u6237\u670d\u52a1)<\/td>\n<td width=\"15%\">\u670d\u52a1\u5668\u7ba1\u7406<\/td>\n<\/tr>\n<tr>\n<td width=\"10%\">process<\/td>\n<td width=\"20%\">Process_priv<\/td>\n<td width=\"55%\">\u5141\u8bb8\u60a8\u5bdf\u770b\u5f53\u524d\u6267\u884c\u7684\u67e5\u8be2\u7684\u666e\u901a\u6587\u672c,\u5305\u62ec\u8bbe\u5b9a\u6216\u6539\u53d8\u53e3\u4ee4\u67e5\u8be2<\/td>\n<td width=\"15%\">\u670d\u52a1\u5668\u7ba1\u7406<\/td>\n<\/tr>\n<tr>\n<td width=\"10%\">file<\/td>\n<td width=\"20%\">File_priv<\/td>\n<td width=\"55%\">\u6743\u9650\u53ef\u4ee5\u88ab\u6ee5\u7528\u5728\u670d\u52a1\u5668\u4e0a\u8bfb\u53d6\u4efb\u4f55\u53ef\u8bfb\u7684\u6587\u4ef6\u5230\u6570\u636e\u5e93\u8868<\/td>\n<td width=\"15%\">\u670d\u52a1\u5668\u4e0a\u7684\u6587\u4ef6\u5b58\u53d6<\/td>\n<\/tr>\n<tr>\n<td width=\"10%\">grant<\/td>\n<td width=\"20%\">Grant_priv<\/td>\n<td width=\"55%\">\u5141\u8bb8\u4f60\u628a\u4f60\u81ea\u5df1\u62e5\u6709\u7684\u90a3\u4e9b\u6743\u9650\u6388\u7ed9\u5176\u4ed6\u7684\u7528\u6237<\/td>\n<td width=\"15%\">\u6570\u636e\u5e93\u6216\u8868<\/td>\n<\/tr>\n<tr>\n<td width=\"10%\">references<\/td>\n<td width=\"20%\">References_priv<\/td>\n<td width=\"55%\">\u5141\u8bb8\u4f60\u6253\u5f00\u548c\u5173\u95ed\u8bb0\u5f55\u6587\u4ef6<\/td>\n<td width=\"15%\">\u6570\u636e\u5e93\u6216\u8868<\/td>\n<\/tr>\n<tr>\n<td width=\"10%\">index<\/td>\n<td width=\"20%\">Index_priv<\/td>\n<td width=\"55%\">\u5141\u8bb8\u4f60\u521b\u5efa\u6216\u629b\u5f03(\u5220\u9664)\u7d22\u5f15<\/td>\n<td width=\"15%\">\u8868<\/td>\n<\/tr>\n<tr>\n<td width=\"10%\">alter<\/td>\n<td width=\"20%\">Alter_priv<\/td>\n<td width=\"55%\">\u5141\u8bb8\u60a8\u6539\u53d8\u8868\u683c,\u53ef\u4ee5\u7528\u4e8e\u901a\u8fc7\u91cd\u65b0\u547d\u540d\u8868\u6765\u63a8\u7ffb\u6743\u9650\u7cfb\u7edf<\/td>\n<td width=\"15%\">\u8868<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p>\u5982\u679c\u521b\u5efa\u7528\u6237\u65f6\u53ea\u6709select\u3001insert\u3001update\u548cdelete\u6743\u9650,\u5219\u5141\u8bb8\u7528\u6237\u53ea\u80fd\u5728\u4e00\u4e2a\u6570\u636e \u5e93\u73b0\u6709\u7684\u8868\u4e0a\u5b9e\u65bd\u64cd\u4f5c.\u4e0b\u9762\u5c31\u53ef\u4ee5\u521b\u5efa\u6211\u4eec\u8981\u7528\u5230\u7684\u6570\u636e\u5e93\u4e86,\u6211\u4eec\u76f4\u63a5\u8f93\u5165. \u4f8b\u5982\uff1a\u6211\u4eec\u8981\u521b\u5efa\u6570\u636e\u5e93\u540d\u4e3aXinXiKu\uff0c\u53ef\u7528\u5982\u4e0b\u4ee3\u7801\uff1a<\/p>\n<p>mysql&gt;create database XinXiKu;<\/p>\n<p>\u5e94\u663e\u793a:Query<\/p>\n<p>\u4ee5\u4e0aMySql\u8bbf\u95ee\u9650\u5236\u7684\u8bbe\u7f6e\u4ecb\u7ecd\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>\u3010\u7f16\u8f91\u63a8\u8350\u3011<\/p>\n<p><font>MySQL\u4fee\u6539\u5bc6\u7801\u7684\u516d\u79cd\u65b9\u6cd5<\/font><\/p>\n<p><font>linux\u4e0b\u7684\u5e38\u7528mysql\u547d\u4ee4<\/font><\/p>\n<p><font>\u4e5d\u79cd\u5e38\u7528mysql\u547d\u4ee4<\/font><\/p>\n<p><font>Mysql User\u8868\u6743\u9650\u5b57\u6bb5\u8bf4\u660e\u5168\u4ecb\u7ecd<\/font><\/p>\n<p>MySQL\u81ea\u589e\u5b57\u6bb5\u7684\u5e38\u7528\u8bed\u53e5<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5982\u679c\u8981\u8bbe\u7f6eMySql\u8bbf\u95ee\u9650\u5236\uff0c\u5e94\u8be5\u5982\u4f55\u64cd\u4f5c\u5462\uff1f\u4e0b\u9762\u5c31\u5c06\u4e3a\u60a8\u4ecb\u7ecdMySql\u8bbf\u95ee\u9650\u5236\u7684\u8bbe\u7f6e\u65b9\u6cd5\uff0c\u4f9b\u60a8\u53c2\u8003\u3002 \u6211\u4eec\u91c7 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7038],"tags":[],"class_list":["post-319839","post","type-post","status-publish","format-standard","hentry","category-database"],"_links":{"self":[{"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/posts\/319839","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/comments?post=319839"}],"version-history":[{"count":0,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/posts\/319839\/revisions"}],"wp:attachment":[{"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/media?parent=319839"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/categories?post=319839"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/tags?post=319839"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}