{"id":1238,"date":"2010-08-10T11:20:00","date_gmt":"2010-08-10T03:20:00","guid":{"rendered":""},"modified":"2010-08-10T11:20:00","modified_gmt":"2010-08-10T03:20:00","slug":"","status":"publish","type":"post","link":"https:\/\/kyle.ai\/blog\/1238.html","title":{"rendered":"PHP\u65e0\u6cd5\u8fde\u63a5MYSQL\u6570\u636e\u5e93"},"content":{"rendered":"<p><html><head><meta http-equiv=\"Content-Type\" content=\"text\/html; charset=utf-8\" \/><title>PHP\u65e0\u6cd5\u8fde\u63a5MYSQL\u6570\u636e\u5e93<\/title><\/head><body><\/p>\n<h1 style=\"display:none\">PHP\u65e0\u6cd5\u8fde\u63a5MYSQL\u6570\u636e\u5e93<\/h1>\n<div>\n<p><font size=\"2\">\u4eca\u5929\u78b0\u5230\u8fd9\u4e2a\u95ee\u9898\u3002<\/font><\/p>\n<p><font size=\"2\">\u91cd\u88c5\u7cfb\u7edf\u4e3aWindows7\u540e\uff0c\u88c5\u4e86PHP\uff0c\u770b\u4e86\u4e0b\u80fd\u8fd0\u884c\u4e5f\u5c31\u6ca1\u7ba1\u4e86\u3002\u6700\u8fd1\u4e00\u76f4\u5f00\u53d1ASP.NET\uff0c\u6240\u4ee5\u6ca1\u6709\u7ba1PHP\u3002\u4eca\u5929\u60f3\u88c5\u4e2a\u535a\u5ba2\u7cfb\u7edf\uff0c\u5374\u53d1\u73b0\u88c5\u4e0d\u4e0a\u3002\u67e5\u539f\u56e0\uff0c\u539f\u6765\u662fPHP\u7528\u4e0d\u4e86\u6570\u636e\u5e93\uff0c\u6253\u5f00\u8fde\u63a5\u6587\u4ef6con_sql.php\u5c31\u662f&ldquo;\u65e0\u6cd5\u663e\u793a\u7f51\u9875&rdquo;\u3002<\/font><\/p>\n<p><font size=\"2\">\u5f88\u5947\u602a\uff0c\u4ee5\u524d\u6ca1\u51fa\u73b0\u8fc7\u8fd9\u79cd\u95ee\u9898\uff0c\u914d\u7f6e\u90fd\u662f\u6309\u4ee5\u524d\u6b65\u9aa4\u6765\u7684\uff0c\u6ca1\u6709\u95ee\u9898\uff0cMYSQL\u4e5f\u6ca1\u6709\u95ee\u9898\uff0c\u7528\u7ba1\u7406\u5de5\u5177\u80fd\u591f\u8fde\u4e0a\uff0c\u8bf4\u660e\u4e0d\u662fMYSQL\u7684\u95ee\u9898\uff0c\u90a3\u5c31\u662fPHP\u7684\u95ee\u9898\u4e86\uff0c\u4e0a\u7f51\u67e5\u4e86\u4e00\u4e0b\uff0c\u627e\u5230\u4e86\u539f\u56e0\u3002<\/font><\/p>\n<p><font size=\"2\">MYSQL\u6570\u636e\u5e93\u65e0\u6cd5\u8fde\u4e0a\u7684\u95ee\u9898\u8bf7\u770b\u8fd9\u91cc <\/font><\/p>\n<p><font size=\"2\">\u786e\u4fdd\u5982\u4e0b\u6b65\u9aa4\uff1a <\/font><\/p>\n<p><font size=\"2\">1.php.ini\u4e2d <br \/>\nextension_dir\u8bbe\u7f6e\u4e3a&nbsp;&nbsp;  &quot;d:\\apache2\\php\\ext &quot;\u7edd\u5bf9\u8def\u5f84\uff0c\u5426\u5219\u6709\u4e9b\u73af\u5883\u4e2d\u4f1a\u51fa\u9519\u3002 <br \/>\n\u6253\u5f00\u4e0b\u9762\u4e24\u884c\u529f\u80fd\u6269\u5c55 <br \/>\n  extension=php_mysql.dll&nbsp;&nbsp;&nbsp;&nbsp;  <br \/>\n  extension=php_mysqli.dll <\/p>\n<p>2.\u62f7\u8d1dlibmysql.dll(php\u76ee\u5f55\u4e0b)\u548cphp_mysql.dll(php\/ext\u76ee\u5f55\u4e0b)\u81f3c:\\windows\\system32\u76ee\u5f55\u4e0b(libmysql.dll\u5fc5\u987b\u4e3aphp\u76ee\u5f55\u4e0b\uff0c\u6bd4\u5982\u6211\u7684\u4e3aD:\\apache2\\php\u76ee\u5f55\u4e0b\u7684libmysql.dll\uff0cphp_mysql.dll\u5219\u5728D:\\apache2\\php\\ext) <\/p>\n<p>3.\u6d4b\u8bd5\uff0c <br \/>\n1&gt;&nbsp;&nbsp;  \u5148\u6253\u5f00\u547d\u4ee4\u884c <br \/>\nA)\u4f9d\u6b21\u70b9\u51fb&ldquo;\u5f00\u59cb&rdquo;\u83dc\u5355-&gt; &ldquo;mysql&rdquo;-&gt; &ldquo;mysql5&nbsp;&nbsp;  server&rdquo;-&gt; &ldquo;MySQL&nbsp;&nbsp;  Command&nbsp;&nbsp;  Line&nbsp;&nbsp;  Client&rdquo; <br \/>\n\/\/\u5982\u6b64\u6b65\u6210\u529f\u5219mysql\u5b89\u5168\u6210\u529f\uff0c\u5931\u6548\u5219mysql\u5b89\u88c5\u5931\u8d25\uff0c\u8bf7\u5378\u8f7d\u540e\u91cd\u88c5 <\/p>\n<p>B)\u8f93\u5165\u5bc6\u7801 <br \/>\n\/\/\u6b64\u6b65\u6b63\u5e38\u5219\u8bf4\u660e&nbsp;&nbsp;  root\u8d26\u6237\u7684\u5bc6\u7801\u6b63\u786e\u3002\u5931\u8d25\u5219\u8d26\u53f7\u5bc6\u7801\u6709\u9519 <\/p>\n<p>2&gt;\u65b0\u5efa\u6587\u4ef6\u81f3\u4e3b\u76ee\u5f55\uff0c\u5e76\u4fdd\u5b58\u4e3atestmysql.php\uff0c\u63a5\u7740\u5728\u6d4f\u89c8\u5668\u4e2d\u8f93\u5165http:\/\/localhost\/testmysql.php&nbsp;&nbsp;  \uff08\u6216\u8005http:\/\/localhost:81\/testmysql.php\uff09 <\/font><\/p>\n<p><font size=\"2\">\u6211\u7684\u95ee\u9898\u5c31\u51fa\u5728\u7b2c2\u4e2d\u3002\u628a\u90a3\u4e24\u4e2aDLL\u62f7\u8fc7\u53bb\u53ef\u4ee5\u4e86\u3002<\/font><\/p>\n<p><font size=\"2\">\u4ee5\u524d\u7528XP\u7684\u65f6\u5019\uff0c\u5c31\u6ca1\u6709\u624b\u52a8\u62f7\uff0c\u4e5f\u53ef\u4ee5\u7528\uff0c\u6216\u8bb8\u8fd9\u662fWindows7\u7684\u95ee\u9898\u3002<\/font><\/p>\n<\/div>\n<p><\/body><\/html><\/p>\n","protected":false},"excerpt":{"rendered":"<p>PHP\u65e0\u6cd5\u8fde\u63a5MYSQL\u6570\u636e\u5e93 PHP\u65e0\u6cd5\u8fde\u63a5MYSQL\u6570\u636e\u5e93 \u4eca\u5929\u78b0\u5230\u8fd9\u4e2a\u95ee\u9898\u3002 \u91cd\u88c5\u7cfb\u7edf\u4e3aWindows7 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-1238","post","type-post","status-publish","format-standard","hentry","category-code_related"],"_links":{"self":[{"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/posts\/1238","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/comments?post=1238"}],"version-history":[{"count":0,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/posts\/1238\/revisions"}],"wp:attachment":[{"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/media?parent=1238"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/categories?post=1238"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/tags?post=1238"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}