{"id":41097,"date":"2025-05-31T06:02:30","date_gmt":"2025-05-30T22:02:30","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/41097.html"},"modified":"2025-05-31T06:02:30","modified_gmt":"2025-05-30T22:02:30","slug":"%e3%80%90%e8%bd%af%e4%bb%b6%e3%80%91%e5%9c%a8-macos-%e4%b8%8a%e5%ae%89%e8%a3%85-mysql","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/41097.html","title":{"rendered":"\u3010\u8f6f\u4ef6\u3011\u5728 macOS \u4e0a\u5b89\u88c5 MySQL"},"content":{"rendered":"<p>\u5728 macOS \u4e0a\u5b89\u88c5 MySQL \u6709\u591a\u79cd\u65b9\u6cd5&#xff0c;\u4ee5\u4e0b\u662f\u4e24\u79cd\u5e38\u89c1\u7684\u5b89\u88c5\u65b9\u5f0f&#xff1a;\u901a\u8fc7 Homebrew \u5b89\u88c5\u548c\u901a\u8fc7\u5b89\u88c5\u5305\u5b89\u88c5\u3002\u4ee5\u4e0b\u662f\u8be6\u7ec6\u7684\u6b65\u9aa4&#xff1a;<\/p>\n<p>\u4e00\u3001\u901a\u8fc7 Homebrew \u5b89\u88c5 MySQL<\/p>\n<p>Homebrew \u662f macOS \u7684\u5305\u7ba1\u7406\u5668&#xff0c;\u4f7f\u7528\u5b83\u5b89\u88c5 MySQL \u975e\u5e38\u65b9\u4fbf\u3002<\/p>\n<p>1.\u5b89\u88c5 Homebrew&#xff08;\u5982\u679c\u5c1a\u672a\u5b89\u88c5&#xff09;<\/p>\n<p>\u6253\u5f00\u7ec8\u7aef&#xff0c;\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u5b89\u88c5 Homebrew&#xff1a;<\/p>\n<p>\/bin\/bash <span class=\"token parameter variable\">-c<\/span> <span class=\"token string\">&#034;<span class=\"token variable\"><span class=\"token variable\">$(<\/span><span class=\"token function\">curl<\/span> <span class=\"token parameter variable\">-fsSL<\/span> https:\/\/raw.githubusercontent.com\/Homebrew\/install\/HEAD\/install.sh<span class=\"token variable\">)<\/span><\/span>&#034;<\/span><\/p>\n<p>2.\u5b89\u88c5 MySQL<\/p>\n<p>\u5728\u7ec8\u7aef\u4e2d\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u5b89\u88c5 MySQL&#xff1a;<\/p>\n<p>brew <span class=\"token function\">install<\/span> mysql<\/p>\n<p>3.\u542f\u52a8 MySQL \u670d\u52a1<\/p>\n<p>\u542f\u52a8 MySQL \u670d\u52a1&#xff0c;\u5e76\u8bbe\u7f6e\u4e3a\u5f00\u673a\u81ea\u542f&#xff1a;<\/p>\n<p>brew services start mysql<\/p>\n<p>4.\u914d\u7f6e MySQL<\/p>\n<p>\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u914d\u7f6e MySQL \u7684\u5b89\u5168\u6027&#xff1a;<\/p>\n<p>mysql_secure_installation<\/p>\n<p>\u5728\u914d\u7f6e\u8fc7\u7a0b\u4e2d&#xff0c;\u4f60\u53ef\u4ee5\u8bbe\u7f6e root \u7528\u6237\u7684\u5bc6\u7801&#xff0c;\u914d\u7f6e\u4e00\u4e9b\u9009\u9879\u4ee5\u589e\u5f3a MySQL \u670d\u52a1\u5668\u7684\u5b89\u5168\u6027\u3002\u4f60\u4f1a\u770b\u5230\u5982\u4e0b\u7c7b\u4f3c\u7684\u8f93\u51fa&#xff1a;<\/p>\n<p>Securing the MySQL server deployment.<\/p>\n<p>Connecting to MySQL using a blank password.<\/p>\n<p>VALIDATE PASSWORD COMPONENT can be used to test passwords<br \/>\nand improve security. It checks the strength of password<br \/>\nand allows the users to set only those passwords which are<br \/>\nsecure enough. Would you like to setup VALIDATE PASSWORD component?<\/p>\n<p>Press y|Y for Yes, any other key for No: Y<\/p>\n<p>There are three levels of password validation policy:<\/p>\n<p>LOW    Length &gt;&#061; 8<br \/>\nMEDIUM Length &gt;&#061; 8, numeric, mixed case, and special characters<br \/>\nSTRONG Length &gt;&#061; 8, numeric, mixed case, special characters and dictionary file<\/p>\n<p>Please enter 0 &#061; LOW, 1 &#061; MEDIUM and 2 &#061; STRONG: 0<br \/>\nPlease set the password for root here.<\/p>\n<p>New password:<\/p>\n<p>Re-enter new password:<\/p>\n<p>Estimated strength of the password: 25<br \/>\nDo you wish to continue with the password provided?(Press y|Y for Yes, any other key for No) : Y<br \/>\nBy default, a MySQL installation has an anonymous user,<br \/>\nallowing anyone to log into MySQL without having to have<br \/>\na user account created for them. This is intended only for<br \/>\ntesting, and to make the installation go a bit smoother.<br \/>\nYou should remove them before moving into a production<br \/>\nenvironment.<\/p>\n<p>Remove anonymous users? (Press y|Y for Yes, any other key for No) : Y<br \/>\nSuccess.<\/p>\n<p>Normally, root should only be allowed to connect from<br \/>\n&#039;localhost&#039;. This ensures that someone cannot guess at<br \/>\nthe root password from the network.<\/p>\n<p>Disallow root login remotely? (Press y|Y for Yes, any other key for No) : Y<br \/>\nSuccess.<\/p>\n<p>By default, MySQL comes with a database named &#039;test&#039; that<br \/>\nanyone can access. This is also intended only for testing,<br \/>\nand should be removed before moving into a production<br \/>\nenvironment.<\/p>\n<p>Remove test database and access to it? (Press y|Y for Yes, any other key for No) : Y<br \/>\n &#8211; Dropping test database&#8230;<br \/>\nSuccess.<\/p>\n<p> &#8211; Removing privileges on test database&#8230;<br \/>\nSuccess.<\/p>\n<p>Reloading the privilege tables will ensure that all changes<br \/>\nmade so far will take effect immediately.<\/p>\n<p>Reload privilege tables now? (Press y|Y for Yes, any other key for No) : Y<br \/>\nSuccess.<\/p>\n<p>All done!<\/p>\n<p>5.\u7ba1\u7406 MySQL \u670d\u52a1<\/p>\n<p>Homebrew \u63d0\u4f9b\u4e86\u5b9e\u7528\u7684\u547d\u4ee4\u6765\u7ba1\u7406 MySQL \u670d\u52a1&#xff1a;<\/p>\n<p>\u2022 \u542f\u52a8 MySQL \u670d\u52a1\u5e76\u8bbe\u7f6e\u4e3a\u81ea\u542f\u52a8&#xff1a;<\/p>\n<p>  brew services start mysql<\/p>\n<p>\u2022 \u505c\u6b62 MySQL \u670d\u52a1\u5e76\u8bbe\u7f6e\u4e3a\u4e0d\u81ea\u542f\u52a8&#xff1a;<\/p>\n<p>  brew services stop mysql<\/p>\n<p>\u2022 \u53ea\u542f\u52a8 MySQL \u670d\u52a1&#xff1a;<\/p>\n<p>  brew services run mysql<\/p>\n<p>\u2022 \u4f7f\u7528mysql.server\u547d\u4ee4\u542f\u52a8\u6216\u505c\u6b62 MySQL \u670d\u52a1&#xff1a;<\/p>\n<p>  mysql.server start<br \/>\n  mysql.server stop<\/p>\n<p>\u4e8c\u3001\u901a\u8fc7\u5b89\u88c5\u5305\u5b89\u88c5 MySQL<\/p>\n<p>\u901a\u8fc7\u5b89\u88c5\u5305\u5b89\u88c5 MySQL \u7684\u8fc7\u7a0b\u6709\u53cb\u597d\u7684 UI \u754c\u9762&#xff0c;\u66f4\u52a0\u65b9\u4fbf\u5feb\u6377\u3002<\/p>\n<p>1.\u4e0b\u8f7d\u5b89\u88c5\u5305<\/p>\n<p>\u8bbf\u95eeMySQL \u5b98\u65b9\u4e0b\u8f7d\u9875\u9762&#xff0c;\u9009\u62e9\u9002\u5408 macOS \u7684 DMG \u5b89\u88c5\u5305\u3002\u4f8b\u5982&#xff0c;\u4e0b\u8f7dmysql-8.0.26-macos10.15-x86_64.pkg\u3002<\/p>\n<p>2.\u5b89\u88c5 MySQL<\/p>\n<p>\u2022 \u53cc\u51fb\u4e0b\u8f7d\u7684.dmg\u6587\u4ef6&#xff0c;\u5c06\u5176\u6302\u8f7d\u3002<\/p>\n<p>\u2022 \u53cc\u51fb\u5176\u4e2d\u7684.pkg\u5b89\u88c5\u5305\u6587\u4ef6\u542f\u52a8\u5b89\u88c5\u5411\u5bfc\u3002<\/p>\n<p>\u2022 \u6309\u7167\u5411\u5bfc\u63d0\u793a\u5b8c\u6210\u5b89\u88c5&#xff0c;\u5305\u62ec\u540c\u610f\u8bb8\u53ef\u534f\u8bae\u3001\u9009\u62e9\u5b89\u88c5\u4f4d\u7f6e&#xff08;\u901a\u5e38\u4e0d\u53ef\u66f4\u6539&#xff09;\u7b49\u3002<\/p>\n<p>\u2022 \u5728\u5b89\u88c5\u8fc7\u7a0b\u4e2d&#xff0c;\u7cfb\u7edf\u4f1a\u63d0\u793a\u4f60\u8bbe\u7f6e MySQL \u7684 root \u7528\u6237\u5bc6\u7801&#xff0c;\u8bf7\u52a1\u5fc5\u8bb0\u4f4f\u3002<\/p>\n<p>\u2022 \u5b89\u88c5\u5b8c\u6210\u540e&#xff0c;\u901a\u5e38\u4f1a\u5728\u201c\u7cfb\u7edf\u504f\u597d\u8bbe\u7f6e\u201d\u4e2d\u6dfb\u52a0\u4e00\u4e2a MySQL \u7684\u56fe\u6807&#xff0c;\u7528\u4e8e\u542f\u52a8\u548c\u505c\u6b62 MySQL \u670d\u52a1\u3002<\/p>\n<p>3.\u914d\u7f6e MySQL<\/p>\n<p>\u2022 \u914d\u7f6e\u73af\u5883\u53d8\u91cf&#xff08;\u53ef\u9009&#xff09;&#xff1a; \u4e3a\u4e86\u65b9\u4fbf\u5728\u7ec8\u7aef\u4e2d\u4f7f\u7528 MySQL \u547d\u4ee4&#xff0c;\u53ef\u4ee5\u5c06 MySQL \u7684bin\u76ee\u5f55&#xff08;\u901a\u5e38\u4f4d\u4e8e\/usr\/local\/mysql\/bin&#xff09;\u6dfb\u52a0\u5230 PATH \u73af\u5883\u53d8\u91cf\u4e2d\u3002\u7f16\u8f91~\/.bash_profile\u6216~\/.zshrc\u6587\u4ef6&#xff0c;\u6dfb\u52a0\u4ee5\u4e0b\u5185\u5bb9&#xff1a;<\/p>\n<p>   <span class=\"token builtin class-name\">export<\/span> <span class=\"token assign-left variable\"><span class=\"token environment constant\">PATH<\/span><\/span><span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;\/usr\/local\/mysql\/bin:<span class=\"token environment constant\">$PATH<\/span>&#034;<\/span><\/p>\n<p>\u7136\u540e\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u4f7f\u914d\u7f6e\u751f\u6548&#xff1a;<\/p>\n<p>   <span class=\"token builtin class-name\">source<\/span> ~\/.bash_profile<\/p>\n<p>\u6216\u8005&#xff1a;<\/p>\n<p>   <span class=\"token builtin class-name\">source<\/span> ~\/.zshrc<\/p>\n<p>\u2022 \u8fd0\u884c\u5b89\u5168\u811a\u672c&#xff1a; \u5b89\u88c5\u5b8c\u6210\u540e&#xff0c;\u5efa\u8bae\u8fd0\u884c\u5b89\u5168\u811a\u672c&#xff1a;<\/p>\n<p>   mysql_secure_installation<\/p>\n<p>\u8fd9\u5c06\u5f15\u5bfc\u4f60\u5b8c\u6210\u4e00\u4e9b\u5b89\u5168\u8bbe\u7f6e&#xff0c;\u5982\u8bbe\u7f6e root \u5bc6\u7801\u3001\u79fb\u9664\u533f\u540d\u7528\u6237\u3001\u7981\u6b62\u8fdc\u7a0b root \u767b\u5f55\u7b49\u3002<\/p>\n<p>\u4e09\u3001\u9a8c\u8bc1\u5b89\u88c5<\/p>\n<p>\u2022 \u6253\u5f00\u7ec8\u7aef&#xff0c;\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u9a8c\u8bc1 MySQL \u662f\u5426\u5b89\u88c5\u6210\u529f&#xff1a;<\/p>\n<p>   mysql <span class=\"token parameter variable\">-u<\/span> root <span class=\"token parameter variable\">-p<\/span><\/p>\n<p>\u8f93\u5165\u4f60\u5728\u5b89\u88c5\u8fc7\u7a0b\u4e2d\u8bbe\u7f6e\u7684 root \u7528\u6237\u5bc6\u7801\u3002<\/p>\n<p>\u2022 \u5728 MySQL \u547d\u4ee4\u884c\u4e2d&#xff0c;\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u67e5\u770b\u6570\u636e\u5e93\u5217\u8868\u548c MySQL \u7248\u672c&#xff1a;<\/p>\n<p>   <span class=\"token keyword\">SHOW<\/span> <span class=\"token keyword\">DATABASES<\/span><span class=\"token punctuation\">;<\/span><br \/>\n   <span class=\"token keyword\">SELECT<\/span> VERSION<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>\u56db\u3001\u5e38\u89c1\u95ee\u9898<\/p>\n<p>1.\u65e0\u6cd5\u542f\u52a8 MySQL \u670d\u52a1<\/p>\n<p>\u2022 \u5982\u679c MySQL \u670d\u52a1\u65e0\u6cd5\u542f\u52a8&#xff0c;\u53ef\u4ee5\u5c1d\u8bd5\u4ee5\u4e0b\u547d\u4ee4\u624b\u52a8\u542f\u52a8&#xff1a;<\/p>\n<p>  <span class=\"token function\">sudo<\/span> \/usr\/local\/mysql\/support-files\/mysql.server start<\/p>\n<p>\u2022 \u68c0\u67e5 MySQL \u7684\u65e5\u5fd7\u6587\u4ef6&#xff0c;\u901a\u5e38\u4f4d\u4e8e\/usr\/local\/mysql\/data\/\u76ee\u5f55\u4e0b&#xff0c;\u67e5\u770b\u5177\u4f53\u7684\u9519\u8bef\u4fe1\u606f\u3002<\/p>\n<p>2.\u5fd8\u8bb0 root \u5bc6\u7801<\/p>\n<p>\u2022 \u5982\u679c\u4f60\u5fd8\u8bb0\u4e86 root \u7528\u6237\u7684\u5bc6\u7801&#xff0c;\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u6b65\u9aa4\u91cd\u7f6e\u5bc6\u7801&#xff1a;<\/p>\n<p>\u2022 \u505c\u6b62 MySQL \u670d\u52a1&#xff1a;<\/p>\n<p>     <span class=\"token function\">sudo<\/span> \/usr\/local\/mysql\/support-files\/mysql.server stop<br \/>\n     &#096;&#096;<span class=\"token variable\"><span class=\"token variable\">&#096;<\/span><\/p>\n<p>\u2022 \u542f\u52a8 MySQL \u670d\u52a1&#xff0c;\u8df3\u8fc7\u6743\u9650\u8868&#xff1a;<\/p>\n<p><span class=\"token variable\">&#096;<\/span><\/span>&#096;<span class=\"token variable\"><span class=\"token variable\">&#096;<\/span><span class=\"token function\">sh<\/span><br \/>\n     <span class=\"token function\">sudo<\/span> \/usr\/local\/mysql\/bin\/mysqld_safe &#8211;skip-grant-tables <span class=\"token operator\">&amp;<\/span><br \/>\n     <span class=\"token variable\">&#096;<\/span><\/span>&#096;<span class=\"token variable\"><span class=\"token variable\">&#096;<\/span><\/p>\n<p>\u2022 \u767b\u5f55 MySQL&#xff1a;<\/p>\n<p><span class=\"token variable\">&#096;<\/span><\/span>&#096;<span class=\"token variable\"><span class=\"token variable\">&#096;<\/span><span class=\"token function\">sh<\/span><br \/>\n     mysql <span class=\"token parameter variable\">-u<\/span> root<br \/>\n     <span class=\"token variable\">&#096;<\/span><\/span>&#096;<span class=\"token variable\"><span class=\"token variable\">&#096;<\/span><\/p>\n<p>\u2022 \u91cd\u7f6e root \u5bc6\u7801&#xff1a;<\/p>\n<p><span class=\"token variable\">&#096;<\/span><\/span>&#096;<span class=\"token variable\"><span class=\"token variable\">&#096;<\/span>sql<br \/>\n     FLUSH PRIVILEGES<span class=\"token punctuation\">;<\/span><br \/>\n     ALTER <span class=\"token environment constant\">USER<\/span> <span class=\"token string\">&#039;root&#039;<\/span>&#064;<span class=\"token string\">&#039;localhost&#039;<\/span> IDENTIFIED BY <span class=\"token string\">&#039;new_password&#039;<\/span><span class=\"token punctuation\">;<\/span><br \/>\n     <span class=\"token variable\">&#096;<\/span><\/span>&#096;<span class=\"token variable\"><span class=\"token variable\">&#096;<\/span><\/p>\n<p>\u2022 \u9000\u51fa MySQL \u5e76\u91cd\u542f\u670d\u52a1&#xff1a;<\/p>\n<p><span class=\"token variable\">&#096;<\/span><\/span>&#096;<span class=\"token variable\"><span class=\"token variable\">&#096;<\/span><span class=\"token function\">sh<\/span><br \/>\n     <span class=\"token builtin class-name\">exit<\/span><br \/>\n     <span class=\"token function\">sudo<\/span> \/usr\/local\/mysql\/support-files\/mysql.server restart<br \/>\n     <span class=\"token variable\">&#096;<\/span><\/span>&#096;<span class=\"token variable\"><span class=\"token variable\">&#096;<\/span><\/p>\n<p>\u4e94\u3001\u603b\u7ed3<\/p>\n<p>\u901a\u8fc7\u4e0a\u8ff0\u6b65\u9aa4&#xff0c;\u4f60\u53ef\u4ee5\u5728 macOS \u4e0a\u6210\u529f\u5b89\u88c5\u5e76\u914d\u7f6e MySQL\u3002\u4f7f\u7528 Homebrew \u5b89\u88c5 MySQL \u662f\u6700\u7b80\u5355\u548c\u63a8\u8350\u7684\u65b9\u5f0f&#xff0c;\u56e0\u4e3a\u5b83\u63d0\u4f9b\u4e86\u65b9\u4fbf\u7684\u547d\u4ee4\u884c\u5de5\u5177\u6765\u7ba1\u7406 MySQL \u670d\u52a1\u3002\u5982\u679c\u4f60\u66f4\u559c\u6b22\u56fe\u5f62\u5316\u754c\u9762&#xff0c;\u53ef\u4ee5\u901a\u8fc7\u5b89\u88c5\u5305\u5b89\u88c5 MySQL\u3002\u5b89\u88c5\u5b8c\u6210\u540e&#xff0c;\u5efa\u8bae\u8fd0\u884c\u5b89\u5168\u811a\u672c<span class=\"token variable\">&#096;<\/span><\/span>mysql_secure_installation&#096;&#xff0c;\u4ee5\u589e\u5f3a MySQL \u670d\u52a1\u5668\u7684\u5b89\u5168\u6027\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb347\u6b21\uff0c\u70b9\u8d5e9\u6b21\uff0c\u6536\u85cf8\u6b21\u3002\u6458\u8981\uff1a\u672c\u6587\u4ecb\u7ecd\u4e86\u5728macOS\u4e0a\u5b89\u88c5MySQL\u7684\u4e24\u79cd\u4e3b\u8981\u65b9\u6cd5\uff1a\u4f7f\u7528Homebrew\u548c\u5b89\u88c5\u5305\u3002\u901a\u8fc7Homebrew\u5b89\u88c5\u6b65\u9aa4\u5305\u62ec\u5b89\u88c5Homebrew\u3001MySQL\u3001\u542f\u52a8\u670d\u52a1\u53ca\u5b89\u5168\u914d\u7f6e\uff1b\u901a\u8fc7\u5b89\u88c5\u5305\u5b89\u88c5\u5219\u63d0\u4f9b\u56fe\u5f62\u754c\u9762\u5411\u5bfc\u3002\u4e24\u79cd\u65b9\u5f0f\u5b8c\u6210\u540e\u90fd\u5efa\u8bae\u8fd0\u884c\u5b89\u5168\u811a\u672c\uff0c\u5e76\u63d0\u4f9b\u4e86\u9a8c\u8bc1\u5b89\u88c5\u3001\u5e38\u89c1\u95ee\u9898\u89e3\u51b3\u65b9\u6cd5\u53ca\u5bc6\u7801\u91cd\u7f6e\u6b65\u9aa4\u3002Homebrew\u65b9\u5f0f\u66f4\u7b80\u5355\u63a8\u8350\uff0c\u800c\u5b89\u88c5\u5305\u9002\u5408\u504f\u597d\u56fe\u5f62\u754c\u9762\u7684\u7528\u6237\u3002\u4e24\u79cd\u65b9\u6cd5\u5747\u80fd\u6210\u529f\u5b89\u88c5\u5e76\u8fd0\u884cMySQL\u6570\u636e\u5e93\u670d\u52a1\u3002<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[116,330,114],"topic":[],"class_list":["post-41097","post","type-post","status-publish","format-standard","hentry","category-server","tag-adb","tag-macos","tag-mysql"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u3010\u8f6f\u4ef6\u3011\u5728 macOS \u4e0a\u5b89\u88c5 MySQL - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/41097.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u3010\u8f6f\u4ef6\u3011\u5728 macOS \u4e0a\u5b89\u88c5 MySQL - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb347\u6b21\uff0c\u70b9\u8d5e9\u6b21\uff0c\u6536\u85cf8\u6b21\u3002\u6458\u8981\uff1a\u672c\u6587\u4ecb\u7ecd\u4e86\u5728macOS\u4e0a\u5b89\u88c5MySQL\u7684\u4e24\u79cd\u4e3b\u8981\u65b9\u6cd5\uff1a\u4f7f\u7528Homebrew\u548c\u5b89\u88c5\u5305\u3002\u901a\u8fc7Homebrew\u5b89\u88c5\u6b65\u9aa4\u5305\u62ec\u5b89\u88c5Homebrew\u3001MySQL\u3001\u542f\u52a8\u670d\u52a1\u53ca\u5b89\u5168\u914d\u7f6e\uff1b\u901a\u8fc7\u5b89\u88c5\u5305\u5b89\u88c5\u5219\u63d0\u4f9b\u56fe\u5f62\u754c\u9762\u5411\u5bfc\u3002\u4e24\u79cd\u65b9\u5f0f\u5b8c\u6210\u540e\u90fd\u5efa\u8bae\u8fd0\u884c\u5b89\u5168\u811a\u672c\uff0c\u5e76\u63d0\u4f9b\u4e86\u9a8c\u8bc1\u5b89\u88c5\u3001\u5e38\u89c1\u95ee\u9898\u89e3\u51b3\u65b9\u6cd5\u53ca\u5bc6\u7801\u91cd\u7f6e\u6b65\u9aa4\u3002Homebrew\u65b9\u5f0f\u66f4\u7b80\u5355\u63a8\u8350\uff0c\u800c\u5b89\u88c5\u5305\u9002\u5408\u504f\u597d\u56fe\u5f62\u754c\u9762\u7684\u7528\u6237\u3002\u4e24\u79cd\u65b9\u6cd5\u5747\u80fd\u6210\u529f\u5b89\u88c5\u5e76\u8fd0\u884cMySQL\u6570\u636e\u5e93\u670d\u52a1\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/41097.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-05-30T22:02:30+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/41097.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/41097.html\",\"name\":\"\u3010\u8f6f\u4ef6\u3011\u5728 macOS \u4e0a\u5b89\u88c5 MySQL - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-05-30T22:02:30+00:00\",\"dateModified\":\"2025-05-30T22:02:30+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/41097.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/41097.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/41097.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u3010\u8f6f\u4ef6\u3011\u5728 macOS \u4e0a\u5b89\u88c5 MySQL\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u3010\u8f6f\u4ef6\u3011\u5728 macOS \u4e0a\u5b89\u88c5 MySQL - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/41097.html","og_locale":"zh_CN","og_type":"article","og_title":"\u3010\u8f6f\u4ef6\u3011\u5728 macOS \u4e0a\u5b89\u88c5 MySQL - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb347\u6b21\uff0c\u70b9\u8d5e9\u6b21\uff0c\u6536\u85cf8\u6b21\u3002\u6458\u8981\uff1a\u672c\u6587\u4ecb\u7ecd\u4e86\u5728macOS\u4e0a\u5b89\u88c5MySQL\u7684\u4e24\u79cd\u4e3b\u8981\u65b9\u6cd5\uff1a\u4f7f\u7528Homebrew\u548c\u5b89\u88c5\u5305\u3002\u901a\u8fc7Homebrew\u5b89\u88c5\u6b65\u9aa4\u5305\u62ec\u5b89\u88c5Homebrew\u3001MySQL\u3001\u542f\u52a8\u670d\u52a1\u53ca\u5b89\u5168\u914d\u7f6e\uff1b\u901a\u8fc7\u5b89\u88c5\u5305\u5b89\u88c5\u5219\u63d0\u4f9b\u56fe\u5f62\u754c\u9762\u5411\u5bfc\u3002\u4e24\u79cd\u65b9\u5f0f\u5b8c\u6210\u540e\u90fd\u5efa\u8bae\u8fd0\u884c\u5b89\u5168\u811a\u672c\uff0c\u5e76\u63d0\u4f9b\u4e86\u9a8c\u8bc1\u5b89\u88c5\u3001\u5e38\u89c1\u95ee\u9898\u89e3\u51b3\u65b9\u6cd5\u53ca\u5bc6\u7801\u91cd\u7f6e\u6b65\u9aa4\u3002Homebrew\u65b9\u5f0f\u66f4\u7b80\u5355\u63a8\u8350\uff0c\u800c\u5b89\u88c5\u5305\u9002\u5408\u504f\u597d\u56fe\u5f62\u754c\u9762\u7684\u7528\u6237\u3002\u4e24\u79cd\u65b9\u6cd5\u5747\u80fd\u6210\u529f\u5b89\u88c5\u5e76\u8fd0\u884cMySQL\u6570\u636e\u5e93\u670d\u52a1\u3002","og_url":"https:\/\/www.wsisp.com\/helps\/41097.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-05-30T22:02:30+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"3 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/41097.html","url":"https:\/\/www.wsisp.com\/helps\/41097.html","name":"\u3010\u8f6f\u4ef6\u3011\u5728 macOS \u4e0a\u5b89\u88c5 MySQL - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-05-30T22:02:30+00:00","dateModified":"2025-05-30T22:02:30+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/41097.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/41097.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/41097.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u3010\u8f6f\u4ef6\u3011\u5728 macOS \u4e0a\u5b89\u88c5 MySQL"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/41097","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=41097"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/41097\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=41097"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=41097"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=41097"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=41097"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}