{"id":162485,"date":"2024-11-04T15:29:20","date_gmt":"2024-11-04T07:29:20","guid":{"rendered":"https:\/\/server.hk\/cnblog\/162485\/"},"modified":"2024-11-04T15:29:21","modified_gmt":"2024-11-04T07:29:21","slug":"%e7%b0%a1%e5%96%ae%e6%98%93%e7%94%a8%e7%9a%84-pycharm-%e9%81%a0%e7%a8%8b%e6%95%b8%e6%93%9a%e5%ba%ab%e9%80%a3%e6%8e%a5%e6%95%99%e7%a8%8b-pycharm-%e9%81%a0%e7%a8%8b%e9%80%a3%e6%8e%a5%e6%95%b8%e6%93%9a","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/162485\/","title":{"rendered":"\u7c21\u55ae\u6613\u7528\u7684 PyCharm \u9060\u7a0b\u6578\u64da\u5eab\u9023\u63a5\u6559\u7a0b (pycharm \u9060\u7a0b\u9023\u63a5\u6578\u64da\u5eab)"},"content":{"rendered":"<h1 id=\"%e7%b0%a1%e5%96%ae%e6%98%93%e7%94%a8%e7%9a%84-pycharm-%e9%81%a0%e7%a8%8b%e6%95%b8%e6%93%9a%e5%ba%ab%e9%80%a3%e6%8e%a5%e6%95%99%e7%a8%8b-vBzIxVOfNo\">\u7c21\u55ae\u6613\u7528\u7684 PyCharm \u9060\u7a0b\u6578\u64da\u5eab\u9023\u63a5\u6559\u7a0b<\/h1>\n<p>\u5728\u7576\u4eca\u7684\u958b\u767c\u74b0\u5883\u4e2d\uff0c\u6578\u64da\u5eab\u7684\u7ba1\u7406\u548c\u64cd\u4f5c\u662f\u6bcf\u4f4d\u958b\u767c\u8005\u5fc5\u9808\u638c\u63e1\u7684\u6280\u80fd\u4e4b\u4e00\u3002PyCharm \u4f5c\u70ba\u4e00\u6b3e\u5f37\u5927\u7684 Python \u958b\u767c\u5de5\u5177\uff0c\u63d0\u4f9b\u4e86\u4fbf\u6377\u7684\u9060\u7a0b\u6578\u64da\u5eab\u9023\u63a5\u529f\u80fd\uff0c\u8b93\u958b\u767c\u8005\u80fd\u5920\u8f15\u9b06\u5730\u7ba1\u7406\u548c\u64cd\u4f5c\u9060\u7a0b\u6578\u64da\u5eab\u3002\u672c\u6587\u5c07\u4ecb\u7d39\u5982\u4f55\u5728 PyCharm \u4e2d\u8a2d\u7f6e\u9060\u7a0b\u6578\u64da\u5eab\u9023\u63a5\uff0c\u4e26\u63d0\u4f9b\u4e00\u4e9b\u5be6\u7528\u7684\u793a\u4f8b\u548c\u6b65\u9a5f\u3002<\/p>\n<h2 id=\"%e6%ad%a5%e9%a9%9f%e4%b8%80%ef%bc%9a%e5%ae%89%e8%a3%9d%e5%bf%85%e8%a6%81%e7%9a%84%e6%8f%92%e4%bb%b6-vBzIxVOfNo\">\u6b65\u9a5f\u4e00\uff1a\u5b89\u88dd\u5fc5\u8981\u7684\u63d2\u4ef6<\/h2>\n<p>\u5728\u4f7f\u7528 PyCharm \u9032\u884c\u9060\u7a0b\u6578\u64da\u5eab\u9023\u63a5\u4e4b\u524d\uff0c\u9996\u5148\u9700\u8981\u78ba\u4fdd\u5df2\u5b89\u88dd\u76f8\u61c9\u7684\u6578\u64da\u5eab\u63d2\u4ef6\u3002PyCharm \u652f\u6301\u591a\u7a2e\u6578\u64da\u5eab\uff0c\u5305\u62ec MySQL\u3001PostgreSQL\u3001SQLite \u7b49\u3002\u4ee5\u4e0b\u662f\u5b89\u88dd\u63d2\u4ef6\u7684\u6b65\u9a5f\uff1a<\/p>\n<ol>\n<li>\u6253\u958b PyCharm\uff0c\u9ede\u64ca\u5de6\u4e0a\u89d2\u7684 <strong>File<\/strong> \u83dc\u55ae\u3002<\/li>\n<li>\u9078\u64c7 <strong>Settings<\/strong>\uff08\u5728 macOS \u4e0a\u70ba <strong>Preferences<\/strong>\uff09\u3002<\/li>\n<li>\u5728\u5de6\u5074\u83dc\u55ae\u4e2d\u9078\u64c7 <strong>Plugins<\/strong>\u3002<\/li>\n<li>\u5728\u641c\u7d22\u6846\u4e2d\u8f38\u5165\u6240\u9700\u7684\u6578\u64da\u5eab\u540d\u7a31\uff0c\u4f8b\u5982 <strong>MySQL<\/strong>\u3002<\/li>\n<li>\u627e\u5230\u76f8\u61c9\u7684\u63d2\u4ef6\u5f8c\uff0c\u9ede\u64ca <strong>Install<\/strong> \u6309\u9215\u9032\u884c\u5b89\u88dd\u3002<\/li>\n<\/ol>\n<h2 id=\"%e6%ad%a5%e9%a9%9f%e4%ba%8c%ef%bc%9a%e9%85%8d%e7%bd%ae%e6%95%b8%e6%93%9a%e5%ba%ab%e9%80%a3%e6%8e%a5-vBzIxVOfNo\">\u6b65\u9a5f\u4e8c\uff1a\u914d\u7f6e\u6578\u64da\u5eab\u9023\u63a5<\/h2>\n<p>\u5b89\u88dd\u5b8c\u63d2\u4ef6\u5f8c\uff0c\u63a5\u4e0b\u4f86\u9700\u8981\u914d\u7f6e\u6578\u64da\u5eab\u9023\u63a5\u3002\u4ee5\u4e0b\u662f\u5177\u9ad4\u6b65\u9a5f\uff1a<\/p>\n<ol>\n<li>\u5728 PyCharm \u4e2d\uff0c\u6253\u958b <strong>Database<\/strong> \u5de5\u5177\u7a97\u53e3\uff08\u901a\u5e38\u4f4d\u65bc\u53f3\u5074\uff09\u3002<\/li>\n<li>\u9ede\u64ca <strong>+ <\/strong> \u6309\u9215\uff0c\u9078\u64c7 <strong>Data Source<\/strong>\uff0c\u7136\u5f8c\u9078\u64c7\u76f8\u61c9\u7684\u6578\u64da\u5eab\u985e\u578b\uff0c\u4f8b\u5982 <strong>MySQL<\/strong>\u3002<\/li>\n<li>\u5728\u5f48\u51fa\u7684\u5c0d\u8a71\u6846\u4e2d\uff0c\u586b\u5beb\u4ee5\u4e0b\u4fe1\u606f\uff1a<\/li>\n<ul>\n<li><strong>Host:<\/strong> \u9060\u7a0b\u6578\u64da\u5eab\u7684 IP \u5730\u5740\u6216\u57df\u540d\u3002<\/li>\n<li><strong>Port:<\/strong> \u6578\u64da\u5eab\u7684\u7aef\u53e3\u865f\uff08\u9ed8\u8a8d MySQL \u70ba 3306\uff09\u3002<\/li>\n<li><strong>Database:<\/strong> \u8981\u9023\u63a5\u7684\u6578\u64da\u5eab\u540d\u7a31\u3002<\/li>\n<li><strong>User:<\/strong> \u767b\u9304\u6578\u64da\u5eab\u7684\u7528\u6236\u540d\u3002<\/li>\n<li><strong>Password:<\/strong> \u767b\u9304\u6578\u64da\u5eab\u7684\u5bc6\u78bc\u3002<\/li>\n<\/ul>\n<li>\u586b\u5beb\u5b8c\u7562\u5f8c\uff0c\u9ede\u64ca <strong>Test Connection<\/strong> \u6309\u9215\u4ee5\u6aa2\u67e5\u9023\u63a5\u662f\u5426\u6210\u529f\u3002<\/li>\n<li>\u5982\u679c\u6e2c\u8a66\u6210\u529f\uff0c\u9ede\u64ca <strong>OK<\/strong> \u4fdd\u5b58\u8a2d\u7f6e\u3002<\/li>\n<\/ol>\n<h2 id=\"%e6%ad%a5%e9%a9%9f%e4%b8%89%ef%bc%9a%e4%bd%bf%e7%94%a8%e6%95%b8%e6%93%9a%e5%ba%ab-vBzIxVOfNo\">\u6b65\u9a5f\u4e09\uff1a\u4f7f\u7528\u6578\u64da\u5eab<\/h2>\n<p>\u9023\u63a5\u6210\u529f\u5f8c\uff0c\u60a8\u53ef\u4ee5\u5728 <strong>Database<\/strong> \u5de5\u5177\u7a97\u53e3\u4e2d\u770b\u5230\u5df2\u9023\u63a5\u7684\u6578\u64da\u5eab\u3002\u60a8\u53ef\u4ee5\u5c55\u958b\u6578\u64da\u5eab\uff0c\u67e5\u770b\u8868\u683c\u3001\u8996\u5716\u548c\u5176\u4ed6\u6578\u64da\u5eab\u5c0d\u8c61\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u5e38\u7528\u7684\u64cd\u4f5c\uff1a<\/p>\n<ul>\n<li><strong>\u57f7\u884c SQL \u67e5\u8a62\uff1a<\/strong> \u53f3\u9375\u9ede\u64ca\u6578\u64da\u5eab\u6216\u8868\u683c\uff0c\u9078\u64c7 <strong>New<\/strong> -&gt; <strong>SQL Console<\/strong>\uff0c\u5728\u6253\u958b\u7684\u63a7\u5236\u53f0\u4e2d\u8f38\u5165 SQL \u67e5\u8a62\u4e26\u57f7\u884c\u3002<\/li>\n<li><strong>\u67e5\u770b\u6578\u64da\uff1a<\/strong> \u53f3\u9375\u9ede\u64ca\u8868\u683c\uff0c\u9078\u64c7 <strong>Jump to Data<\/strong>\uff0c\u53ef\u4ee5\u67e5\u770b\u8868\u683c\u4e2d\u7684\u6578\u64da\u3002<\/li>\n<li><strong>\u7de8\u8f2f\u6578\u64da\uff1a<\/strong> \u5728\u6578\u64da\u8996\u5716\u4e2d\uff0c\u60a8\u53ef\u4ee5\u76f4\u63a5\u7de8\u8f2f\u6578\u64da\uff0c\u4e26\u4fdd\u5b58\u66f4\u6539\u3002<\/li>\n<\/ul>\n<h2 id=\"%e7%b8%bd%e7%b5%90-vBzIxVOfNo\">\u7e3d\u7d50<\/h2>\n<p>\u901a\u904e\u4ee5\u4e0a\u6b65\u9a5f\uff0c\u60a8\u53ef\u4ee5\u8f15\u9b06\u5730\u5728 PyCharm \u4e2d\u8a2d\u7f6e\u9060\u7a0b\u6578\u64da\u5eab\u9023\u63a5\uff0c\u4e26\u9032\u884c\u5404\u7a2e\u6578\u64da\u5eab\u64cd\u4f5c\u3002\u9019\u4e0d\u50c5\u63d0\u9ad8\u4e86\u958b\u767c\u6548\u7387\uff0c\u4e5f\u4f7f\u5f97\u6578\u64da\u7ba1\u7406\u8b8a\u5f97\u66f4\u52a0\u65b9\u4fbf\u3002\u5982\u679c\u60a8\u9700\u8981\u7a69\u5b9a\u7684\u6578\u64da\u5eab\u670d\u52d9\uff0c\u8003\u616e\u4f7f\u7528 <a href=\"https:\/\/server.hk\">\u9999\u6e2fVPS<\/a> \u4f86\u6258\u7ba1\u60a8\u7684\u6578\u64da\u5eab\uff0c\u78ba\u4fdd\u9ad8\u6548\u548c\u5b89\u5168\u7684\u6578\u64da\u5b58\u53d6\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5b78\u7fd2\u5982\u4f55\u4f7f\u7528 PyCharm \u7c21\u55ae\u6613\u7528\u5730\u9060\u7a0b\u9023\u63a5\u6578\u64da\u5eab\uff0c\u5feb\u901f\u914d\u7f6e\u548c\u7ba1\u7406\u6578\u64da\u5eab\u9023\u63a5\uff0c\u63d0\u5347\u958b\u767c\u6548\u7387\u3002<\/p>\n","protected":false},"author":0,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[101],"tags":[],"class_list":["post-162485","post","type-post","status-publish","format-standard","hentry","category-database"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/162485","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/comments?post=162485"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/162485\/revisions"}],"predecessor-version":[{"id":162486,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/162485\/revisions\/162486"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=162485"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=162485"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=162485"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}