{"id":63,"date":"2007-03-19T06:01:27","date_gmt":"2007-03-18T22:01:27","guid":{"rendered":"http:\/\/learn-house.idv.tw\/?p=63"},"modified":"2010-01-16T13:58:47","modified_gmt":"2010-01-16T05:58:47","slug":"phpmyadmin%e4%b8%ad%e4%bd%bf%e7%94%a8%e8%80%85%e5%8f%aa%e8%83%bd%e6%93%8d%e4%bd%9c%e8%88%87%e7%9c%8b%e5%88%b0%e8%87%aa%e5%b7%b1%e7%9a%84%e8%b3%87%e6%96%99%e5%ba%ab","status":"publish","type":"post","link":"https:\/\/learn-house.idv.tw\/?p=63","title":{"rendered":"phpMyAdmin\u4e2d\u4f7f\u7528\u8005\u53ea\u80fd\u64cd\u4f5c\u8207\u770b\u5230\u81ea\u5df1\u7684\u8cc7\u6599\u5eab"},"content":{"rendered":"<p>\u4e4b\u524d\u4f7f\u7528\u5b78\u6821\u7684\u7a7a\u9593\u67b6\u8a2d\u8ad6\u58c7<\/p>\n<p>\u8001\u5e2b\u7d66\u6211\u7684phpMyAdmin\u6b0a\u9650\u53ea\u80fd\u770b\u5230\u81ea\u5df1\u7684\u8cc7\u6599\u5eab\u8207test\u8cc7\u6599\u5eab<\/p>\n<p>\u5176\u5b83\u66f4\u6539\u81ea\u5df1\u7684\u6b0a\u9650\u8207\u700f\u89bd\u5225\u4eba\u7684\u8cc7\u6599\u5eab\u7684\u6b0a\u9650\u662f\u95dc\u9589\u7684<\/p>\n<p>\u9019\u9ebc\u4e00\u4f86\u8cc7\u6599\u5eab\u4e5f\u8b8a\u5f97\u6bd4\u8f03\u5b89\u5168<\/p>\n<p>\u5982\u4eca\u6211\u81ea\u5df1\u5728\u5bb6\u7684\u96fb\u8166\u4e5f\u67b6\u8a2d\u4e86\u5e7e\u500b\u9700\u8981\u7528\u5230\u8cc7\u6599\u5eab\u7684\u7db2\u7ad9<\/p>\n<p>\u800c\u4e14\u4e5f\u5206\u7d66\u4e0d\u540c\u7db2\u7ad9\u5efa\u7f6e\u8005\u4f7f\u7528MySQL<\/p>\n<p>\u56e0\u6b64\u6c7a\u5b9a\u8981\u4f7f\u7528\u548c\u5b78\u6821\u4e00\u6a23\u7684\u65b9\u5f0f\u63d0\u5347\u8cc7\u6599\u5eab\u7684\u5b89\u5168<\/p>\n<p><a href=\"http:\/\/x.tnc.edu.tw\/modules\/tadbook2\/view.php?book_sn=9&amp;bdsn=398&amp;op=&amp;fullscreen=\" target=\"_blank\">\u5f15\u7528\u4f86\u6e90<\/a>&nbsp;<\/p>\n<p>\u4e00.\u5229\u7528phpMyAdmin\u9019\u5957\u8edf\u9ad4\u4f86\u65b0\u589e\u5b78\u52d9\u7cfb\u7d71\u7684\u8cc7\u6599\u5eab\u4f7f\u7528\u8005\u5e33\u865f\uff0c\u4e26\u5efa\u7acb\u4e00\u500b\u65b0\u7684\u8cc7\u6599\u5eab\u7d66\u6b64\u5e33\u865f\u4f86\u4f7f\u7528\u3002<\/p>\n<p> 1.\u5b89\u88ddphpMyAdmin <\/p>\n<table style=\"border: 1px solid #fcfcfc; padding: 4px; background-color: #000000\" width=\"100%\">\n<tbody>\n<tr>\n<td>\n<div style=\"padding: 8px; color: #ffffff; line-height: 1.5\"> cd \/home\/x\/public_html         <font color=\"#ccffcc\">#\u9032\u5165x\u7684\u5bb6\u76ee\u9304<\/font><br \/> wget http:\/\/ftp.ccu.edu.tw\/pub\/packages\/database\/phpmyadmin\/phpMyAdmin-2.7.0-rc1.tar.gz        <font color=\"#ccffcc\">#\u4e0b\u8f09phpMyAdmin<\/font><br \/> tar zxvf phpMyAdmin-2.7.0-rc1.tar.gz         <font color=\"#ccffcc\">#\u89e3\u58d3\u7e2e<\/font><br \/> mv phpMyAdmin-2.7.0-rc1 phpMyAdmin          <font color=\"#ccffcc\">#\u5c07\u89e3\u5b8c\u7684\u76ee\u9304\u66f4\u540d\u70baphpMyAdmin<\/font> <\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p> 2.\u4fee\u6539phpMyAdmin\u7684\u8a2d\u5b9a\u6a94config.default.php <\/p>\n<table style=\"border: 1px solid #fcfcfc; padding: 4px; background-color: #000000\" width=\"100%\">\n<tbody>\n<tr>\n<td>\n<div style=\"padding: 8px; color: #ffffff; line-height: 1.5\"> vi phpMyAdmin\/config.default.php      <\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p> 3.\u4fee\u653931\u884c\uff0c\u8a2d\u5b9aphpMyAdmin\u7684\u57f7\u884c\u7db2\u5740\uff08\u8a18\u5f97\u6309A\uff0c\u4ee5\u9032\u5165\u7de8\u8f2f\u6a21\u5f0f\uff09\uff1a <\/p>\n<table style=\"border: 1px solid #fcfcfc; padding: 4px; background-color: #000000\" width=\"100%\">\n<tbody>\n<tr>\n<td>\n<div style=\"padding: 8px; color: #ffffff; line-height: 1.5\"> $cfg[&#39;PmaAbsoluteUri&#39;] = &#39;http:\/\/\u7db2\u5740\/~x\/phpMyAdmin\/&#39;; <\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p> 4.\u4fee\u653971\u884c\uff0c\u8a2d\u5b9aphpMyAdmin\u7684\u8a8d\u8b49\u65b9\u5f0f\uff0c\u5efa\u8b70\u7528http\u8f03\u5b89\u5168\uff0c\u4e0d\u5efa\u8b70\u7528config\u8ddfcookie\uff1a <\/p>\n<table style=\"border: 1px solid #fcfcfc; padding: 4px; background-color: #000000\" width=\"100%\">\n<tbody>\n<tr>\n<td>\n<div style=\"padding: 8px; color: #ffffff; line-height: 1.5\"> $cfg[&#39;Servers&#39;][$i][&#39;auth_type&#39;]     = &#39;http&#39;;  <\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p> \u6700\u5f8c\u6309 Esc \uff0c\u8f38\u5165\u300c:wq\u300d\u5132\u5b58\u96e2\u958b\u3002<\/p>\n<p> 5.\u6253\u958b\u700f\u89bd\u5668\uff0c\u8f38\u5165\u525b\u525b\u572831\u884c\u6240\u5beb\u7684phpMyAdmin\u57f7\u884c\u7db2\u5740\uff0c\u7136\u5f8c\u7528root\u5e33\u865f\u8ddf\u5bc6\u78bc\u767b\u5165\u3002<\/p>\n<p> 6.\u5148\u5efa\u7acb\u4e00\u500b\u8cc7\u6599\u5eab\uff0c\u8cc7\u6599\u5eab\u540d\u7a31\u7684\u7b2c\u4e00\u500b\u5b57\u4e00\u5b9a\u8981\u662f\u82f1\u6587\uff0c\u4e0d\u53ef\u7528\u6578\u5b57\u3002  \t\t\t<\/p>\n<div style=\"display: inline\"> \t\t\t<img decoding=\"async\" class=\"img\" src=\"http:\/\/x.tnc.edu.tw\/uploads\/tadbook2\/283_x03.png\" border=\"0\" alt=\"\u5716 1. \u5efa\u7acb\u8cc7\u6599\u5eab\" \/> \t\t\t<br \/><font>\u5716 1. \u5efa\u7acb\u8cc7\u6599\u5eab<\/font><\/div>\n<p> 7.\u9ede\u9078\u300c\u6b0a\u9650\u300d\uff0c\u6e96\u5099\u65b0\u589e\u4f7f\u7528\u8005\u3002  \t\t\t<\/p>\n<div style=\"display: inline\"> \t\t\t<img decoding=\"async\" class=\"img\" src=\"http:\/\/x.tnc.edu.tw\/uploads\/tadbook2\/284_x05.png\" border=\"0\" alt=\"\u5716 2. \u8a2d\u5b9a\u6b0a\u9650\" \/> \t\t\t<br \/><font>\u5716 2. \u8a2d\u5b9a\u6b0a\u9650<\/font><\/div>\n<p>  \t\t\t<\/p>\n<div style=\"display: inline\"> \t\t\t<img decoding=\"async\" class=\"img\" src=\"http:\/\/x.tnc.edu.tw\/uploads\/tadbook2\/285_x06.png\" border=\"0\" alt=\"\u5716 3. \u65b0\u589e\u4f7f\u7528\u8005\" \/> \t\t\t<br \/><font>\u5716 3. \u65b0\u589e\u4f7f\u7528\u8005<\/font><\/div>\n<p> 8.\u8f38\u5165\u4f7f\u7528\u8005\u540d\u7a31.\u4e3b\u6a5f\u8ddf\u5bc6\u78bc\uff0c\u4e0b\u9762\u7684\u6574\u9ad4\u6b0a\u9650\u7686\u4e0d\u7d66\uff0c\u4e5f\u5c31\u662f\u8aaa\uff0c\u4ed6\u53ea\u80fd\u770b\u5230\u81ea\u5df1\u80fd\u7528\u7684\u8cc7\u6599\u5eab\u800c\u5df2\uff0c\u5225\u7684\u8cc7\u6599\u5eab\u4e00\u5f8b\u7121\u6cd5\u8b93\u4ed6\u4f7f\u7528\u3002  \t\t\t<\/p>\n<div style=\"display: inline\"> \t\t\t<img decoding=\"async\" class=\"img\" src=\"http:\/\/x.tnc.edu.tw\/uploads\/tadbook2\/286_x07.png\" border=\"0\" alt=\"\u5716 6. \u8a2d\u5b9a\u65b0\u4f7f\u7528\u8005\u5e33\u865f\u5bc6\u78bc\u548c\u6574\u9ad4\u6b0a\u9650(\u6574\u9ad4\u6b0a\u9650\u4e0d\u8981\u52fe)\" \/> \t\t\t<br \/><font>\u5716 6. \u8a2d\u5b9a\u65b0\u4f7f\u7528\u8005\u5e33\u865f\u5bc6\u78bc\u548c\u6574\u9ad4\u6b0a\u9650(\u6574\u9ad4\u6b0a\u9650\u4e0d\u8981\u52fe)<\/font><\/div>\n<p> 9.\u6307\u5b9a\u525b\u525b\u65b0\u589e\u7684\u8cc7\u6599\u5eab\u7d66\u65b0\u4f7f\u7528\u8005\u7528\uff1a  \t\t\t<\/p>\n<div style=\"display: inline\"> \t\t\t<img decoding=\"async\" class=\"img\" src=\"http:\/\/x.tnc.edu.tw\/uploads\/tadbook2\/287_x08.png\" border=\"0\" alt=\"\u5716 7. \u6307\u5b9a\u8a72\u4f7f\u7528\u8005\u80fd\u7528\u7684\u8cc7\u6599\u5eab\" \/> \t\t\t<br \/><font>\u5716 7. \u6307\u5b9a\u8a72\u4f7f\u7528\u8005\u80fd\u7528\u7684\u8cc7\u6599\u5eab<\/font><\/div>\n<p> <\/p>\n<table style=\"border: 1px solid red; padding: 4px; background-color: #ffdada\" width=\"100%\">\n<tbody>\n<tr>\n<td class=\"tb2\"><img decoding=\"async\" src=\"http:\/\/x.tnc.edu.tw\/uploads\/tadbook2\/1_1.gif\" border=\"0\" alt=\"\u6ce8\u610f\u5594\uff01\" \/><\/p>\n<div style=\"padding: 10px; background-color: #ffffff\"> \u842c\u4e00\u60a8\u9ede\u9078\u300c\u6b0a\u9650\u300d\u51fa\u73fe\u932f\u8aa4\u8a0a\u606f\u6642\uff1a  \t\t\t<\/p>\n<div style=\"display: inline\"> \t\t\t<img decoding=\"async\" class=\"img\" src=\"http:\/\/x.tnc.edu.tw\/uploads\/tadbook2\/318_aa.png\" border=\"0\" alt=\"\u5716 8. \u6b0a\u9650\u8868\u592a\u820a\u6240\u7522\u751f\u7684\u8a0a\u606f\" \/> \t\t\t<br \/><font>\u5716 8. \u6b0a\u9650\u8868\u592a\u820a\u6240\u7522\u751f\u7684\u8a0a\u606f<\/font><\/div>\n<p> \u90a3\u8868\u793a\u60a8\u7684\u6b0a\u9650\u7d00\u9304\u8868\u592a\u820a\uff0c\u89e3\u6c7a\u65b9\u6cd5\u5f88\u7c21\u55ae\uff1a<br \/> 1.\u7528root\u8eab\u4efdssh\u9023\u56de\u4e3b\u6a5f\u4e2d<br \/> 2.\u5728\u4efb\u4f55\u5730\u65b9\u4e0b\u4ee5\u4e0b\u6307\u4ee4\uff1amysql_fix_privilege_table \u8cc7\u6599\u5eab\u7ba1\u7406\u8005\u5bc6\u78bc<br \/> 3.\u82e5\u627e\u4e0d\u5230 mysql_fix_privilege_table \u6307\u4ee4\uff0c\u90a3\u9ebc\u7528 locate mysql_fix_privilege_table \u627e\u4e00\u4e0b\uff0c\u4e26\u4ee5\u5b8c\u6574\u8def\u5f91\u4f86\u57f7\u884c\u4ee5\u4e0a\u6307\u4ee4\u5373\u53ef\u3002<br \/> 4.\u518d\u56de\u5230phpMyAdmin\u5c31OK\u56c9\uff01 <\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p> 10.\u628a\u8a72\u8cc7\u6599\u5eab\u7684\u529f\u80fd\u6b0a\u9650\u90fd\u958b\u7d66\u4ed6\uff0c\u4f46\u7ba1\u7406\u6b0a\u9650\u5247\u5426\u3002  \t\t\t<\/p>\n<div style=\"display: inline\"> \t\t\t<img decoding=\"async\" class=\"img\" src=\"http:\/\/x.tnc.edu.tw\/uploads\/tadbook2\/288_x09.png\" border=\"0\" alt=\"\u5716 4. \u8a2d\u5b9a\u8a72\u4f7f\u7528\u8005\u5c0d\u8a72\u8cc7\u6599\u5eab\u7684\u6b0a\u9650\" \/> \t\t\t<br \/><font>\u5716 4. \u8a2d\u5b9a\u8a72\u4f7f\u7528\u8005\u5c0d\u8a72\u8cc7\u6599\u5eab\u7684\u6b0a\u9650<\/font><\/div>\n<p> 11.\u767b\u51faphpMyAdmin\uff0c\u7136\u5f8c\u4ee5\u65b0\u4f7f\u7528\u8005\u7684\u8eab\u4efd\u767b\u5165\uff0c\u5982\u679c\u770b\u898b\u5982\u4ee5\u4e0b\u8a0a\u606f\uff0c\u90a3\u8868\u793aOK\u56c9\uff01  \t\t\t<\/p>\n<div style=\"display: inline\"> \t\t\t<img decoding=\"async\" class=\"img\" src=\"http:\/\/x.tnc.edu.tw\/uploads\/tadbook2\/289_x10.png\" border=\"0\" alt=\"\u5716 5. \u91cd\u65b0\u4ee5\u65b0\u4f7f\u7528\u8005\u8eab\u4efd\u767b\u5165\u8a66\u8a66\" \/> \t\t\t<br \/><font>\u5716 5. \u91cd\u65b0\u4ee5\u65b0\u4f7f\u7528\u8005\u8eab\u4efd\u767b\u5165\u8a66\u8a66<\/font><\/div>\n<table style=\"border: 1px solid blue; padding: 4px; background-color: #daebff\" width=\"100%\">\n<tbody>\n<tr>\n<td class=\"tb2\"><img decoding=\"async\" src=\"http:\/\/x.tnc.edu.tw\/uploads\/tadbook2\/4_4.gif\" border=\"0\" alt=\"\u5c0f\u5e38\u8b58\" \/><\/p>\n<div style=\"padding: 10px; background-color: #ffffff\"> \u60a8\u4e5f\u53ef\u4ee5\u7528\u6307\u4ee4\u4f86\u65b0\u589e\u8cc7\u6599\u5eab\uff0c\u4e26\u6307\u5b9a\u53ef\u4ee5\u4f7f\u7528\u6b64\u8cc7\u6599\u5eab\u7684\u4f7f\u7528\u8005\uff1a<br \/> CREATE DATABASE `\u8cc7\u6599\u5eab\u540d\u7a31`;<br \/> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,INDEX,ALTER,CREATE TEMPORARY TABLES ON \u8cc7\u6599\u5eab\u540d\u7a31.* TO &#39;\u8cc7\u6599\u5eab\u5e33\u865f&#39;@&#39;localhost&#39; IDENTIFIED BY &#39;\u8cc7\u6599\u5eab\u5bc6\u78bc&#39; ; <\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p> <img decoding=\"async\" src=\"http:\/\/x.tnc.edu.tw\/uploads\/tadbook2\/3_3.gif\" border=\"0\" alt=\"\u5c0f\u6280\u5de7\" \/> \u82e5\u5fd8\u4e86MySQL\u7684\u7ba1\u7406\u8005\u5bc6\u78bc\u8a72\u600e\u9ebc\u8fa6\uff1f<\/p>\n<p> 1.\u5148\u505c\u6389mysql <\/p>\n<table style=\"border: 1px solid #fcfcfc; padding: 4px; background-color: #000000\" width=\"100%\">\n<tbody>\n<tr>\n<td>\n<div style=\"padding: 8px; color: #ffffff; line-height: 1.5\"> \/etc\/rc.d\/init.d\/mysqld stop <\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p> 2.\u4ee5--skip-grant-table \u7684\u53c3\u6578\u555f\u52d5mysql <\/p>\n<table style=\"border: 1px solid #fcfcfc; padding: 4px; background-color: #000000\" width=\"100%\">\n<tbody>\n<tr>\n<td>\n<div style=\"padding: 8px; color: #ffffff; line-height: 1.5\"> safe_mysqld --skip-grant-table&amp; <\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p> 3. \u66f4\u6539root \u5bc6\u78bc <\/p>\n<table style=\"border: 1px solid #fcfcfc; padding: 4px; background-color: #000000\" width=\"100%\">\n<tbody>\n<tr>\n<td>\n<div style=\"padding: 8px; color: #ffffff; line-height: 1.5\"> mysql mysql<\/p>\n<p> mysql&gt; UPDATE user SET password=password(&#39;newpassword&#39;) WHERE user=&#39;root&#39;;<br \/> mysql&gt; FLUSH PRIVILEGES;<br \/> mysql&gt; exit <\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p> 4.\u505c\u6389mysql\u518d\u91cd\u8dd1<br \/>  mysqladmin -uroot -p shutdown<br \/> Enter password: \/\/\u8f38\u5165\u65b0\u8a2d\u5b9a\u7684\u5bc6\u78bc<br \/> \/etc\/rc.d\/init.d\/mysqld start<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e4b\u524d\u4f7f\u7528\u5b78\u6821\u7684\u7a7a\u9593\u67b6\u8a2d\u8ad6\u58c7 \u8001\u5e2b\u7d66\u6211\u7684phpMyAdmin\u6b0a\u9650\u53ea\u80fd\u770b\u5230\u81ea\u5df1\u7684\u8cc7\u6599\u5eab\u8207test\u8cc7\u6599\u5eab \u5176\u5b83\u66f4\u6539\u81ea [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-63","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/learn-house.idv.tw\/index.php?rest_route=\/wp\/v2\/posts\/63"}],"collection":[{"href":"https:\/\/learn-house.idv.tw\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/learn-house.idv.tw\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/learn-house.idv.tw\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/learn-house.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=63"}],"version-history":[{"count":0,"href":"https:\/\/learn-house.idv.tw\/index.php?rest_route=\/wp\/v2\/posts\/63\/revisions"}],"wp:attachment":[{"href":"https:\/\/learn-house.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=63"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/learn-house.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=63"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/learn-house.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=63"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}