{"id":51167,"date":"2025-08-10T18:40:57","date_gmt":"2025-08-10T10:40:57","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/51167.html"},"modified":"2025-08-10T18:40:57","modified_gmt":"2025-08-10T10:40:57","slug":"%e4%ba%9a%e9%ba%bb%e4%ba%91%e4%b9%8b%e6%95%b0%e6%8d%ae%e5%ae%89%e5%ae%b6-rds%e6%95%b0%e6%8d%ae%e5%ba%93%e6%9c%8d%e5%8a%a1%e5%85%a5%e9%97%a8","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/51167.html","title":{"rendered":"\u4e9a\u9ebb\u4e91\u4e4b\u6570\u636e\u5b89\u5bb6\u2014\u2014RDS\u6570\u636e\u5e93\u670d\u52a1\u5165\u95e8"},"content":{"rendered":"<h2>\u672c\u6587\u4f5c\u8005: \u5c01\u78ca<\/h2>\n<h2>Eclicktech SA | AWS Community Builder DevTool | AWS UGL | \u4e9a\u9a6c\u900a\u4e91\u79d1\u6280\u4e91\u535a\u4e3b<\/h2>\n<h2>\u963f\u91cc\u4e91&amp;InfoQ&amp;CSDN\u7b7e\u7ea6\u4f5c\u8005<\/h2>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250810104056-68987738845a1.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<h3>\u524d\u8a00<\/h3>\n<p>\u5728\u524d\u4e24\u7bc7\u6587\u7ae0\u4e2d&#xff0c;\u6211\u4eec\u4eceLightsail\u7684\u7b80\u5355\u5165\u95e8&#xff0c;\u8fdb\u9636\u5230\u4e86EC2\u7684\u7075\u6d3b\u914d\u7f6e&#xff0c;\u751a\u81f3\u5728EC2\u4e0a\u6210\u529f\u90e8\u7f72\u4e86WordPress\u7f51\u7ad9\u3002\u4f46\u662f&#xff0c;\u5f53\u4f60\u5f00\u59cb\u8ba4\u771f\u8fd0\u8425\u7f51\u7ad9\u65f6&#xff0c;\u4f1a\u53d1\u73b0\u4e00\u4e2a\u8ba9\u4eba\u5934\u75bc\u7684\u95ee\u9898&#xff1a;\u6570\u636e\u5e93\u7ba1\u7406\u3002\u6df1\u591c\u7684\u6570\u636e\u5e93\u5d29\u6e83\u3001\u590d\u6742\u7684\u5907\u4efd\u6062\u590d\u3001\u6027\u80fd\u8c03\u4f18\u7684\u56f0\u6270\u2026\u8fd9\u4e9b\u90fd\u8ba9\u4eba\u671b\u800c\u5374\u6b65\u3002<\/p>\n<p>\u4eca\u5929&#xff0c;\u8ba9\u6211\u4eec\u4e3a\u6570\u636e\u627e\u4e00\u4e2a\u5b89\u5168\u8212\u9002\u7684&#034;\u65b0\u5bb6&#034;\u2014\u2014Amazon RDS&#xff08;Relational Database Service&#xff09;\u3002<\/p>\n<h3>\u81ea\u5efa\u6570\u636e\u5e93\u7684\u75db\u70b9<\/h3>\n<p>\u8fd8\u8bb0\u5f97\u6211\u4eec\u5728EC2\u4e0a\u5b89\u88c5MySQL\u7684\u8fc7\u7a0b\u5417&#xff1f;\u770b\u4f3c\u7b80\u5355&#xff0c;\u4f46\u5b9e\u9645\u8fd0\u8425\u4e2d\u4f1a\u9047\u5230\u8bf8\u591a\u6311\u6218&#xff1a;<\/p>\n<h4>\u8fd0\u7ef4\u590d\u6742\u5ea6\u9ad8<\/h4>\n<p><span class=\"token comment\"># \u6bcf\u5929\u90fd\u8981\u62c5\u5fc3\u7684\u4e8b\u60c5<\/span><br \/>\n<span class=\"token function\">sudo<\/span> systemctl status mysqld  <span class=\"token comment\"># \u670d\u52a1\u662f\u5426\u6b63\u5e38&#xff1f;<\/span><br \/>\n<span class=\"token function\">df<\/span> -h  <span class=\"token comment\"># \u78c1\u76d8\u7a7a\u95f4\u591f\u7528\u5417&#xff1f;<\/span><br \/>\n<span class=\"token function\">tail<\/span> -f \/var\/log\/mysqld.log  <span class=\"token comment\"># \u6709\u6ca1\u6709\u9519\u8bef\u65e5\u5fd7&#xff1f;<\/span><br \/>\nmysqldump -u root -p database_name <span class=\"token operator\">&gt;<\/span> backup.sql  <span class=\"token comment\"># \u5907\u4efd\u505a\u4e86\u5417&#xff1f;<\/span><\/p>\n<h4>\u9ad8\u53ef\u7528\u6027\u96be\u5b9e\u73b0<\/h4>\n<ul>\n<li>\u5355\u70b9\u6545\u969c\u98ce\u9669&#xff1a;\u670d\u52a1\u5668\u5b95\u673a&#xff0c;\u6570\u636e\u5e93\u5c31\u4e0d\u53ef\u7528<\/li>\n<li>\u5907\u4efd\u6062\u590d\u590d\u6742&#xff1a;\u624b\u52a8\u5907\u4efd\u5bb9\u6613\u51fa\u9519&#xff0c;\u6062\u590d\u8fc7\u7a0b\u7e41\u7410<\/li>\n<li>\u6269\u5c55\u56f0\u96be&#xff1a;\u8bfb\u5199\u5206\u79bb\u3001\u4e3b\u4ece\u590d\u5236\u914d\u7f6e\u590d\u6742<\/li>\n<\/ul>\n<h4>\u5b89\u5168\u6027\u6311\u6218<\/h4>\n<ul>\n<li>\u8865\u4e01\u66f4\u65b0&#xff1a;\u9700\u8981\u624b\u52a8\u8ddf\u8e2a\u548c\u5e94\u7528\u5b89\u5168\u8865\u4e01<\/li>\n<li>\u8bbf\u95ee\u63a7\u5236&#xff1a;\u9632\u706b\u5899\u3001\u7528\u6237\u6743\u9650\u7ba1\u7406\u590d\u6742<\/li>\n<li>\u6570\u636e\u52a0\u5bc6&#xff1a;\u9759\u6001\u52a0\u5bc6\u548c\u4f20\u8f93\u52a0\u5bc6\u9700\u8981\u989d\u5916\u914d\u7f6e<\/li>\n<\/ul>\n<h3>\u4ec0\u4e48\u662fAmazon RDS&#xff1f;<\/h3>\n<p>Amazon RDS\u662fAWS\u63d0\u4f9b\u7684\u6258\u7ba1\u5173\u7cfb\u6570\u636e\u5e93\u670d\u52a1&#xff0c;\u5c31\u50cf\u4e3a\u4f60\u7684\u6570\u636e\u8bf7\u4e86\u4e00\u4e2a\u4e13\u4e1a\u7684&#034;\u7ba1\u5bb6&#034;\u3002<\/p>\n<h4>RDS\u7684\u6838\u5fc3\u4f18\u52bf<\/h4>\n<p>1. \u6258\u7ba1\u670d\u52a1&#xff0c;\u7701\u5fc3\u7701\u529b<\/p>\n<ul>\n<li>AWS\u8d1f\u8d23\u786c\u4ef6\u7ef4\u62a4\u3001\u64cd\u4f5c\u7cfb\u7edf\u66f4\u65b0\u3001\u6570\u636e\u5e93\u8865\u4e01<\/li>\n<li>\u81ea\u52a8\u6545\u969c\u68c0\u6d4b\u548c\u6062\u590d<\/li>\n<li>\u65e0\u9700\u62c5\u5fc3\u5e95\u5c42\u57fa\u7840\u8bbe\u65bd<\/li>\n<\/ul>\n<p>2. \u81ea\u52a8\u5907\u4efd&#xff0c;\u6570\u636e\u5b89\u5168<\/p>\n<ul>\n<li>\u6bcf\u65e5\u81ea\u52a8\u5907\u4efd&#xff0c;\u4fdd\u7559\u671f\u53ef\u914d\u7f6e&#xff08;1-35\u5929&#xff09;<\/li>\n<li>\u65f6\u95f4\u70b9\u6062\u590d&#xff0c;\u7cbe\u786e\u5230\u79d2<\/li>\n<li>\u8de8\u53ef\u7528\u533a\u5907\u4efd&#xff0c;\u9632\u6b62\u533a\u57df\u6027\u6545\u969c<\/li>\n<\/ul>\n<p>3. \u9ad8\u53ef\u7528\u6027<\/p>\n<ul>\n<li>Multi-AZ\u90e8\u7f72&#xff0c;\u81ea\u52a8\u6545\u969c\u8f6c\u79fb<\/li>\n<li>\u8bfb\u53d6\u526f\u672c&#xff0c;\u63d0\u5347\u8bfb\u53d6\u6027\u80fd<\/li>\n<li>99.95%\u7684\u53ef\u7528\u6027SLA<\/li>\n<\/ul>\n<p>4. \u5f39\u6027\u6269\u5c55<\/p>\n<ul>\n<li>\u5b58\u50a8\u81ea\u52a8\u6269\u5c55<\/li>\n<li>\u8ba1\u7b97\u8d44\u6e90\u53ef\u968f\u65f6\u8c03\u6574<\/li>\n<li>\u8bfb\u53d6\u526f\u672c\u8f7b\u677e\u6dfb\u52a0<\/li>\n<\/ul>\n<h3>\u6570\u636e\u5e93\u5f15\u64ce\u9009\u62e9\u6307\u5357<\/h3>\n<p>RDS\u652f\u6301\u591a\u79cd\u6570\u636e\u5e93\u5f15\u64ce&#xff0c;\u6211\u4eec\u91cd\u70b9\u4ecb\u7ecd\u6700\u5e38\u7528\u7684\u51e0\u79cd&#xff1a;<\/p>\n<h4>MySQL&#xff08;\u63a8\u8350\u5165\u95e8&#xff09;<\/h4>\n<p><span class=\"token comment\">&#8212; \u4f18\u52bf&#xff1a;<\/span><br \/>\n<span class=\"token comment\">&#8212; \u2713 \u6700\u6d41\u884c\u7684\u5f00\u6e90\u6570\u636e\u5e93<\/span><br \/>\n<span class=\"token comment\">&#8212; \u2713 WordPress\u7b49\u5e94\u7528\u5e7f\u6cdb\u652f\u6301<\/span><br \/>\n<span class=\"token comment\">&#8212; \u2713 \u793e\u533a\u8d44\u6e90\u4e30\u5bcc<\/span><br \/>\n<span class=\"token comment\">&#8212; \u2713 \u5b66\u4e60\u6210\u672c\u4f4e<\/span><\/p>\n<p><span class=\"token comment\">&#8212; \u9002\u7528\u573a\u666f&#xff1a;<\/span><br \/>\n<span class=\"token comment\">&#8212; \u2022 Web\u5e94\u7528<\/span><br \/>\n<span class=\"token comment\">&#8212; \u2022 \u5185\u5bb9\u7ba1\u7406\u7cfb\u7edf<\/span><br \/>\n<span class=\"token comment\">&#8212; \u2022 \u7535\u5546\u5e73\u53f0<\/span><\/p>\n<h4>PostgreSQL&#xff08;\u529f\u80fd\u5f3a\u5927&#xff09;<\/h4>\n<p><span class=\"token comment\">&#8212; \u4f18\u52bf&#xff1a;<\/span><br \/>\n<span class=\"token comment\">&#8212; \u2713 \u529f\u80fd\u4e30\u5bcc&#xff0c;\u652f\u6301\u590d\u6742\u67e5\u8be2<\/span><br \/>\n<span class=\"token comment\">&#8212; \u2713 \u6570\u636e\u5b8c\u6574\u6027\u5f3a<\/span><br \/>\n<span class=\"token comment\">&#8212; \u2713 \u6269\u5c55\u6027\u597d<\/span><br \/>\n<span class=\"token comment\">&#8212; \u2713 \u5f00\u6e90\u4e14\u6d3b\u8dc3<\/span><\/p>\n<p><span class=\"token comment\">&#8212; \u9002\u7528\u573a\u666f&#xff1a;<\/span><br \/>\n<span class=\"token comment\">&#8212; \u2022 \u4f01\u4e1a\u5e94\u7528<\/span><br \/>\n<span class=\"token comment\">&#8212; \u2022 \u6570\u636e\u5206\u6790<\/span><br \/>\n<span class=\"token comment\">&#8212; \u2022 \u5730\u7406\u4fe1\u606f\u7cfb\u7edf<\/span><\/p>\n<h4>MariaDB&#xff08;MySQL\u517c\u5bb9&#xff09;<\/h4>\n<p><span class=\"token comment\">&#8212; \u4f18\u52bf&#xff1a;<\/span><br \/>\n<span class=\"token comment\">&#8212; \u2713 MySQL\u7684\u5f00\u6e90\u5206\u652f<\/span><br \/>\n<span class=\"token comment\">&#8212; \u2713 \u5b8c\u5168\u517c\u5bb9MySQL<\/span><br \/>\n<span class=\"token comment\">&#8212; \u2713 \u6027\u80fd\u4f18\u5316\u66f4\u597d<\/span><br \/>\n<span class=\"token comment\">&#8212; \u2713 \u793e\u533a\u9a71\u52a8\u5f00\u53d1<\/span><\/p>\n<p><span class=\"token comment\">&#8212; \u9002\u7528\u573a\u666f&#xff1a;<\/span><br \/>\n<span class=\"token comment\">&#8212; \u2022 \u9700\u8981MySQL\u517c\u5bb9\u6027<\/span><br \/>\n<span class=\"token comment\">&#8212; \u2022 \u8ffd\u6c42\u66f4\u597d\u6027\u80fd<\/span><br \/>\n<span class=\"token comment\">&#8212; \u2022 \u5f00\u6e90\u4f18\u5148\u7b56\u7565<\/span><\/p>\n<h3>\u5b9e\u6218\u6848\u4f8b&#xff1a;WordPress\u6570\u636e\u5e93\u8fc1\u79fb\u5230RDS<\/h3>\n<p>\u8ba9\u6211\u4eec\u5c06\u4e4b\u524d\u5728EC2\u4e0a\u7684WordPress\u6570\u636e\u5e93\u8fc1\u79fb\u5230RDS&#xff0c;\u4f53\u9a8c\u6258\u7ba1\u6570\u636e\u5e93\u7684\u4fbf\u5229\u3002<\/p>\n<h4>\u6b65\u9aa41&#xff1a;\u521b\u5efaRDS\u5b9e\u4f8b<\/h4>\n<h5>\u4f7f\u7528\u63a7\u5236\u53f0\u521b\u5efa<\/h5>\n<li>\u9009\u62e9\u6570\u636e\u5e93\u5f15\u64ce&#xff1a;MySQL 8.0<\/li>\n<li>\u9009\u62e9\u6a21\u677f&#xff1a;\u514d\u8d39\u5957\u9910&#xff08;\u9002\u5408\u5b66\u4e60&#xff09;<\/li>\n<li>\u5b9e\u4f8b\u914d\u7f6e&#xff1a;\n<ul>\n<li>\u5b9e\u4f8b\u7c7b\u578b&#xff1a;db.t3.micro<\/li>\n<li>\u5b58\u50a8&#xff1a;20GB gp2<\/li>\n<li>\u5b58\u50a8\u81ea\u52a8\u6269\u5c55&#xff1a;\u542f\u7528<\/li>\n<\/ul>\n<\/li>\n<li>\u8fde\u63a5\u914d\u7f6e&#xff1a;\n<ul>\n<li>VPC&#xff1a;\u9009\u62e9EC2\u6240\u5728\u7684VPC<\/li>\n<li>\u5b50\u7f51\u7ec4&#xff1a;\u9ed8\u8ba4<\/li>\n<li>\u516c\u5f00\u8bbf\u95ee&#xff1a;\u5426&#xff08;\u5b89\u5168\u8003\u8651&#xff09;<\/li>\n<li>\u5b89\u5168\u7ec4&#xff1a;\u521b\u5efa\u65b0\u7684RDS\u5b89\u5168\u7ec4<\/li>\n<\/ul>\n<\/li>\n<h5>\u4f7f\u7528\u547d\u4ee4\u884c\u521b\u5efa<\/h5>\n<p><span class=\"token comment\"># \u521b\u5efaRDS\u5b50\u7f51\u7ec4<\/span><br \/>\naws rds create-db-subnet-group <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;db-subnet-group-name wordpress-subnet-group <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;db-subnet-group-description <span class=\"token string\">&#034;Subnet group for WordPress RDS&#034;<\/span> <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;subnet-ids subnet-12345678 subnet-87654321<\/p>\n<p><span class=\"token comment\"># \u521b\u5efaRDS\u5b89\u5168\u7ec4<\/span><br \/>\naws ec2 create-security-group <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;group-name rds-wordpress-sg <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;description <span class=\"token string\">&#034;Security group for WordPress RDS&#034;<\/span> <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;vpc-id vpc-12345678<\/p>\n<p><span class=\"token comment\"># \u5141\u8bb8EC2\u5b89\u5168\u7ec4\u8bbf\u95eeRDS<\/span><br \/>\naws ec2 authorize-security-group-ingress <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;group-id sg-rds123456 <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;protocol tcp <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;port <span class=\"token number\">3306<\/span> <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;source-group sg-ec2123456<\/p>\n<p><span class=\"token comment\"># \u521b\u5efaRDS\u5b9e\u4f8b<\/span><br \/>\naws rds create-db-instance <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;db-instance-identifier wordpress-db <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;db-instance-class db.t3.micro <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;engine mysql <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;engine-version <span class=\"token number\">8.0<\/span>.35 <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;master-username admin <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;master-user-password MySecurePassword123 <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;allocated-storage <span class=\"token number\">20<\/span> <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;storage-type gp2 <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;storage-encrypted <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;vpc-security-group-ids sg-rds123456 <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;db-subnet-group-name wordpress-subnet-group <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;backup-retention-period <span class=\"token number\">7<\/span> <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;multi-az <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;no-publicly-accessible<\/p>\n<h4>\u6b65\u9aa42&#xff1a;\u5907\u4efdEC2\u4e0a\u7684\u6570\u636e<\/h4>\n<p><span class=\"token comment\"># \u8fde\u63a5\u5230EC2\u5b9e\u4f8b<\/span><br \/>\n<span class=\"token function\">ssh<\/span> -i my-key.pem ec2-user&#064;your-ec2-ip<\/p>\n<p><span class=\"token comment\"># \u5907\u4efdWordPress\u6570\u636e\u5e93<\/span><br \/>\nmysqldump -u root -p wordpress <span class=\"token operator\">&gt;<\/span> wordpress_backup.sql<\/p>\n<p><span class=\"token comment\"># \u67e5\u770b\u5907\u4efd\u6587\u4ef6<\/span><br \/>\n<span class=\"token function\">ls<\/span> -lh wordpress_backup.sql<\/p>\n<h4>\u6b65\u9aa43&#xff1a;\u6062\u590d\u6570\u636e\u5230RDS<\/h4>\n<p><span class=\"token comment\"># \u83b7\u53d6RDS\u7aef\u70b9\u5730\u5740<\/span><br \/>\naws rds describe-db-instances <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;db-instance-identifier wordpress-db <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;query <span class=\"token string\">&#039;DBInstances[0].Endpoint.Address&#039;<\/span> <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;output text<\/p>\n<p><span class=\"token comment\"># \u8fde\u63a5\u5230RDS\u5b9e\u4f8b<\/span><br \/>\nmysql -h your-rds-endpoint.amazonaws.com -u admin -p<\/p>\n<p><span class=\"token comment\"># \u521b\u5efaWordPress\u6570\u636e\u5e93<\/span><br \/>\nCREATE DATABASE wordpress<span class=\"token punctuation\">;<\/span><br \/>\nUSE wordpress<span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token comment\"># \u9000\u51faMySQL&#xff0c;\u5bfc\u5165\u6570\u636e<\/span><br \/>\nmysql -h your-rds-endpoint.amazonaws.com -u admin -p wordpress <span class=\"token operator\">&lt;<\/span> wordpress_backup.sql<\/p>\n<h4>\u6b65\u9aa44&#xff1a;\u66f4\u65b0WordPress\u914d\u7f6e<\/h4>\n<p><span class=\"token comment\"># \u7f16\u8f91WordPress\u914d\u7f6e\u6587\u4ef6<\/span><br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">nano<\/span> \/var\/www\/html\/wp-config.php<\/p>\n<p>\u66f4\u65b0\u6570\u636e\u5e93\u8fde\u63a5\u4fe1\u606f&#xff1a;<\/p>\n<p><span class=\"token comment\">\/\/ \u539f\u6765\u7684\u914d\u7f6e<\/span><br \/>\n<span class=\"token function\">define<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string single-quoted-string\">&#039;DB_NAME&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string single-quoted-string\">&#039;wordpress&#039;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token function\">define<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string single-quoted-string\">&#039;DB_USER&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string single-quoted-string\">&#039;root&#039;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token function\">define<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string single-quoted-string\">&#039;DB_PASSWORD&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string single-quoted-string\">&#039;your-old-password&#039;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token function\">define<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string single-quoted-string\">&#039;DB_HOST&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string single-quoted-string\">&#039;localhost&#039;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token comment\">\/\/ \u65b0\u7684RDS\u914d\u7f6e<\/span><br \/>\n<span class=\"token function\">define<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string single-quoted-string\">&#039;DB_NAME&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string single-quoted-string\">&#039;wordpress&#039;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token function\">define<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string single-quoted-string\">&#039;DB_USER&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string single-quoted-string\">&#039;admin&#039;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token function\">define<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string single-quoted-string\">&#039;DB_PASSWORD&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string single-quoted-string\">&#039;MySecurePassword123&#039;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token function\">define<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string single-quoted-string\">&#039;DB_HOST&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string single-quoted-string\">&#039;your-rds-endpoint.amazonaws.com&#039;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<h4>\u6b65\u9aa45&#xff1a;\u6d4b\u8bd5\u8fde\u63a5<\/h4>\n<p><span class=\"token comment\"># \u91cd\u542fApache\u670d\u52a1<\/span><br \/>\n<span class=\"token function\">sudo<\/span> systemctl restart httpd<\/p>\n<p><span class=\"token comment\"># \u6d4b\u8bd5\u7f51\u7ad9\u8bbf\u95ee<\/span><br \/>\n<span class=\"token function\">curl<\/span> -I http:\/\/your-ec2-ip<\/p>\n<p>\u8bbf\u95ee\u4f60\u7684WordPress\u7f51\u7ad9&#xff0c;\u5982\u679c\u4e00\u5207\u6b63\u5e38&#xff0c;\u606d\u559c\u4f60&#xff01;\u6570\u636e\u5e93\u5df2\u7ecf\u6210\u529f\u8fc1\u79fb\u5230RDS\u3002<\/p>\n<h3>RDS\u57fa\u7840\u914d\u7f6e\u8be6\u89e3<\/h3>\n<h4>\u5b9e\u4f8b\u7c7b\u578b\u9009\u62e9<\/h4>\n<p>\u7a81\u53d1\u6027\u80fd\u5b9e\u4f8b&#xff08;T\u7cfb\u5217&#xff09;<\/p>\n<p><span class=\"token comment\"># db.t3.micro &#8211; \u514d\u8d39\u5957\u9910<\/span><br \/>\n<span class=\"token comment\"># \u2022 1 vCPU, 1GB RAM<\/span><br \/>\n<span class=\"token comment\"># \u2022 \u9002\u5408\u5f00\u53d1\u6d4b\u8bd5<\/span><br \/>\n<span class=\"token comment\"># \u2022 \u6bcf\u6708750\u5c0f\u65f6\u514d\u8d39<\/span><\/p>\n<p><span class=\"token comment\"># db.t3.small<\/span><br \/>\n<span class=\"token comment\"># \u2022 1 vCPU, 2GB RAM  <\/span><br \/>\n<span class=\"token comment\"># \u2022 \u9002\u5408\u5c0f\u578b\u5e94\u7528<\/span><\/p>\n<p><span class=\"token comment\"># db.t3.medium<\/span><br \/>\n<span class=\"token comment\"># \u2022 2 vCPU, 4GB RAM<\/span><br \/>\n<span class=\"token comment\"># \u2022 \u9002\u5408\u4e2d\u7b49\u8d1f\u8f7d<\/span><\/p>\n<p>\u901a\u7528\u578b\u5b9e\u4f8b&#xff08;M\u7cfb\u5217&#xff09;<\/p>\n<p><span class=\"token comment\"># db.m5.large<\/span><br \/>\n<span class=\"token comment\"># \u2022 2 vCPU, 8GB RAM<\/span><br \/>\n<span class=\"token comment\"># \u2022 \u9002\u5408\u751f\u4ea7\u73af\u5883<\/span><\/p>\n<p><span class=\"token comment\"># db.m5.xlarge  <\/span><br \/>\n<span class=\"token comment\"># \u2022 4 vCPU, 16GB RAM<\/span><br \/>\n<span class=\"token comment\"># \u2022 \u9002\u5408\u9ad8\u8d1f\u8f7d\u5e94\u7528<\/span><\/p>\n<h4>\u5b58\u50a8\u914d\u7f6e<\/h4>\n<p>\u901a\u7528SSD (gp2)<\/p>\n<ul>\n<li>\u57fa\u51c6\u6027\u80fd&#xff1a;3 IOPS\/GB<\/li>\n<li>\u7a81\u53d1\u6027\u80fd&#xff1a;\u6700\u9ad83000 IOPS<\/li>\n<li>\u9002\u5408\u5927\u591a\u6570\u5de5\u4f5c\u8d1f\u8f7d<\/li>\n<\/ul>\n<p>\u901a\u7528SSD (gp3)<\/p>\n<ul>\n<li>\u57fa\u51c6\u6027\u80fd&#xff1a;3000 IOPS<\/li>\n<li>\u53ef\u72ec\u7acb\u914d\u7f6eIOPS\u548c\u541e\u5410\u91cf<\/li>\n<li>\u6027\u4ef7\u6bd4\u66f4\u9ad8<\/li>\n<\/ul>\n<p>\u9884\u914d\u7f6eIOPS SSD (io1)<\/p>\n<ul>\n<li>\u9ad8\u6027\u80fd&#xff0c;\u4f4e\u5ef6\u8fdf<\/li>\n<li>\u53ef\u914d\u7f6e\u9ad8\u8fbe64000 IOPS<\/li>\n<li>\u9002\u5408I\/O\u5bc6\u96c6\u578b\u5e94\u7528<\/li>\n<\/ul>\n<p><span class=\"token comment\"># \u4fee\u6539\u5b58\u50a8\u7c7b\u578b<\/span><br \/>\naws rds modify-db-instance <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;db-instance-identifier wordpress-db <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;storage-type gp3 <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;iops <span class=\"token number\">3000<\/span> <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;apply-immediately<\/p>\n<h4>\u5b89\u5168\u7ec4\u914d\u7f6e<\/h4>\n<p><span class=\"token comment\"># \u521b\u5efa\u4e13\u7528\u7684RDS\u5b89\u5168\u7ec4<\/span><br \/>\naws ec2 create-security-group <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;group-name rds-mysql-sg <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;description <span class=\"token string\">&#034;MySQL RDS Security Group&#034;<\/span><\/p>\n<p><span class=\"token comment\"># \u53ea\u5141\u8bb8EC2\u5b89\u5168\u7ec4\u8bbf\u95ee<\/span><br \/>\naws ec2 authorize-security-group-ingress <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;group-id sg-rds123456 <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;protocol tcp <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;port <span class=\"token number\">3306<\/span> <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;source-group sg-ec2123456<\/p>\n<p><span class=\"token comment\"># \u67e5\u770b\u5b89\u5168\u7ec4\u89c4\u5219<\/span><br \/>\naws ec2 describe-security-groups <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;group-ids sg-rds123456<\/p>\n<h3>\u5907\u4efd\u548c\u6062\u590d\u7b56\u7565<\/h3>\n<h4>\u81ea\u52a8\u5907\u4efd\u914d\u7f6e<\/h4>\n<p><span class=\"token comment\"># \u4fee\u6539\u5907\u4efd\u8bbe\u7f6e<\/span><br \/>\naws rds modify-db-instance <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;db-instance-identifier wordpress-db <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;backup-retention-period <span class=\"token number\">7<\/span> <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;preferred-backup-window <span class=\"token string\">&#034;03:00-04:00&#034;<\/span> <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;preferred-maintenance-window <span class=\"token string\">&#034;sun:04:00-sun:05:00&#034;<\/span> <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;apply-immediately<\/p>\n<h4>\u624b\u52a8\u5feb\u7167<\/h4>\n<p><span class=\"token comment\"># \u521b\u5efa\u624b\u52a8\u5feb\u7167<\/span><br \/>\naws rds create-db-snapshot <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;db-instance-identifier wordpress-db <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;db-snapshot-identifier wordpress-manual-snapshot-<span class=\"token variable\"><span class=\"token variable\">$(<\/span><span class=\"token function\">date<\/span> &#043;%Y%m%d<span class=\"token variable\">)<\/span><\/span><\/p>\n<p><span class=\"token comment\"># \u67e5\u770b\u5feb\u7167\u5217\u8868<\/span><br \/>\naws rds describe-db-snapshots <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;db-instance-identifier wordpress-db<\/p>\n<p><span class=\"token comment\"># \u4ece\u5feb\u7167\u6062\u590d\u65b0\u5b9e\u4f8b<\/span><br \/>\naws rds restore-db-instance-from-db-snapshot <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;db-instance-identifier wordpress-db-restored <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;db-snapshot-identifier wordpress-manual-snapshot-20231201<\/p>\n<h4>\u65f6\u95f4\u70b9\u6062\u590d<\/h4>\n<p><span class=\"token comment\"># \u6062\u590d\u5230\u6307\u5b9a\u65f6\u95f4\u70b9<\/span><br \/>\naws rds restore-db-instance-to-point-in-time <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;source-db-instance-identifier wordpress-db <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;target-db-instance-identifier wordpress-db-pitr <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;restore-time <span class=\"token number\">2023<\/span>-12-01T10:30:00.000Z<\/p>\n<h3>\u76d1\u63a7\u548c\u6027\u80fd\u4f18\u5316<\/h3>\n<h4>CloudWatch\u57fa\u7840\u76d1\u63a7<\/h4>\n<p><span class=\"token comment\"># \u67e5\u770bCPU\u4f7f\u7528\u7387<\/span><br \/>\naws cloudwatch get-metric-statistics <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;namespace AWS\/RDS <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;metric-name CPUUtilization <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;dimensions <span class=\"token assign-left variable\">Name<\/span><span class=\"token operator\">&#061;<\/span>DBInstanceIdentifier,Value<span class=\"token operator\">&#061;<\/span>wordpress-db <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;start-time <span class=\"token number\">2023<\/span>-12-01T00:00:00Z <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;end-time <span class=\"token number\">2023<\/span>-12-01T23:59:59Z <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;period <span class=\"token number\">3600<\/span> <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;statistics Average<\/p>\n<p><span class=\"token comment\"># \u67e5\u770b\u6570\u636e\u5e93\u8fde\u63a5\u6570<\/span><br \/>\naws cloudwatch get-metric-statistics <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;namespace AWS\/RDS <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;metric-name DatabaseConnections <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;dimensions <span class=\"token assign-left variable\">Name<\/span><span class=\"token operator\">&#061;<\/span>DBInstanceIdentifier,Value<span class=\"token operator\">&#061;<\/span>wordpress-db <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;start-time <span class=\"token number\">2023<\/span>-12-01T00:00:00Z <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;end-time <span class=\"token number\">2023<\/span>-12-01T23:59:59Z <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;period <span class=\"token number\">3600<\/span> <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;statistics Average<\/p>\n<h4>\u6027\u80fd\u6d1e\u5bdf&#xff08;Performance Insights&#xff09;<\/h4>\n<p><span class=\"token comment\"># \u542f\u7528\u6027\u80fd\u6d1e\u5bdf<\/span><br \/>\naws rds modify-db-instance <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;db-instance-identifier wordpress-db <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;enable-performance-insights <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;performance-insights-retention-period <span class=\"token number\">7<\/span> <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;apply-immediately<\/p>\n<h4>\u5173\u952e\u76d1\u63a7\u6307\u6807<\/h4>\n<p>CPU\u548c\u5185\u5b58<\/p>\n<ul>\n<li>CPUUtilization&#xff1a;CPU\u4f7f\u7528\u7387<\/li>\n<li>FreeableMemory&#xff1a;\u53ef\u7528\u5185\u5b58<\/li>\n<li>SwapUsage&#xff1a;\u4ea4\u6362\u7a7a\u95f4\u4f7f\u7528<\/li>\n<\/ul>\n<p>\u8fde\u63a5\u548c\u67e5\u8be2<\/p>\n<ul>\n<li>DatabaseConnections&#xff1a;\u6570\u636e\u5e93\u8fde\u63a5\u6570<\/li>\n<li>Queries&#xff1a;\u6bcf\u79d2\u67e5\u8be2\u6570<\/li>\n<li>SlowQueries&#xff1a;\u6162\u67e5\u8be2\u6570\u91cf<\/li>\n<\/ul>\n<p>\u5b58\u50a8\u548cI\/O<\/p>\n<ul>\n<li>FreeStorageSpace&#xff1a;\u53ef\u7528\u5b58\u50a8\u7a7a\u95f4<\/li>\n<li>ReadIOPS\/WriteIOPS&#xff1a;\u8bfb\u5199IOPS<\/li>\n<li>ReadLatency\/WriteLatency&#xff1a;\u8bfb\u5199\u5ef6\u8fdf<\/li>\n<\/ul>\n<h3>\u6210\u672c\u4f18\u5316\u7b56\u7565<\/h3>\n<h4>\u9884\u7559\u5b9e\u4f8b<\/h4>\n<p><span class=\"token comment\"># \u67e5\u770b\u9884\u7559\u5b9e\u4f8b\u9009\u9879<\/span><br \/>\naws rds describe-reserved-db-instances-offerings <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;db-instance-class db.t3.micro <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;duration <span class=\"token number\">31536000<\/span> <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;offering-type <span class=\"token string\">&#034;All Upfront&#034;<\/span><\/p>\n<p><span class=\"token comment\"># \u8d2d\u4e70\u9884\u7559\u5b9e\u4f8b<\/span><br \/>\naws rds purchase-reserved-db-instances-offering <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;reserved-db-instances-offering-id <span class=\"token number\">12345678<\/span>-1234-1234-1234-123456789012 <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;db-instance-count <span class=\"token number\">1<\/span><\/p>\n<h4>\u5b58\u50a8\u4f18\u5316<\/h4>\n<p><span class=\"token comment\"># \u542f\u7528\u5b58\u50a8\u81ea\u52a8\u6269\u5c55<\/span><br \/>\naws rds modify-db-instance <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;db-instance-identifier wordpress-db <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;storage-auto-scaling-enabled <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;max-allocated-storage <span class=\"token number\">100<\/span> <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;apply-immediately<\/p>\n<h4>\u6210\u672c\u76d1\u63a7<\/h4>\n<p><span class=\"token comment\"># \u8bbe\u7f6eRDS\u6210\u672c\u9884\u7b97<\/span><br \/>\naws budgets create-budget <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;account-id <span class=\"token number\">123456789012<\/span> <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;budget <span class=\"token string\">&#039;{<br \/>\n        &#034;BudgetName&#034;: &#034;RDS-Monthly-Budget&#034;,<br \/>\n        &#034;BudgetLimit&#034;: {<br \/>\n            &#034;Amount&#034;: &#034;50&#034;,<br \/>\n            &#034;Unit&#034;: &#034;USD&#034;<br \/>\n        },<br \/>\n        &#034;TimeUnit&#034;: &#034;MONTHLY&#034;,<br \/>\n        &#034;BudgetType&#034;: &#034;COST&#034;,<br \/>\n        &#034;CostFilters&#034;: {<br \/>\n            &#034;Service&#034;: [&#034;Amazon Relational Database Service&#034;]<br \/>\n        }<br \/>\n    }&#039;<\/span><\/p>\n<h3>\u9ad8\u53ef\u7528\u6027\u914d\u7f6e<\/h3>\n<h4>Multi-AZ\u90e8\u7f72<\/h4>\n<p><span class=\"token comment\"># \u542f\u7528Multi-AZ<\/span><br \/>\naws rds modify-db-instance <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;db-instance-identifier wordpress-db <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;multi-az <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;apply-immediately<\/p>\n<p>Multi-AZ\u7684\u4f18\u52bf&#xff1a;<\/p>\n<ul>\n<li>\u81ea\u52a8\u6545\u969c\u8f6c\u79fb&#xff1a;\u4e3b\u5b9e\u4f8b\u6545\u969c\u65f6\u81ea\u52a8\u5207\u6362\u5230\u5907\u7528\u5b9e\u4f8b<\/li>\n<li>\u6570\u636e\u540c\u6b65&#xff1a;\u540c\u6b65\u590d\u5236&#xff0c;\u65e0\u6570\u636e\u4e22\u5931<\/li>\n<li>\u7ef4\u62a4\u7a97\u53e3&#xff1a;\u7ef4\u62a4\u671f\u95f4\u81ea\u52a8\u5207\u6362&#xff0c;\u51cf\u5c11\u505c\u673a\u65f6\u95f4<\/li>\n<\/ul>\n<h4>\u8bfb\u53d6\u526f\u672c<\/h4>\n<p><span class=\"token comment\"># \u521b\u5efa\u8bfb\u53d6\u526f\u672c<\/span><br \/>\naws rds create-db-instance-read-replica <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;db-instance-identifier wordpress-db-read-replica <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;source-db-instance-identifier wordpress-db <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;db-instance-class db.t3.micro<\/p>\n<p>\u8bfb\u53d6\u526f\u672c\u7684\u7528\u9014&#xff1a;<\/p>\n<ul>\n<li>\u8bfb\u5199\u5206\u79bb&#xff1a;\u5c06\u8bfb\u53d6\u67e5\u8be2\u5206\u6d41\u5230\u526f\u672c<\/li>\n<li>\u8de8\u533a\u57df\u5907\u4efd&#xff1a;\u5728\u4e0d\u540c\u533a\u57df\u521b\u5efa\u526f\u672c<\/li>\n<li>\u62a5\u8868\u67e5\u8be2&#xff1a;\u907f\u514d\u5f71\u54cd\u4e3b\u5e93\u6027\u80fd<\/li>\n<\/ul>\n<h3>\u5b89\u5168\u6700\u4f73\u5b9e\u8df5<\/h3>\n<h4>\u7f51\u7edc\u5b89\u5168<\/h4>\n<p><span class=\"token comment\"># \u521b\u5efa\u4e13\u7528\u5b50\u7f51\u7ec4<\/span><br \/>\naws rds create-db-subnet-group <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;db-subnet-group-name private-subnet-group <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;db-subnet-group-description <span class=\"token string\">&#034;Private subnets for RDS&#034;<\/span> <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;subnet-ids subnet-private1 subnet-private2<\/p>\n<p><span class=\"token comment\"># \u4f7f\u7528\u79c1\u6709\u5b50\u7f51<\/span><br \/>\naws rds modify-db-instance <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;db-instance-identifier wordpress-db <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;db-subnet-group-name private-subnet-group <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;no-publicly-accessible<\/p>\n<h4>\u52a0\u5bc6\u914d\u7f6e<\/h4>\n<p><span class=\"token comment\"># \u521b\u5efa\u52a0\u5bc6\u7684RDS\u5b9e\u4f8b<\/span><br \/>\naws rds create-db-instance <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;db-instance-identifier secure-wordpress-db <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;db-instance-class db.t3.micro <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;engine mysql <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;master-username admin <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;master-user-password SecurePassword123 <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;allocated-storage <span class=\"token number\">20<\/span> <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;storage-encrypted <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;kms-key-id alias\/aws\/rds<\/p>\n<h4>\u8bbf\u95ee\u63a7\u5236<\/h4>\n<p><span class=\"token comment\"># \u521b\u5efa\u6570\u636e\u5e93\u7528\u6237&#xff08;\u5728RDS\u5b9e\u4f8b\u4e2d\u6267\u884c&#xff09;<\/span><br \/>\nmysql -h your-rds-endpoint.amazonaws.com -u admin -p<\/p>\n<p>&#8212; \u521b\u5efa\u53ea\u8bfb\u7528\u6237<br \/>\nCREATE <span class=\"token environment constant\">USER<\/span> <span class=\"token string\">&#039;readonly&#039;<\/span>&#064;<span class=\"token string\">&#039;%&#039;<\/span> IDENTIFIED BY <span class=\"token string\">&#039;ReadOnlyPassword123&#039;<\/span><span class=\"token punctuation\">;<\/span><br \/>\nGRANT SELECT ON wordpress.* TO <span class=\"token string\">&#039;readonly&#039;<\/span>&#064;<span class=\"token string\">&#039;%&#039;<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>&#8212; \u521b\u5efa\u5e94\u7528\u7528\u6237<br \/>\nCREATE <span class=\"token environment constant\">USER<\/span> <span class=\"token string\">&#039;wpapp&#039;<\/span>&#064;<span class=\"token string\">&#039;%&#039;<\/span> IDENTIFIED BY <span class=\"token string\">&#039;AppPassword123&#039;<\/span><span class=\"token punctuation\">;<\/span><br \/>\nGRANT SELECT, INSERT, UPDATE, DELETE ON wordpress.* TO <span class=\"token string\">&#039;wpapp&#039;<\/span>&#064;<span class=\"token string\">&#039;%&#039;<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>FLUSH PRIVILEGES<span class=\"token punctuation\">;<\/span><\/p>\n<h3>\u5e38\u89c1\u95ee\u9898\u89e3\u51b3<\/h3>\n<h4>\u8fde\u63a5\u95ee\u9898<\/h4>\n<p>\u95ee\u98981&#xff1a;\u65e0\u6cd5\u8fde\u63a5\u5230RDS\u5b9e\u4f8b<\/p>\n<p><span class=\"token comment\"># \u68c0\u67e5\u5b89\u5168\u7ec4\u89c4\u5219<\/span><br \/>\naws ec2 describe-security-groups &#8211;group-ids sg-rds123456<\/p>\n<p><span class=\"token comment\"># \u68c0\u67e5\u5b50\u7f51\u8def\u7531<\/span><br \/>\naws ec2 describe-route-tables &#8211;filters <span class=\"token string\">&#034;Name&#061;association.subnet-id,Values&#061;subnet-12345678&#034;<\/span><\/p>\n<p><span class=\"token comment\"># \u6d4b\u8bd5\u7f51\u7edc\u8fde\u901a\u6027<\/span><br \/>\ntelnet your-rds-endpoint.amazonaws.com <span class=\"token number\">3306<\/span><\/p>\n<p>\u95ee\u98982&#xff1a;\u8fde\u63a5\u8d85\u65f6<\/p>\n<p><span class=\"token comment\"># \u68c0\u67e5VPC\u548c\u5b50\u7f51\u914d\u7f6e<\/span><br \/>\naws rds describe-db-instances <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;db-instance-identifier wordpress-db <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;query <span class=\"token string\">&#039;DBInstances[0].DBSubnetGroup&#039;<\/span><\/p>\n<p><span class=\"token comment\"># \u786e\u8ba4EC2\u548cRDS\u5728\u540c\u4e00VPC<\/span><br \/>\naws ec2 describe-instances &#8211;instance-ids i-1234567890abcdef0 <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;query <span class=\"token string\">&#039;Reservations[0].Instances[0].VpcId&#039;<\/span><\/p>\n<h4>\u6027\u80fd\u95ee\u9898<\/h4>\n<p>\u95ee\u98981&#xff1a;\u67e5\u8be2\u901f\u5ea6\u6162<\/p>\n<p><span class=\"token comment\">&#8212; \u542f\u7528\u6162\u67e5\u8be2\u65e5\u5fd7<\/span><br \/>\n<span class=\"token keyword\">SET<\/span> <span class=\"token keyword\">GLOBAL<\/span> slow_query_log <span class=\"token operator\">&#061;<\/span> <span class=\"token string\">&#039;ON&#039;<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token keyword\">SET<\/span> <span class=\"token keyword\">GLOBAL<\/span> long_query_time <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">2<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token comment\">&#8212; \u67e5\u770b\u6162\u67e5\u8be2<\/span><br \/>\n<span class=\"token keyword\">SHOW<\/span> VARIABLES <span class=\"token operator\">LIKE<\/span> <span class=\"token string\">&#039;slow_query_log%&#039;<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>\u95ee\u98982&#xff1a;\u8fde\u63a5\u6570\u8fc7\u591a<\/p>\n<p><span class=\"token comment\">&#8212; \u67e5\u770b\u5f53\u524d\u8fde\u63a5<\/span><br \/>\n<span class=\"token keyword\">SHOW<\/span> PROCESSLIST<span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token comment\">&#8212; \u67e5\u770b\u6700\u5927\u8fde\u63a5\u6570<\/span><br \/>\n<span class=\"token keyword\">SHOW<\/span> VARIABLES <span class=\"token operator\">LIKE<\/span> <span class=\"token string\">&#039;max_connections&#039;<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token comment\">&#8212; \u4f18\u5316\u8fde\u63a5\u6c60\u914d\u7f6e&#xff08;\u5728\u5e94\u7528\u4e2d&#xff09;<\/span><\/p>\n<h4>\u5907\u4efd\u6062\u590d\u95ee\u9898<\/h4>\n<p>\u95ee\u98981&#xff1a;\u5907\u4efd\u5931\u8d25<\/p>\n<p><span class=\"token comment\"># \u68c0\u67e5\u5907\u4efd\u72b6\u6001<\/span><br \/>\naws rds describe-db-instances <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;db-instance-identifier wordpress-db <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;query <span class=\"token string\">&#039;DBInstances[0].BackupRetentionPeriod&#039;<\/span><\/p>\n<p><span class=\"token comment\"># \u67e5\u770b\u5907\u4efd\u7a97\u53e3<\/span><br \/>\naws rds describe-db-instances <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;db-instance-identifier wordpress-db <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;query <span class=\"token string\">&#039;DBInstances[0].PreferredBackupWindow&#039;<\/span><\/p>\n<p>\u95ee\u98982&#xff1a;\u6062\u590d\u65f6\u95f4\u8fc7\u957f<\/p>\n<p><span class=\"token comment\"># \u4f7f\u7528\u5feb\u7167\u6062\u590d&#xff08;\u66f4\u5feb&#xff09;<\/span><br \/>\naws rds restore-db-instance-from-db-snapshot <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;db-instance-identifier wordpress-db-fast-restore <span class=\"token punctuation\">\\\\<\/span><br \/>\n    &#8211;db-snapshot-identifier wordpress-manual-snapshot-20231201<\/p>\n<h3>\u8fc1\u79fb\u9a8c\u8bc1\u6e05\u5355<\/h3>\n<h4>\u529f\u80fd\u9a8c\u8bc1<\/h4>\n<ul>\n<li class=\"task-list-item\"> WordPress\u7f51\u7ad9\u6b63\u5e38\u8bbf\u95ee<\/li>\n<li class=\"task-list-item\"> \u7528\u6237\u767b\u5f55\u529f\u80fd\u6b63\u5e38<\/li>\n<li class=\"task-list-item\"> \u6587\u7ae0\u53d1\u5e03\u548c\u7f16\u8f91\u6b63\u5e38<\/li>\n<li class=\"task-list-item\"> \u8bc4\u8bba\u529f\u80fd\u6b63\u5e38<\/li>\n<li class=\"task-list-item\"> \u63d2\u4ef6\u529f\u80fd\u6b63\u5e38<\/li>\n<\/ul>\n<h4>\u6027\u80fd\u9a8c\u8bc1<\/h4>\n<p><span class=\"token comment\"># \u6570\u636e\u5e93\u8fde\u63a5\u6d4b\u8bd5<\/span><br \/>\nmysql -h your-rds-endpoint.amazonaws.com -u admin -p -e <span class=\"token string\">&#034;SELECT 1&#034;<\/span><\/p>\n<p><span class=\"token comment\"># \u67e5\u8be2\u6027\u80fd\u6d4b\u8bd5<\/span><br \/>\nmysql -h your-rds-endpoint.amazonaws.com -u admin -p wordpress -e <span class=\"token string\">&#034;<br \/>\nSELECT COUNT(*) FROM wp_posts WHERE post_status &#061; &#039;publish&#039;&#034;<\/span><\/p>\n<p><span class=\"token comment\"># \u7f51\u7ad9\u54cd\u5e94\u65f6\u95f4\u6d4b\u8bd5<\/span><br \/>\n<span class=\"token function\">curl<\/span> -w <span class=\"token string\">&#034;&#064;curl-format.txt&#034;<\/span> -o \/dev\/null -s http:\/\/your-ec2-ip<\/p>\n<h4>\u5b89\u5168\u9a8c\u8bc1<\/h4>\n<ul>\n<li class=\"task-list-item\"> \u6570\u636e\u5e93\u4e0d\u80fd\u4ece\u516c\u7f51\u8bbf\u95ee<\/li>\n<li class=\"task-list-item\"> \u5b89\u5168\u7ec4\u89c4\u5219\u914d\u7f6e\u6b63\u786e<\/li>\n<li class=\"task-list-item\"> \u6570\u636e\u4f20\u8f93\u52a0\u5bc6\u542f\u7528<\/li>\n<li class=\"task-list-item\"> \u5907\u4efd\u52a0\u5bc6\u542f\u7528<\/li>\n<\/ul>\n<h3>\u4e0b\u4e00\u6b65\u5b66\u4e60\u65b9\u5411<\/h3>\n<p>\u638c\u63e1\u4e86RDS\u57fa\u7840\u540e&#xff0c;\u4f60\u53ef\u4ee5\u7ee7\u7eed\u63a2\u7d22&#xff1a;<\/p>\n<li>\u8bfb\u5199\u5206\u79bb&#xff1a;\u4f7f\u7528\u8bfb\u53d6\u526f\u672c\u4f18\u5316\u6027\u80fd<\/li>\n<li>\u6570\u636e\u5e93\u4ee3\u7406&#xff1a;RDS Proxy\u8fde\u63a5\u6c60\u7ba1\u7406<\/li>\n<li>\u8de8\u533a\u57df\u5907\u4efd&#xff1a;\u707e\u96be\u6062\u590d\u7b56\u7565<\/li>\n<li>Aurora&#xff1a;AWS\u7684\u4e91\u539f\u751f\u6570\u636e\u5e93<\/li>\n<li>\u6570\u636e\u8fc1\u79fb&#xff1a;DMS\u6570\u636e\u5e93\u8fc1\u79fb\u670d\u52a1<\/li>\n<h3>\u7ed3\u8bed<\/h3>\n<p>\u901a\u8fc7\u5c06\u6570\u636e\u5e93\u8fc1\u79fb\u5230RDS&#xff0c;\u6211\u4eec\u4e3a\u6570\u636e\u627e\u5230\u4e86\u4e00\u4e2a\u5b89\u5168\u3001\u53ef\u9760\u7684&#034;\u65b0\u5bb6&#034;\u3002RDS\u4e0d\u4ec5\u89e3\u653e\u4e86\u6211\u4eec\u7684\u8fd0\u7ef4\u8d1f\u62c5&#xff0c;\u8fd8\u63d0\u4f9b\u4e86\u4f01\u4e1a\u7ea7\u7684\u9ad8\u53ef\u7528\u6027\u3001\u5b89\u5168\u6027\u548c\u6027\u80fd\u3002<\/p>\n<p>\u4ece\u81ea\u5efa\u6570\u636e\u5e93\u5230\u6258\u7ba1\u6570\u636e\u5e93&#xff0c;\u8fd9\u4e0d\u4ec5\u662f\u6280\u672f\u67b6\u6784\u7684\u5347\u7ea7&#xff0c;\u66f4\u662f\u8fd0\u7ef4\u601d\u7ef4\u7684\u8f6c\u53d8\u3002\u8ba9\u4e13\u4e1a\u7684\u670d\u52a1\u505a\u4e13\u4e1a\u7684\u4e8b\u60c5&#xff0c;\u6211\u4eec\u53ef\u4ee5\u628a\u66f4\u591a\u7cbe\u529b\u6295\u5165\u5230\u4e1a\u52a1\u903b\u8f91\u548c\u7528\u6237\u4f53\u9a8c\u7684\u4f18\u5316\u4e0a\u3002<\/p>\n<p>\u5728\u4e0b\u4e00\u7bc7\u6587\u7ae0\u4e2d&#xff0c;\u6211\u4eec\u5c06\u63a2\u7d22S3\u5b58\u50a8\u670d\u52a1&#xff0c;\u5b66\u4e60\u5982\u4f55\u4e3a\u7f51\u7ad9\u7684\u9759\u6001\u8d44\u6e90\u627e\u5230\u66f4\u597d\u7684\u5b58\u50a8\u65b9\u6848&#xff0c;\u8fdb\u4e00\u6b65\u4f18\u5316\u6211\u4eec\u7684\u67b6\u6784\u3002<\/p>\n<hr \/>\n<p>\u6570\u636e\u5b89\u5168\u65e0\u5c0f\u4e8b&#xff0c;\u9009\u62e9RDS&#xff0c;\u8ba9\u4f60\u7684\u6570\u636e\u4f4f\u8fdb\u4e94\u661f\u7ea7\u7684&#034;\u4e91\u7aef\u8c6a\u5b85&#034;&#xff01;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb91\u6b21\u3002\u6458\u8981\uff1a\u5c06WordPress\u6570\u636e\u5e93\u8fc1\u79fb\u81f3Amazon RDS\u7684\u5b9e\u8df5\u6307\u5357 \u672c\u6587\u9488\u5bf9\u81ea\u5efa\u6570\u636e\u5e93\u7684\u8fd0\u7ef4\u75db\u70b9\uff0c\u4ecb\u7ecd\u4e86Amazon RDS\u6258\u7ba1\u670d\u52a1\u7684\u6838\u5fc3\u4f18\u52bf\uff0c\u5305\u62ec\u81ea\u52a8\u7ef4\u62a4\u3001\u5907\u4efd\u6062\u590d\u3001\u9ad8\u53ef\u7528\u6027\u548c\u5f39\u6027\u6269\u5c55\u80fd\u529b\u3002\u91cd\u70b9\u6f14\u793a\u4e86\u5c06WordPress\u6570\u636e\u5e93\u4eceEC2\u8fc1\u79fb\u5230RDS\u7684\u5b8c\u6574\u6d41\u7a0b\uff1a\u521b\u5efaRDS\u5b9e\u4f8b\u3001\u6570\u636e\u5907\u4efd\u6062\u590d\u3001WordPress\u914d\u7f6e\u66f4\u65b0\u7b49\u5173\u952e\u6b65\u9aa4\u3002\u6587\u7ae0\u8fd8\u8be6\u7ec6\u89e3\u6790\u4e86RDS\u5b9e\u4f8b\u7c7b\u578b\u9009\u62e9\u3001\u5b58\u50a8\u914d\u7f6e\u4f18\u5316\u548c\u5b89\u5168\u7ec4\u8bbe\u7f6e\u7b49\u5b9e\u7528\u6280\u5de7\uff0c\u5e2e\u52a9\u5f00\u53d1\u8005\u5b9e\u73b0\u6570\u636e\u5e93\u7684\u5e73\u6ed1\u8fc1\u79fb\u548c\u9ad8\u6548\u7ba1\u7406\u3002\u901a\u8fc7\u4f7f\u7528RDS\u670d\u52a1\uff0c\u7528\u6237\u53ef\u4ee5\u663e\u8457\u964d\u4f4e\u6570\u636e\u5e93\u8fd0\u7ef4\u590d\u6742\u5ea6\uff0c\u63d0\u5347\u6570\u636e\u5b89\u5168\u6027<\/p>\n","protected":false},"author":2,"featured_media":51166,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[2999,593,114,5050,100],"topic":[],"class_list":["post-51167","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-amazon-web-services-aws","tag-aws","tag-mysql","tag-5050","tag-100"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u4e9a\u9ebb\u4e91\u4e4b\u6570\u636e\u5b89\u5bb6\u2014\u2014RDS\u6570\u636e\u5e93\u670d\u52a1\u5165\u95e8 - \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\/51167.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u4e9a\u9ebb\u4e91\u4e4b\u6570\u636e\u5b89\u5bb6\u2014\u2014RDS\u6570\u636e\u5e93\u670d\u52a1\u5165\u95e8 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb91\u6b21\u3002\u6458\u8981\uff1a\u5c06WordPress\u6570\u636e\u5e93\u8fc1\u79fb\u81f3Amazon RDS\u7684\u5b9e\u8df5\u6307\u5357 \u672c\u6587\u9488\u5bf9\u81ea\u5efa\u6570\u636e\u5e93\u7684\u8fd0\u7ef4\u75db\u70b9\uff0c\u4ecb\u7ecd\u4e86Amazon RDS\u6258\u7ba1\u670d\u52a1\u7684\u6838\u5fc3\u4f18\u52bf\uff0c\u5305\u62ec\u81ea\u52a8\u7ef4\u62a4\u3001\u5907\u4efd\u6062\u590d\u3001\u9ad8\u53ef\u7528\u6027\u548c\u5f39\u6027\u6269\u5c55\u80fd\u529b\u3002\u91cd\u70b9\u6f14\u793a\u4e86\u5c06WordPress\u6570\u636e\u5e93\u4eceEC2\u8fc1\u79fb\u5230RDS\u7684\u5b8c\u6574\u6d41\u7a0b\uff1a\u521b\u5efaRDS\u5b9e\u4f8b\u3001\u6570\u636e\u5907\u4efd\u6062\u590d\u3001WordPress\u914d\u7f6e\u66f4\u65b0\u7b49\u5173\u952e\u6b65\u9aa4\u3002\u6587\u7ae0\u8fd8\u8be6\u7ec6\u89e3\u6790\u4e86RDS\u5b9e\u4f8b\u7c7b\u578b\u9009\u62e9\u3001\u5b58\u50a8\u914d\u7f6e\u4f18\u5316\u548c\u5b89\u5168\u7ec4\u8bbe\u7f6e\u7b49\u5b9e\u7528\u6280\u5de7\uff0c\u5e2e\u52a9\u5f00\u53d1\u8005\u5b9e\u73b0\u6570\u636e\u5e93\u7684\u5e73\u6ed1\u8fc1\u79fb\u548c\u9ad8\u6548\u7ba1\u7406\u3002\u901a\u8fc7\u4f7f\u7528RDS\u670d\u52a1\uff0c\u7528\u6237\u53ef\u4ee5\u663e\u8457\u964d\u4f4e\u6570\u636e\u5e93\u8fd0\u7ef4\u590d\u6742\u5ea6\uff0c\u63d0\u5347\u6570\u636e\u5b89\u5168\u6027\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/51167.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-08-10T10:40:57+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250810104056-68987738845a1.png\" \/>\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=\"5 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/51167.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/51167.html\",\"name\":\"\u4e9a\u9ebb\u4e91\u4e4b\u6570\u636e\u5b89\u5bb6\u2014\u2014RDS\u6570\u636e\u5e93\u670d\u52a1\u5165\u95e8 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-08-10T10:40:57+00:00\",\"dateModified\":\"2025-08-10T10:40:57+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/51167.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/51167.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/51167.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u4e9a\u9ebb\u4e91\u4e4b\u6570\u636e\u5b89\u5bb6\u2014\u2014RDS\u6570\u636e\u5e93\u670d\u52a1\u5165\u95e8\"}]},{\"@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":"\u4e9a\u9ebb\u4e91\u4e4b\u6570\u636e\u5b89\u5bb6\u2014\u2014RDS\u6570\u636e\u5e93\u670d\u52a1\u5165\u95e8 - \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\/51167.html","og_locale":"zh_CN","og_type":"article","og_title":"\u4e9a\u9ebb\u4e91\u4e4b\u6570\u636e\u5b89\u5bb6\u2014\u2014RDS\u6570\u636e\u5e93\u670d\u52a1\u5165\u95e8 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb91\u6b21\u3002\u6458\u8981\uff1a\u5c06WordPress\u6570\u636e\u5e93\u8fc1\u79fb\u81f3Amazon RDS\u7684\u5b9e\u8df5\u6307\u5357 \u672c\u6587\u9488\u5bf9\u81ea\u5efa\u6570\u636e\u5e93\u7684\u8fd0\u7ef4\u75db\u70b9\uff0c\u4ecb\u7ecd\u4e86Amazon RDS\u6258\u7ba1\u670d\u52a1\u7684\u6838\u5fc3\u4f18\u52bf\uff0c\u5305\u62ec\u81ea\u52a8\u7ef4\u62a4\u3001\u5907\u4efd\u6062\u590d\u3001\u9ad8\u53ef\u7528\u6027\u548c\u5f39\u6027\u6269\u5c55\u80fd\u529b\u3002\u91cd\u70b9\u6f14\u793a\u4e86\u5c06WordPress\u6570\u636e\u5e93\u4eceEC2\u8fc1\u79fb\u5230RDS\u7684\u5b8c\u6574\u6d41\u7a0b\uff1a\u521b\u5efaRDS\u5b9e\u4f8b\u3001\u6570\u636e\u5907\u4efd\u6062\u590d\u3001WordPress\u914d\u7f6e\u66f4\u65b0\u7b49\u5173\u952e\u6b65\u9aa4\u3002\u6587\u7ae0\u8fd8\u8be6\u7ec6\u89e3\u6790\u4e86RDS\u5b9e\u4f8b\u7c7b\u578b\u9009\u62e9\u3001\u5b58\u50a8\u914d\u7f6e\u4f18\u5316\u548c\u5b89\u5168\u7ec4\u8bbe\u7f6e\u7b49\u5b9e\u7528\u6280\u5de7\uff0c\u5e2e\u52a9\u5f00\u53d1\u8005\u5b9e\u73b0\u6570\u636e\u5e93\u7684\u5e73\u6ed1\u8fc1\u79fb\u548c\u9ad8\u6548\u7ba1\u7406\u3002\u901a\u8fc7\u4f7f\u7528RDS\u670d\u52a1\uff0c\u7528\u6237\u53ef\u4ee5\u663e\u8457\u964d\u4f4e\u6570\u636e\u5e93\u8fd0\u7ef4\u590d\u6742\u5ea6\uff0c\u63d0\u5347\u6570\u636e\u5b89\u5168\u6027","og_url":"https:\/\/www.wsisp.com\/helps\/51167.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-08-10T10:40:57+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250810104056-68987738845a1.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"5 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/51167.html","url":"https:\/\/www.wsisp.com\/helps\/51167.html","name":"\u4e9a\u9ebb\u4e91\u4e4b\u6570\u636e\u5b89\u5bb6\u2014\u2014RDS\u6570\u636e\u5e93\u670d\u52a1\u5165\u95e8 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-08-10T10:40:57+00:00","dateModified":"2025-08-10T10:40:57+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/51167.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/51167.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/51167.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u4e9a\u9ebb\u4e91\u4e4b\u6570\u636e\u5b89\u5bb6\u2014\u2014RDS\u6570\u636e\u5e93\u670d\u52a1\u5165\u95e8"}]},{"@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\/51167","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=51167"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/51167\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/51166"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=51167"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=51167"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=51167"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=51167"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}