{"id":28493,"date":"2025-03-12T10:59:06","date_gmt":"2025-03-12T01:59:06","guid":{"rendered":"https:\/\/www.skyarch.net\/blog\/?p=28493"},"modified":"2025-03-12T11:53:09","modified_gmt":"2025-03-12T02:53:09","slug":"amazon-rds-%e3%81%aedb%e3%82%a8%e3%83%b3%e3%82%b8%e3%83%b3%e3%82%a2%e3%83%83%e3%83%97%e3%83%87%e3%83%bc%e3%83%88%e3%81%a8%e3%83%96%e3%83%ab%e3%83%bc-%e3%82%b0%e3%83%aa%e3%83%bc%e3%83%b3%e3%83%87","status":"publish","type":"post","link":"https:\/\/www.skyarch.net\/blog\/amazon-rds-%e3%81%aedb%e3%82%a8%e3%83%b3%e3%82%b8%e3%83%b3%e3%82%a2%e3%83%83%e3%83%97%e3%83%87%e3%83%bc%e3%83%88%e3%81%a8%e3%83%96%e3%83%ab%e3%83%bc-%e3%82%b0%e3%83%aa%e3%83%bc%e3%83%b3%e3%83%87\/","title":{"rendered":"Amazon RDS \u306eDB\u30a8\u30f3\u30b8\u30f3\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3068\u30d6\u30eb\u30fc\/\u30b0\u30ea\u30fc\u30f3\u30c7\u30d7\u30ed\u30a4"},"content":{"rendered":"<h2>\u3053\u3068\u306e\u306f\u3058\u307e\u308a<a id=\"startup\"><\/a><\/h2>\n<p>Amazon RDS \u306b\u3066\u5229\u7528\u3057\u3066\u3044\u308bMySQL\u3001MariaDB\u3001PostgreSQL\u306a\u3069\u306eDB\u30a8\u30f3\u30b8\u30f3\u306e<br \/>\n\u4e00\u90e8\u30d0\u30fc\u30b8\u30e7\u30f3\u306e\u30b5\u30dd\u30fc\u30c8\u7d42\u4e86\u671f\u9650\u304c 2025\u5e743\u6708\u672b\u3068\u306a\u3063\u3066\u304a\u308a\u307e\u3059\u3002<\/p>\n<p>\u5bfe\u8c61\u306eDB\u30a8\u30f3\u30b8\u30f3\u30d0\u30fc\u30b8\u30e7\u30f3\u3068\u30b5\u30dd\u30fc\u30c8\u671f\u9650\u7d42\u4e86\u306e\u60c5\u5831\u306f\u3001<br \/>\n\u4e0b\u8a18AWS\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u3054\u53c2\u7167\u304f\u3060\u3055\u3044\u3002<br \/>\n\uff08\u203b\u65e5\u672c\u8a9e\u7248\u3068\u82f1\u8a9e\u7248\u3067\u5dee\u7570\u304c\u3042\u308b\u5834\u5408\u306f\u3001\u82f1\u8a9e\u7248\u304c\u6b63\u3057\u3044\u3082\u306e\u3068\u306a\u308a\u307e\u3059\uff09<\/p>\n<table>\n<thead>\n<tr>\n<th>DB\u30a8\u30f3\u30b8\u30f3<\/th>\n<th>\u516c\u5f0f\u60c5\u5831URL<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>MySQL<\/td>\n<td><a href=\"https:\/\/docs.aws.amazon.com\/AmazonRDS\/latest\/UserGuide\/MySQL.Concepts.VersionMgmt.html\">MySQL on Amazon RDS versions - Amazon Relational Database Service<\/a><\/td>\n<\/tr>\n<tr>\n<td>MariaDB<\/td>\n<td><a href=\"https:\/\/docs.aws.amazon.com\/AmazonRDS\/latest\/UserGuide\/MariaDB.Concepts.VersionMgmt.html\">MariaDB on Amazon RDS versions - Amazon Relational Database Service<\/a><\/td>\n<\/tr>\n<tr>\n<td>PostgreSQL<\/td>\n<td><a href=\"https:\/\/docs.aws.amazon.com\/AmazonRDS\/latest\/PostgreSQLReleaseNotes\/postgresql-release-calendar.html\">Release calendars for Amazon RDS for PostgreSQL - Amazon Relational Database Service<\/a><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u3053\u306eDB\u30a8\u30f3\u30b8\u30f3\u306e\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u65b9\u6cd5\u306e\u4e00\u3064\u306b\u300c\u30d6\u30eb\u30fc\/\u30b0\u30ea\u30fc\u30f3\u30c7\u30d7\u30ed\u30a4\u300d\u304c\u5229\u7528\u3067\u304d\u307e\u3059\u3002<br \/>\n\u3053\u3061\u3089\u3092\u5229\u7528\u3059\u308b\u3053\u3068\u3067\u300c\u7d041\u5206\u306e\u30c0\u30a6\u30f3\u30bf\u30a4\u30e0\u3067\u3001\u65b0\u30d0\u30fc\u30b8\u30e7\u30f3\u306eDB\u30a8\u30f3\u30b8\u30f3\u304c\u5229\u7528\u53ef\u80fd\u306b\u306a\u308b\u300d<br \/>\n\u3068\u3044\u3046\u6a5f\u80fd\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u3068\u306f\u3044\u3048\u3001\u305d\u306e\u5185\u5bb9\u306e\u8907\u96d1\u3055\u304c\u6545\u306b\u3001\u3054\u63d0\u6848\u5f8c\u306b\u304a\u5ba2\u69d8\u304b\u3089\u591a\u6570\u3054\u8cea\u554f\u3092\u3044\u305f\u3060\u304f\u3053\u3068\u304c\u3054\u3056\u3044\u307e\u3057\u305f\u3002\u305d\u3053\u3067\u672c\u7a3f\u3067\u306f\u3001\u300c\u30d6\u30eb\u30fc\/\u30b0\u30ea\u30fc\u30f3\u30c7\u30d7\u30ed\u30a4\u300d\u306e\u6280\u8853\u7684\u306a\u5185\u5bb9\u306e\u3054\u7d39\u4ecb\u3068\u3001\u5b9f\u969b\u306e\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u65b9\u6cd5\u306e\u6d41\u308c\u3001\u6ce8\u610f\u70b9\u3092\u3054\u7d39\u4ecb\u3057\u307e\u3059\u3002  <\/p>\n<p>\u5b9f\u969b\u306e\u753b\u9762\u64cd\u4f5c\u7b49\u306f\u3001\u4e0b\u8a18\u306e\u30d6\u30ed\u30b0\u8a18\u4e8b\u3092\u3054\u53c2\u7167\u304f\u3060\u3055\u3044\u3002<br \/>\n<a href=\"https:\/\/www.skyarch.net\/blog\/amazon-rds-blue-green-deployments-%e3%82%92%e4%bd%bf%e3%81%a3%e3%81%a6%e3%81%bf%e3%81%9f\/\">Amazon RDS Blue\/Green Deployments \u3092\u4f7f\u3063\u3066\u307f\u305f | \u30af\u30e9\u30a6\u30c9\u30fbAWS\u306eIT\u6280\u8853\u8005\u5411\u3051\u30d6\u30ed\u30b0 SKYARCH BROADCASTING<\/a><\/p>\n<h2>\u76ee\u6b21<\/h2>\n<ul>\n<li><a href=\"#startup\">\u3053\u3068\u306e\u306f\u3058\u307e\u308a<\/a><\/li>\n<li><a href=\"#bg-env\">RDS\u306b\u304a\u3051\u308b \u300c\u30d6\u30eb\u30fc\/\u30b0\u30ea\u30fc\u30f3\u30c7\u30d7\u30ed\u30a4\u300d\u306e\u69cb\u6210<\/a>\n<ul>\n<li><a href=\"#bg-env-check\">\u5b9f\u969b\u306b\u78ba\u8a8d\u3057\u3066\u307f\u305f<\/a><\/li>\n<li><a href=\"#bg-env-warning\">\u74b0\u5883\u4f5c\u6210\u6642\u306e\u6ce8\u610f\u70b9<\/a><\/li>\n<\/ul>\n<\/li>\n<li><a href=\"#bg-update\">RDS\u306b\u304a\u3051\u308b \u300c\u30d6\u30eb\u30fc\/\u30b0\u30ea\u30fc\u30f3\u30c7\u30d7\u30ed\u30a4\u300d\u306e\u5207\u308a\u66ff\u3048\u3092\u5229\u7528\u3057\u305f\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u306e\u6d41\u308c<\/a>\n<ul>\n<li><a href=\"#bg-update-check\">\u5b9f\u969b\u306b\u5207\u308a\u66ff\u3048\u3066\u78ba\u8a8d\u3057\u3066\u307f\u305f<\/a><\/li>\n<li><a href=\"#bg-update-warning\">\u5207\u66ff\u6642\u306e\u6ce8\u610f\u70b9<\/a><\/li>\n<\/ul>\n<\/li>\n<li><a href=\"#matome\">\u307e\u3068\u3081<\/a><\/li>\n<\/ul>\n<p><!--more--><\/p>\n<h2>RDS\u306b\u304a\u3051\u308b \u300c\u30d6\u30eb\u30fc\/\u30b0\u30ea\u30fc\u30f3\u30c7\u30d7\u30ed\u30a4\u300d\u306e\u69cb\u6210 <a id=\"bg-env\"><\/a><\/h2>\n<p>\u4e00\u822c\u7684\u306a\u300c\u30d6\u30eb\u30fc\/\u30b0\u30ea\u30fc\u30f3\u30c7\u30d7\u30ed\u30a4\u300d\u3068RDS\u306b\u304a\u3051\u308b\u300c\u30d6\u30eb\u30fc\/\u30b0\u30ea\u30fc\u30f3\u30c7\u30d7\u30ed\u30a4\u300d\u306f\u3001<br \/>\n\u591a\u5c11\u4ed5\u7d44\u307f\u304c\u7570\u306a\u308a\u307e\u3059\u3002\u307e\u305a\u306f\u3053\u3061\u3089\u304b\u3089\u3054\u7d39\u4ecb\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<p>\u516c\u5f0f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8 :<a href=\"https:\/\/docs.aws.amazon.com\/ja_jp\/AmazonRDS\/latest\/UserGuide\/blue-green-deployments-overview.html\">Amazon RDS \u30d6\u30eb\u30fc\/\u30b0\u30ea\u30fc\u30f3\u30c7\u30d7\u30ed\u30a4\u306e\u6982\u8981 - Amazon Relational Database Service<\/a><\/p>\n<p>\u4e0a\u8a18\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306b\u3042\u308b <a href=\"https:\/\/docs.aws.amazon.com\/ja_jp\/AmazonRDS\/latest\/UserGuide\/blue-green-deployments-overview.html#blue-green-deployments-major-steps\">\u30d6\u30eb\u30fc\/\u30b0\u30ea\u30fc\u30f3\u30c7\u30d7\u30ed\u30a4\u306e\u30ef\u30fc\u30af\u30d5\u30ed\u30fc<\/a> \u306e\u90e8\u5206\u304c\u3001<br \/>\nRDS\u306b\u304a\u3051\u308b\u300c\u30d6\u30eb\u30fc\/\u30b0\u30ea\u30fc\u30f3\u30c7\u30d7\u30ed\u30a4\u300d\u306e\u6b63\u4f53\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>Amazon RDS\u306e\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u30d1\u30cd\u30eb\u304b\u3089\u4f5c\u6210\u3067\u304d\u308b\u300c\u30d6\u30eb\u30fc\/\u30b0\u30ea\u30fc\u30f3\u30c7\u30d7\u30ed\u30a4\u300d\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001<br \/>\n\u73fe\u5728\u7a3c\u50cd\u3057\u3066\u3044\u308b\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3068\u540c\u3058\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u30bf\u30a4\u30d7\u30fb\u69cb\u6210\u3092\u3057\u305f<br \/>\n<strong>\u30ea\u30fc\u30c9\u30ec\u30d7\u30ea\u30ab<\/strong> \u74b0\u5883\u304c\u4f5c\u6210\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u4e0b\u8a18\u753b\u50cf\u306b\u304a\u3051\u308b <font color=\"blue\">\u300c\u9752\u8272\u306e\u80cc\u666f(blue = \u672c\u756a\u7a3c\u50cd\u4e2d\u3002\u4ee5\u4e0bblue\u74b0\u5883)\u300d<\/font> \u306b\u8ffd\u52a0\u3057\u3066\u3001<br \/>\n<font color=\"green\">\u300c\u7dd1\u8272\u306e\u80cc\u666f(green = \u65b0\u898f\u74b0\u5883\u3002\u4ee5\u4e0bgreen\u74b0\u5883)\u300d<\/font>\u304c\u4f5c\u6210\u3055\u308c\u3001<br \/>\nblue\u74b0\u5883 \u2192 green\u74b0\u5883\u306b\u306f\u3001\u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306b\u3088\u3063\u3066\u30c7\u30fc\u30bf\u540c\u671f\u304c\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<img decoding=\"async\" src=\"https:\/\/www.skyarch.net\/blog\/wp-content\/uploads\/2025\/03\/de5f443b46a5edc73a573815d948e3ff.png\" alt=\"\u30d6\u30eb\u30fc\/\u30b0\u30ea\u30fc\u30f3\u30c7\u30d7\u30ed\u30a4 \u74b0\u5883\u4f5c\u6210\u6642\" \/>\n<p>\u305d\u306e\u305f\u3081\u3001green\u74b0\u5883\u3092\u4f5c\u6210\u3057\u305f\u5f8c\u3001blue\u74b0\u5883\u306b\u3066\u30c7\u30fc\u30bf\u306e\u66f4\u65b0\u304c\u3042\u3063\u305f\u969b\u306b\u306f\u3001<br \/>\n\u81ea\u52d5\u7684\u306bgreen\u74b0\u5883\u306b\u30c7\u30fc\u30bf\u304c\u540c\u671f(\u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3)\u3055\u308c\u308b\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h3>\u5b9f\u969b\u306b\u78ba\u8a8d\u3057\u3066\u307f\u305f<a id=\"bg-env-check\"><\/a><\/h3>\n<p>\u4eca\u56de\u306f\u7c21\u5358\u306b\u3001\u30c7\u30fc\u30bf\u306e\u540c\u671f\u304c\u3055\u308c\u3066\u3044\u308b\u304b\u3092 EC2(Linux)\u3068RDS for MySQL \u3092\u4f7f\u3063\u3066\u78ba\u8a8d\u3057\u3066\u307f\u307e\u3059\u3002<br \/>\n\u540c\u4e00\u306eVPC\u5185\u306b EC2\u3068RDS for MySQL\u3092\u7528\u610f\u3057\u3001EC2\u306b\u306f mysql \u306e\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u3092\u5c0e\u5165\u3057\u3066\u304a\u308a\u307e\u3059\u3002<\/p>\n<p>RDS for MySQL \u306f\u3001blue\u74b0\u5883\u3092 8.0.34 \u3001green\u74b0\u5883\u3092 8.0.41 \u3068\u6307\u5b9a\u3057\u3066\u4f5c\u6210\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u307e\u305a\u306f blue\u74b0\u5883\u3078\u63a5\u7d9a\u3057\u3001\u72b6\u614b\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n<pre>\nMySQL [(none)]\uff1e status;\n--------------\nmysql  Ver 15.1 Distrib 5.5.68-MariaDB, for Linux (x86_64) using readline 5.1\n\nConnection id:          45\nCurrent database:\nCurrent user:           admin@10.0.1.38\nSSL:                    Not in use\nCurrent pager:          stdout\nUsing outfile:          ''\nUsing delimiter:        ;\nServer:                 MySQL\nServer version:         8.0.32 Source distribution\nProtocol version:       10\nConnection:             bg-test.cb9igfuf8ogi.ap-northeast-1.rds.amazonaws.com via TCP\/IP\nServer characterset:    utf8mb4\nDb     characterset:    utf8mb4\nClient characterset:    utf8mb3\nConn.  characterset:    utf8mb3\nTCP port:               3306\nUptime:                 1 hour 21 min 16 sec\n\nThreads: 4  Questions: 15085  Slow queries: 2  Opens: 387  Flush tables: 3  Open tables: 267  Queries per second avg: 3.093\n--------------\n<\/pre>\n<p>\u73fe\u5728\u306e\u672c\u756a\u6a5f\u3068\u306a\u3063\u3066\u3044\u308b\u306e\u3067\u3001\u7279\u6bb5\u554f\u984c\u306f\u306a\u3044\u3067\u3059\u306d\u3002<\/p>\n<p>\u7d9a\u3044\u3066\u3001green\u74b0\u5883\u3078\u63a5\u7d9a\u3057\u307e\u3059\u3002<br \/>\n\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30b0\u30eb\u30fc\u30d7\u306a\u3069\u3082\u7279\u6bb5\u8a2d\u5b9a\u306f\u4e0d\u8981\u3067\u3001\u63a5\u7d9a\u304c\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<pre>\nMySQL [(none)]\uff1e status;\n--------------\nmysql  Ver 15.1 Distrib 5.5.68-MariaDB, for Linux (x86_64) using readline 5.1\n\nConnection id:          23\nCurrent database:\nCurrent user:           admin@10.0.1.38\nSSL:                    Not in use\nCurrent pager:          stdout\nUsing outfile:          ''\nUsing delimiter:        ;\nServer:                 MySQL\nServer version:         8.0.41 Source distribution\nProtocol version:       10\nConnection:             bg-test-green-jq9eux.cb9igfuf8ogi.ap-northeast-1.rds.amazonaws.com via TCP\/IP\nServer characterset:    utf8mb4\nDb     characterset:    utf8mb4\nClient characterset:    utf8mb3\nConn.  characterset:    utf8mb3\nTCP port:               3306\nUptime:                 44 min 44 sec\n\nThreads: 9  Questions: 3863  Slow queries: 0  Opens: 175  Flush tables: 3  Open tables: 94  Queries per second avg: 1.439\n--------------\n<\/pre>\n<p>\u3053\u3053\u3067\u3001\u30ea\u30fc\u30c9\u30ec\u30d7\u30ea\u30ab\u3068\u306a\u3063\u3066\u3044\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre>\nMySQL [(none)]\uff1e show slave status\\G;\n*************************** 1. row ***************************\n               Slave_IO_State: Waiting for master to send event\n                  Master_Host: 172.23.2.40\n                  Master_User: rdsrepladmin\n                  Master_Port: 3306\n                Connect_Retry: 60\n              Master_Log_File: mysql-bin-changelog.000021\n          Read_Master_Log_Pos: 157\n               Relay_Log_File: relaylog.000047\n                Relay_Log_Pos: 279\n        Relay_Master_Log_File: mysql-bin-changelog.000021\n             Slave_IO_Running: Yes\n            Slave_SQL_Running: Yes\n(\u4e2d\u7565)\n1 row in set, 1 warning (0.00 sec)\n\nERROR: No query specified\n<\/pre>\n<p><code>show slave status;<\/code> \u306e\u30b3\u30de\u30f3\u30c9\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u306d\u3002<br \/>\n\u3053\u308c\u3067\u3001\u30ea\u30fc\u30c9\u30ec\u30d7\u30ea\u30ab\u72b6\u614b\u3067\u3042\u308b\u306e\u304c\u78ba\u8a8d\u3067\u304d\u308b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u3068\u3044\u3046\u3053\u3068\u306f\u3001green\u74b0\u5883\u3078\u306e\u66f8\u304d\u8fbc\u307f\u3082\u3067\u304d\u306a\u3044\u3068\u3044\u3046\u3053\u3068\u306a\u306e\u3067\u3001\u78ba\u8a8d\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre>\nMySQL [(none)]\uff1e create database test;\nERROR 1290 (HY000): The MySQL server is running with the --read-only option so it cannot execute this statement\n<\/pre>\n<p>\u4e0a\u66f8\u304d\u304c\u8a31\u53ef\u3055\u308c\u3066\u3044\u306a\u3044\u305f\u3081\u3001\u30a8\u30e9\u30fc\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>\u9006\u306b\u3001blue\u74b0\u5883\u306b\u63a5\u7d9a\u3057\u3001DB\u3092\u4f5c\u6210\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre>\nroot@ip-10-0-1-38 ssm-user]# mysql -u admin -p -h bg-test.cb9igfuf8ogi.ap-northeast-1.rds.amazonaws.com\nEnter password:\nWelcome to the MariaDB monitor.  Commands end with ; or \\g.\nYour MySQL connection id is 49\nServer version: 8.0.32 Source distribution\n\nCopyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.\n\nType 'help;' or '\\h' for help. Type '\\c' to clear the current input statement.\n\nMySQL [(none)]\uff1e show databases;\n+--------------------+\n| Database           |\n+--------------------+\n| information_schema |\n| mysql              |\n| performance_schema |\n| sys                |\n+--------------------+\n4 rows in set (0.03 sec)\n\nMySQL [(none)]\uff1e create database test;\nQuery OK, 1 row affected (0.02 sec)\n\nMySQL [(none)]\uff1e show databases;\n+--------------------+\n| Database           |\n+--------------------+\n| information_schema |\n| mysql              |\n| performance_schema |\n| sys                |\n| test               |\n+--------------------+\n5 rows in set (0.00 sec)\n<\/pre>\n<p>\u305d\u306e\u5f8c\u3001green\u74b0\u5883\u306b\u63a5\u7d9a\u3057\u3001\u5185\u5bb9\u3092\u898b\u3066\u307f\u308b\u3068<\/p>\n<pre>\n[root@ip-10-0-1-38 ssm-user]# mysql -u admin -p -h bg-test-green-jq9eux.cb9igfuf8ogi.ap-northeast-1.rds.amazonaws.com\nEnter password:\nWelcome to the MariaDB monitor.  Commands end with ; or \\g.\nYour MySQL connection id is 25\nServer version: 8.0.41 Source distribution\n\nCopyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.\n\nType 'help;' or '\\h' for help. Type '\\c' to clear the current input statement.\n\nMySQL [(none)]\uff1e show databases;\n+--------------------+\n| Database           |\n+--------------------+\n| information_schema |\n| mysql              |\n| performance_schema |\n| sys                |\n| test               |\n+--------------------+\n5 rows in set (0.01 sec)\n<\/pre>\n<p>\u3068\u3044\u3046\u3088\u3046\u306b\u3001\u3057\u3063\u304b\u308a\u3068\u30c7\u30fc\u30bf\u304c\u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3055\u308c\u540c\u671f\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<h3>\u74b0\u5883\u4f5c\u6210\u6642\u306e\u6ce8\u610f\u70b9<a id=\"bg-env-warning\"><\/a><\/h3>\n<p>\u4f5c\u6210\u306b\u306f\u3044\u304f\u3064\u304b\u6ce8\u610f\u70b9\u304c\u3042\u308a\u307e\u3059\u3002<br \/>\n\u57fa\u672c\u306f\u4e0b\u8a18\u306eAWS\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u3054\u53c2\u7167\u304f\u3060\u3055\u3044\u3002<br \/>\n<a href=\"https:\/\/docs.aws.amazon.com\/ja_jp\/AmazonRDS\/latest\/UserGuide\/blue-green-deployments-considerations.html\">Amazon RDS \u306e\u30d6\u30eb\u30fc\/\u30b0\u30ea\u30fc\u30f3\u30c7\u30d7\u30ed\u30a4\u306e\u5236\u9650\u3068\u8003\u616e\u4e8b\u9805 - Amazon Relational Database Service<\/a><\/p>\n<p>\u7279\u306b\u6c17\u3092\u3064\u3051\u3066\u3044\u308b\u30dd\u30a4\u30f3\u30c8\u3092\u4e0b\u8a18\u306b\u8a18\u8f09\u3044\u305f\u3057\u307e\u3059\u3002<\/p>\n<ul>\n<li>\u30d6\u30eb\u30fc\/\u30b0\u30ea\u30fc\u30f3\u30c7\u30d7\u30ed\u30a4\u306e\u74b0\u5883\u69cb\u7bc9\u304c\u3067\u304d\u306a\u3044\u5834\u5408\u304c\u3042\u308b\n<ul>\n<li>\u7279\u306b\u30e1\u30b8\u30e3\u30fc\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\u3067\u3042\u308a\u3002\u30a8\u30e9\u30fc\u30ed\u30b0\u3092\u78ba\u8a8d\u3057\u3066\u30a8\u30e9\u30fc\u3092\u89e3\u6d88\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/li>\n<\/ul>\n<\/li>\n<li>RDS for MySQL\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306b\u3066\u3001\u30aa\u30d7\u30b7\u30e7\u30f3\u30b0\u30eb\u30fc\u30d7\u304cdefault\u3067\u306f\u306a\u304f\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3055\u308c\u305f\u3082\u306e\u3092\u5229\u7528\u3057\u3066\u3044\u308b\u5834\u5408\n<ul>\n<li>\u30e1\u30b8\u30e3\u30fc\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\u304c\u5b9f\u65bd\u3067\u304d\u307e\u305b\u3093<\/li>\n<\/ul>\n<\/li>\n<li>RDS for PostgreSQL \u306e\u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u65b9\u5f0f\u306b\u6307\u5b9a\u3042\u308a\n<ul>\n<li>\u30e1\u30b8\u30e3\u30fc\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\u306e\u969b\u306b\u306f\u3001\u8ad6\u7406\u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\n<ul>\n<li>\u5229\u7528\u53ef\u80fd\u306a\u30d0\u30fc\u30b8\u30e7\u30f3\u306b\u305d\u308c\u305e\u308c\u6307\u5b9a\u3042\u308a\u3002<a href=\"https:\/\/docs.aws.amazon.com\/ja_jp\/AmazonRDS\/latest\/UserGuide\/blue-green-deployments-replication-type.html\">\u53c2\u8003\u60c5\u5831\u306f\u3053\u3061\u3089<\/a><\/li>\n<\/ul>\n<\/li>\n<li>\u30de\u30a4\u30ca\u30fc\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\u306e\u969b\u306b\u306f\u3001\u7269\u7406\u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\n<ul>\n<li>\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u308b\u5168\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u5229\u7528\u53ef\u80fd<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>\u672c\u7a3f\u306e\u5192\u982d\u3067\u8a18\u8f09\u3057\u3066\u3044\u308b\u30d6\u30ed\u30b0\u8a18\u4e8b\u5f53\u6642\u3067\u306f\u3001\u5229\u7528\u53ef\u80fd\u306a\u30d0\u30fc\u30b8\u30e7\u30f3\u306b\u6307\u5b9a\u304c\u3042\u308a\u307e\u3057\u305f\u304c\u3001<br \/>\n\u672c\u7a3f\u8a18\u8f09\u73fe\u5728\u3067\u306f\u3001\u57fa\u672c\u7684\u306b\u306f\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u308b\u3059\u3079\u3066\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3067<br \/>\n\u30d6\u30eb\u30fc\/\u30b0\u30ea\u30fc\u30f3\u30c7\u30d7\u30ed\u30a4\u304c\u5229\u7528\u53ef\u80fd\u3068\u306a\u3063\u3066\u304a\u308a\u307e\u3059\u3002  <\/p>\n<p>\u904e\u53bb\u306b\u300c\u30d0\u30fc\u30b8\u30e7\u30f3\u306e\u5236\u7d04\u3067\u5229\u7528\u3067\u304d\u306a\u304b\u3063\u305f\u300d\u3068\u3044\u3046\u5834\u5408\u3067\u3082\u3001<br \/>\n\u73fe\u5728\u306f\u5229\u7528\u53ef\u80fd\u306b\u306a\u3063\u3066\u3044\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u306e\u3067\u3001\u3054\u78ba\u8a8d\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\uff01<\/p>\n<p>\u307e\u305f\u3001\u300c\u30d6\u30eb\u30fc\/\u30b0\u30ea\u30fc\u30f3\u30c7\u30d7\u30ed\u30a4\u300d\u3067\u4f5c\u6210\u3055\u308c\u308b\u74b0\u5883\u306f\u30ea\u30fc\u30c9\u30ec\u30d7\u30ea\u30ab\u74b0\u5883\u306e\u305f\u3081\u3001<br \/>\n<strong>green\u74b0\u5883\u306b\u66f8\u304d\u8fbc\u307f\u306f\u57fa\u672c\u4e0d\u53ef<\/strong> \u3067\u3042\u308b\u3053\u3068\u306b\u6ce8\u610f\u304c\u5fc5\u8981\u3067\u3059\u3002<\/p>\n<p>\u203b\u8a2d\u5b9a\u3067\u66f8\u304d\u8fbc\u307f\u53ef\u80fd\u306b\u5909\u66f4\u306f\u53ef\u80fd\u3060\u304c\u3001\u5207\u308a\u66ff\u3048\u524d\u63d0\u306e\u5834\u5408\u306f\u975e\u63a8\u5968\u3067\u3059\u3002<br \/>\n\u52d5\u4f5c\u78ba\u8a8d\u7528\u306e\u74b0\u5883\u306f\u5225\u306b\u7528\u610f\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<hr \/>\n<h2>RDS\u306b\u304a\u3051\u308b \u300c\u30d6\u30eb\u30fc\/\u30b0\u30ea\u30fc\u30f3\u30c7\u30d7\u30ed\u30a4\u300d\u306e\u5207\u308a\u66ff\u3048\u3092\u5229\u7528\u3057\u305f\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u306e\u6d41\u308c <a id=\"bg-update\"><\/a><\/h2>\n<p>DB\u306b\u3088\u308b\u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u7d44\u3093\u3067\u3044\u308b\u72b6\u614b\u3067green\u74b0\u5883\u306eDB\u30a8\u30f3\u30b8\u30f3\u3092\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3059\u308b\u3068\u3001<br \/>\nblue\u74b0\u5883 = \u65e7\u30d0\u30fc\u30b8\u30e7\u30f3 \/ green\u74b0\u5883 = \u65b0\u30d0\u30fc\u30b8\u30e7\u30f3<br \/>\n\u3068\u3044\u3046\u69cb\u6210\u3067\u3001\u300c\u30d6\u30eb\u30fc\/\u30b0\u30ea\u30fc\u30f3\u30c7\u30d7\u30ed\u30a4\u300d\u74b0\u5883\u304c\u6574\u3044\u307e\u3059\u3002<\/p>\n<p>\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\u7528\u306e\u74b0\u5883\u3092\u4f5c\u6210\u5f8c\u3001\u5b9f\u969b\u306b\u300c\u30d6\u30eb\u30fc\/\u30b0\u30ea\u30fc\u30f3\u30c7\u30d7\u30ed\u30a4\u300d\u74b0\u5883\u304c\u5177\u4f53\u7684\u306b\u3069\u306e\u3088\u3046\u306a\u51e6\u7406\u3092\u3057\u3066\u3044\u308b\u306e\u304b\u3092\u7c21\u5358\u306b\u3054\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n<p>(\u203b AWS\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306e\u300c\u30ef\u30fc\u30af\u30d5\u30ed\u30fc\u300d\u306e5\u306b\u5f53\u305f\u308b\u90e8\u5206\u306b\u306a\u308a\u307e\u3059\u3002)<br \/>\n<a href=\"https:\/\/docs.aws.amazon.com\/ja_jp\/AmazonRDS\/latest\/UserGuide\/blue-green-deployments-overview.html#blue-green-deployments-major-steps\">Amazon RDS \u30d6\u30eb\u30fc\/\u30b0\u30ea\u30fc\u30f3\u30c7\u30d7\u30ed\u30a4\u306e\u6982\u8981 - Amazon Relational Database Service<\/a><\/p>\n<p>AWS\u30de\u30cd\u30b8\u30e1\u30f3\u30c8\u30b3\u30f3\u30bd\u30fc\u30eb\u306a\u3069\u3067\u3001\u300c\u30d6\u30eb\u30fc\/\u30b0\u30ea\u30fc\u30f3\u30c7\u30d7\u30ed\u30a4\u306e\u5207\u308a\u66ff\u3048\u300d\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001<br \/>\n\u5185\u90e8\u7684\u306b\u306f\u3056\u3063\u304f\u308a\u3068\u4e0b\u8a18\u306e\u52d5\u4f5c\u304c\u5b9f\u884c\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>(\u53c2\u8003 : <a href=\"https:\/\/docs.aws.amazon.com\/ja_jp\/AmazonRDS\/latest\/UserGuide\/blue-green-deployments-switching.html\">Amazon RDS \u3067\u306e\u30d6\u30eb\u30fc\/\u30b0\u30ea\u30fc\u30f3\u30c7\u30d7\u30ed\u30a4\u306e\u5207\u308a\u66ff\u3048 - Amazon Relational Database Service<\/a>)<\/p>\n<ol>\n<li>\u74b0\u5883\u5168\u4f53\u3078\u306e\u63a5\u7d9a\u304c\u505c\u6b62<\/li>\n<li>green\u74b0\u5883\u306e\u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u304c\u540c\u671f\u3059\u308b\u307e\u3067\u30b9\u30bf\u30f3\u30d0\u30a4<\/li>\n<li>green\u74b0\u5883\u306e\u30ea\u30fc\u30c9\u30ec\u30d7\u30ea\u30ab\u3092\u6607\u683c\uff08\u66f8\u304d\u8fbc\u307f\u53ef\u80fd\u306a\u72b6\u614b\u306b\u3055\u305b\u308b\uff09<\/li>\n<li>blue\u74b0\u5883\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u8b58\u5225\u5b50\u304c\u3001\u672b\u5c3e\u306b <code>-old1<\/code> \u3068\u3044\u3046\u6587\u5b57\u5217\u304c\u4ed8\u4e0e\u3055\u308c\u305f\u3082\u306e\u306b\u306a\u308a\u307e\u3059\u3002<\/li>\n<li>green\u74b0\u5883\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u8b58\u5225\u5b50\u304c\u3001\u672c\u756a\u74b0\u5883\u5229\u7528\u3068\u540c\u3058\u8b58\u5225\u5b50 (1\u306eblue\u74b0\u5883\u306e\u5909\u66f4\u524d\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u8b58\u5225\u5b50) \u306b\u5909\u66f4\u3055\u308c\u307e\u3059<\/li>\n<\/ol>\n<img decoding=\"async\" src=\"https:\/\/www.skyarch.net\/blog\/wp-content\/uploads\/2025\/03\/1d5ea4150ddcc659d0d648c526f37b0c.png\" alt=\"\u30d6\u30eb\u30fc\/\u30b0\u30ea\u30fc\u30f3\u30c7\u30d7\u30ed\u30a4 \u5207\u308a\u66ff\u3048\" \/>\n<p>RDS\u306b\u304a\u3051\u308b\u300c\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u8b58\u5225\u5b50\u300d\u306e\u5909\u66f4\u3092\u5b9f\u65bd\u3059\u308b\u3068\u3044\u3046\u3053\u3068\u306f\u3001<br \/>\n\u63a5\u7d9a\u3059\u308b\u305f\u3081\u306e\u300c\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u540d\u300d\u306e\u5909\u66f4\u3068\u540c\u7fa9\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u3064\u307e\u308a\u3001RDS\u5074\u3067\u300c\u30d6\u30eb\u30fc\/\u30b0\u30ea\u30fc\u30f3\u30c7\u30d7\u30ed\u30a4\u306e\u5207\u308a\u66ff\u3048\u300d\u3092\u5b9f\u65bd\u3059\u308b\u3053\u3068\u3067\u3001<br \/>\n<strong>\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u5185\u306e\u63a5\u7d9a\u5148\u60c5\u5831\u3092\u5909\u66f4\u3059\u308b\u3053\u3068\u306a\u304f<\/strong>\u3001\u65b0\u30d0\u30fc\u30b8\u30e7\u30f3\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u304c<br \/>\n\u5229\u7528\u53ef\u80fd\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h3>\u5b9f\u969b\u306b\u78ba\u8a8d\u3057\u3066\u307f\u305f <a id=\"bg-update-check\"><\/a><\/h3>\n<p>\u74b0\u5883\u69cb\u7bc9\u6642\u306b\u4f7f\u7528\u3057\u305f\u306e\u3068\u540c\u3058\u74b0\u5883\u3067\u3001\u4eca\u5ea6\u306f\u30d6\u30eb\u30fc\/\u30b0\u30ea\u30fc\u30f3\u30c7\u30d7\u30ed\u30a4\u306e\u5207\u308a\u66ff\u3048\u3092\u5b9f\u65bd\u3057\u3066\u307f\u308b\u3053\u3068\u3067\u3001\u5b9f\u969b\u306b\u63a5\u7d9a\u5148\u74b0\u5883\u304c\u5909\u308f\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u307e\u305a\u306f\u3001\u73fe\u5728\u306e\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8(blue\u74b0\u5883) \u3092\u540d\u524d\u5f15\u304d\u3057\u305f\u3068\u304d\u306eIP\u30a2\u30c9\u30ec\u30b9\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n<pre>\n[root@ip-10-0-1-38 ssm-user]# dig bg-test.cb9igfuf8ogi.ap-northeast-1.rds.amazonaws.com +short\n10.0.2.248\n<\/pre>\n<p>\u3053\u308c\u306f\u3001\u30b5\u30d6\u30cd\u30c3\u30c8\u30b0\u30eb\u30fc\u30d7\u3067\u8a2d\u5b9a\u3057\u3066\u3044\u308b\u30b5\u30d6\u30cd\u30c3\u30c8\u306b\u3066\u5b9a\u7fa9\u3057\u3066\u3044\u308b<br \/>\nIP\u30a2\u30c9\u30ec\u30b9\u30ec\u30f3\u30b8\u304c\u8868\u793a\u3055\u308c\u3066\u3044\u307e\u3059\u3002<br \/>\n\u30d1\u30d6\u30ea\u30c3\u30af\u30a2\u30af\u30bb\u30b9\u304c\u6709\u52b9\u3067\u306f\u306a\u3044\u9650\u308a\u3001\u57fa\u672c\u306f\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8IP\u30a2\u30c9\u30ec\u30b9\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u306d\u3002<\/p>\n<p>\u7d9a\u3044\u3066\u3001green\u74b0\u5883\u306e\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u3092\u540d\u524d\u5f15\u304d\u3057\u305f\u969b\u306eIP\u30a2\u30c9\u30ec\u30b9\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n<pre>\n[root@ip-10-0-1-38 ssm-user]# dig bg-test-green-jq9eux.cb9igfuf8ogi.ap-northeast-1.rds.amazonaws.com +short\n10.0.2.250\n<\/pre>\n<p>\u3053\u3061\u3089\u3082green\u3068\u540c\u69d8\u306eIP\u30ec\u30f3\u30b8\u3092\u6301\u3063\u3066\u3044\u307e\u3059\u306d\u3002<br \/>\n\u3082\u3061\u308d\u3093\u74b0\u5883\u304c\u9055\u3046\u306e\u3067\u3001IP\u30a2\u30c9\u30ec\u30b9\u304c\u5225\u306e\u3082\u306e\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u305d\u308c\u3067\u306f\u5207\u308a\u66ff\u3048\u306e\u30dc\u30bf\u30f3\u3092\u62bc\u3057\u307e\u3057\u3066\u30fb\u30fb\u30fb<br \/>\n<img decoding=\"async\" src=\"https:\/\/www.skyarch.net\/blog\/wp-content\/uploads\/2025\/03\/4bb95d80a384299c6d1c0ea01.png\" alt=\"\u30d6\u30eb\u30fc\/\u30b0\u30ea\u30fc\u30f3\u30c7\u30d7\u30ed\u30a4 \u5207\u66ff\u6642\u30de\u30cd\u30b3\u30f3\u753b\u50cf\" \/><\/p>\n<p>AWS\u30de\u30cd\u30b8\u30e1\u30f3\u30c8\u30b3\u30f3\u30bd\u30fc\u30eb\u4e0a\u3067\u306f\u3001\u5207\u308a\u66ff\u3048\u304c\u5b8c\u4e86\u3057\u307e\u3057\u305f\u3002<br \/>\n\u305d\u308c\u3067\u306f\u8272\u3005\u3068\u60c5\u5831\u3092\u78ba\u8a8d\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<img decoding=\"async\" src=\"https:\/\/www.skyarch.net\/blog\/wp-content\/uploads\/2025\/03\/4bb95d80a384299c6d1c0ea02.png\" alt=\"\u30d6\u30eb\u30fc\/\u30b0\u30ea\u30fc\u30f3\u30c7\u30d7\u30ed\u30a4 \u5207\u308a\u66ff\u3048\u5f8c\u30de\u30cd\u30b3\u30f3\u753b\u50cf\" \/>\n<h4>\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u3068IP\u30a2\u30c9\u30ec\u30b9\u306e\u7d44\u307f\u5408\u308f\u305b<\/h4>\n<p>\u63a5\u7d9a\u5143\u306eEC2\u3088\u308a\u3001\u672c\u756a\u74b0\u5883\u306e\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u540d\u306eIP\u30a2\u30c9\u30ec\u30b9\u3092\u78ba\u8a8d\u3057\u307e\u3059<\/p>\n<pre>\n[root@ip-10-0-1-38 ssm-user]# dig bg-test.cb9igfuf8ogi.ap-northeast-1.rds.amazonaws.com +short\n10.0.2.250\n<\/pre>\n<p>\u5148\u307b\u3069\u306egreen\u74b0\u5883\u306eIP\u30a2\u30c9\u30ec\u30b9\u304c\u8868\u793a\u3055\u308c\u3066\u3044\u307e\u3059\u306d\u3002<\/p>\n<p>\u7d9a\u3044\u3066\u306f <code>-old1<\/code> \u306e\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u540d\u306eIP\u30a2\u30c9\u30ec\u30b9\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n<pre>\n[root@ip-10-0-1-38 ssm-user]# dig bg-test-old1.cb9igfuf8ogi.ap-northeast-1.rds.amazonaws.com +short\n10.0.2.248\n<\/pre>\n<p>\u3053\u3061\u3089\u306f\u5148\u7a0b\u306eblue\u74b0\u5883\u306eIP\u30a2\u30c9\u30ec\u30b9\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u306d\u3002<br \/>\n\u3064\u307e\u308a\u3001\u5207\u308a\u66ff\u3048\u3092\u5b9f\u884c\u3057\u305f\u3053\u3068\u3067 \u672c\u756a\u74b0\u5883\u306e\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u540d\u3067\u63a5\u7d9a\u3057\u305f\u969b\u306b<br \/>\ngreen\u5074\u306e\u74b0\u5883\u306b\u63a5\u7d9a\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u308b\u3068\u3044\u3046\u3053\u3068\u3067\u3059\u3002<\/p>\n<p>\u3067\u306f\u3001\u672c\u756a\u74b0\u5883\u306e\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u540d\u306b\u30ed\u30b0\u30a4\u30f3\u3057\u3066\u3001\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u78ba\u8a8d\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre>\n[root@ip-10-0-1-38 ssm-user]# mysql -u admin -p -h bg-test.cb9igfuf8ogi.ap-northeast-1.rds.amazonaws.com\nEnter password:\nWelcome to the MariaDB monitor.  Commands end with ; or \\g.\nYour MySQL connection id is 28\nServer version: 8.0.41 Source distribution\n\nCopyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.\n\nType 'help;' or '\\h' for help. Type '\\c' to clear the current input statement.\n\nMySQL [(none)]\uff1e status;\n--------------\nmysql  Ver 15.1 Distrib 5.5.68-MariaDB, for Linux (x86_64) using readline 5.1\n\nConnection id:          28\nCurrent database:\nCurrent user:           admin@10.0.1.38\nSSL:                    Not in use\nCurrent pager:          stdout\nUsing outfile:          ''\nUsing delimiter:        ;\nServer:                 MySQL\nServer version:         8.0.41 Source distribution\nProtocol version:       10\nConnection:             bg-test.cb9igfuf8ogi.ap-northeast-1.rds.amazonaws.com via TCP\/IP\nServer characterset:    utf8mb4\nDb     characterset:    utf8mb4\nClient characterset:    utf8mb3\nConn.  characterset:    utf8mb3\nTCP port:               3306\nUptime:                 52 min 50 sec\n\nThreads: 3  Questions: 4709  Slow queries: 0  Opens: 203  Flush tables: 3  Open tables: 120  Queries per second avg: 1.485\n--------------\n<\/pre>\n<p>green\u74b0\u5883\u5074\u3001\u3064\u307e\u308a\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3055\u308c\u305f\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u8868\u793a\u3055\u308c\u307e\u3057\u305f\u3002<br \/>\nDNS\u306e\u30ec\u30b3\u30fc\u30c9\u5909\u66f4\u3092\u4f7f\u3063\u305f\u4ed5\u7d44\u307f\u3067\u3001\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u540d\u3092\u5909\u66f4\u3055\u305b\u308b\u3053\u3068\u306a\u304f\u3001<br \/>\n\u63a5\u7d9a\u5148\u306e\u6a5f\u5668\u60c5\u5831\u304c\u5909\u66f4\u3067\u304d\u308b\u3068\u3044\u3046\u4ed5\u7d44\u307f\u3067\u3059\u306d\uff01<\/p>\n<h4>\u30ea\u30fc\u30c9\u30ec\u30d7\u30ea\u30ab\u306e\u72b6\u614b<\/h4>\n<p>\u5207\u308a\u66ff\u3048\u5f8c\u306egreen\u74b0\u5883\u306b\u63a5\u7d9a\u3057\u3066\u3001\u30ea\u30fc\u30c9\u30ec\u30d7\u30ea\u30ab\u306e\u72b6\u614b\u3092\u898b\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre>\n[root@ip-10-0-1-38 ssm-user]# mysql -u admin -p -h bg-test.cb9igfuf8ogi.ap-northeast-1.rds.amazonaws.com\nEnter password:\nWelcome to the MariaDB monitor.  Commands end with ; or \\g.\nYour MySQL connection id is 32\nServer version: 8.0.41 Source distribution\n\nCopyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.\n\nType 'help;' or '\\h' for help. Type '\\c' to clear the current input statement.\n\nMySQL [(none)]\uff1e show slave status\\G;\nEmpty set, 1 warning (0.01 sec)\n\nERROR: No query specified\n<\/pre>\n<p>\u3053\u306e\u7d50\u679c\u304b\u3089\u3001green\u74b0\u5883\u306f\u30ea\u30fc\u30c9\u30ec\u30d7\u30ea\u30ab\u3067\u306f\u306a\u304f\u3001<br \/>\n\u66f8\u304d\u8fbc\u307f\u53ef\u80fd\u306a\u30b9\u30bf\u30f3\u30c9\u30a2\u30ed\u30f3\u72b6\u614b\u3067\u3042\u308b\u3053\u3068\u304c\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002<br \/>\n\u5b9f\u969b\u306b\u3001DB\u306b\u66f8\u304d\u8fbc\u307f\u3092\u3057\u3066\u307f\u307e\u3057\u3087\u3046<\/p>\n<pre>\nMySQL [(none)]\uff1e create database testAfterBG;\nQuery OK, 1 row affected (0.02 sec)\n\nMySQL [(none)]\uff1e show databases;\n+--------------------+\n| Database           |\n+--------------------+\n| information_schema |\n| mysql              |\n| performance_schema |\n| sys                |\n| test               |\n| testAfterBG        |\n+--------------------+\n6 rows in set (0.00 sec)\n<\/pre>\n<p>\u5148\u7a0b\u306f\u65b0\u30d0\u30fc\u30b8\u30e7\u30f3\u306eDB\u3067\u306f\u3067\u304d\u306a\u304b\u3063\u305f\u66f8\u304d\u8fbc\u307f\u304c\u53ef\u80fd\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<br \/>\n\u3053\u306e\u3053\u3068\u304b\u3089\u3082\u3001\u30ea\u30fc\u30c9\u30ec\u30d7\u30ea\u30ab\u304c\u89e3\u9664\u3055\u308c\u3001\u6607\u683c\u3057\u305f\u72b6\u614b\u3067\u3042\u308b\u3053\u3068\u304c\u78ba\u8a8d\u3067\u304d\u307e\u3059\u306d\u3002<\/p>\n<h4>\u65e7\u74b0\u5883\u3068\u306e\u30c7\u30fc\u30bf\u9023\u643a<\/h4>\n<p>\u3067\u306f\u6700\u5f8c\u306b\u3001 -old1 \u3068\u3044\u3046\u540d\u524d\u304c\u3064\u3044\u305f\u65e7\u74b0\u5883\u306b\u30ed\u30b0\u30a4\u30f3\u3057\u3066\u3001<br \/>\n\u5148\u307b\u3069\u66f8\u304d\u8fbc\u3093\u3060\u30c7\u30fc\u30bf\u304c\u9023\u643a\u3055\u308c\u3066\u3044\u308b\u304b\u3092\u898b\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre>\n[root@ip-10-0-1-38 ssm-user]# mysql -u admin -p -h bg-test-old1.cb9igfuf8ogi.ap-northeast-1.rds.amazonaws.com\nEnter password:\nWelcome to the MariaDB monitor.  Commands end with ; or \\g.\nYour MySQL connection id is 55\nServer version: 8.0.32 Source distribution\n\nCopyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.\n\nType 'help;' or '\\h' for help. Type '\\c' to clear the current input statement.\n\nMySQL [(none)]\uff1e show databases;\n+--------------------+\n| Database           |\n+--------------------+\n| information_schema |\n| mysql              |\n| performance_schema |\n| sys                |\n| test               |\n+--------------------+\n5 rows in set (0.01 sec)\n<\/pre>\n<p>\u5207\u308a\u66ff\u3048\u304c\u5b8c\u4e86\u3057\u305f\u3042\u3068\u306f\u3001\u30d6\u30eb\u30fc\/\u30b0\u30ea\u30fc\u30f3\u306e\u95a2\u4fc2\u6027\u306f\u89e3\u9664\u3055\u308c\u3001<br \/>\n\u305d\u308c\u305e\u308c\u304c\u30b9\u30bf\u30f3\u30c9\u30a2\u30ed\u30f3\u3067\u52d5\u4f5c\u3057\u307e\u3059\u3002<br \/>\n\u305d\u306e\u305f\u3081\u3001green\u74b0\u5883\u3067\u66f8\u304d\u8fbc\u3093\u3060\u5185\u5bb9\u306f\u3001blue\u5074\u306b\u66f8\u304d\u8fbc\u307e\u308c\u308b\u3053\u3068\u306f\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n<p>\u3053\u306e\u6642\u70b9\u3067\u3001blue\u74b0\u5883\u306f\u3001\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\u3057\u305fgreen\u74b0\u5883\u306b\u3066\u52d5\u4f5c\u4e0d\u826f\u304c\u3042\u3063\u305f\u969b\u306e\u5207\u308a\u623b\u3057\u7528\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u5f79\u5272\u3092\u62c5\u3044\u307e\u3059\u3002<br \/>\n(\u203b\u5207\u308a\u623b\u3057\u306f\u3001\u624b\u52d5\u3067\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u8b58\u5225\u5b50\u3092\u5909\u66f4\u3059\u308b\u3053\u3068\u3067\u5bfe\u5fdc\u53ef\u80fd\u3002)<br \/>\n\u305f\u3060\u3057\u3001green\u3067\u66f8\u304d\u8fbc\u3093\u3060\u5185\u5bb9\u306f\u53cd\u6620\u3055\u308c\u306a\u3044\u305f\u3081\u3001\u4eee\u306b\u5207\u308a\u623b\u3057\u305f\u5f8c\u306b\u306f\u3001<br \/>\ngreen\u3067\u66f8\u304d\u8fbc\u307e\u308c\u305f\u5185\u5bb9\u306f\u5225\u9014blue\u5074\u306b\u66f8\u304d\u8fbc\u3080\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u306e\u3067\u6ce8\u610f\u304c\u5fc5\u8981\u3067\u3059\u3002<\/p>\n<p>\u305d\u3057\u3066\u3001\u7279\u306b\u554f\u984c\u304c\u306a\u304f\u306a\u3063\u305f\u969b\u306b\u306f\u3001blue\u74b0\u5883\u306f\u304a\u5f79\u5fa1\u514d\u3068\u3044\u3046\u3053\u3068\u3067\u3001<br \/>\n\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u524a\u9664\u3092\u5b9f\u65bd\u3057\u307e\u3057\u3087\u3046\u3002<br \/>\n\uff08\u6b8b\u3057\u3066\u304a\u304f\u3068\u3001\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u6599\u91d1\u304c\uff12\u53f0\u5206\u8ab2\u91d1\u3055\u308c\u7d9a\u3051\u308b\u3053\u3068\u306b\u306a\u308a\u307e\u3059\uff09<\/p>\n<h3>\u5207\u66ff\u6642\u306e\u6ce8\u610f\u70b9 <a id=\"bg-update-warning\"><\/a><\/h3>\n<p>\u30d6\u30eb\u30fc\/\u30b0\u30ea\u30fc\u30f3\u30c7\u30d7\u30ed\u30a4\u306e\u5207\u308a\u66ff\u3048\u6642\u306b\u304a\u3051\u308b\u6ce8\u610f\u70b9\u3092\u3044\u304f\u3064\u304b\u3054\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n<p>\u8a73\u7d30\u306f\u3001\u3053\u3061\u3089\u2193\u306eAWS\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306b\u8a18\u8f09\u304c\u3042\u308a\u307e\u3059\u306e\u3067\u3054\u53c2\u7167\u304f\u3060\u3055\u3044\u3002<br \/>\n<a href=\"https:\/\/docs.aws.amazon.com\/ja_jp\/AmazonRDS\/latest\/UserGuide\/blue-green-deployments-switching.html\">Amazon RDS \u3067\u306e\u30d6\u30eb\u30fc\/\u30b0\u30ea\u30fc\u30f3\u30c7\u30d7\u30ed\u30a4\u306e\u5207\u308a\u66ff\u3048 - Amazon Relational Database Service<\/a><\/p>\n<ul>\n<li>\n<p>\u5207\u308a\u66ff\u3048\u306e\u30bf\u30a4\u30e0\u30a2\u30a6\u30c8<\/p>\n<ul>\n<li>\u57fa\u672c\u306f5\u5206\u4ee5\u5185\u306b\u5207\u308a\u66ff\u308f\u308b\u307e\u3067\u5f85\u3061\u307e\u3059\u3002\u3082\u3057\u5207\u308a\u66ff\u308f\u3089\u306a\u3044\u5834\u5408\u306f\u30c7\u30d7\u30ed\u30a4\u306f\u5b9f\u884c\u3055\u308c\u305a\u3001\u30ed\u30fc\u30eb\u30d0\u30c3\u30af\u3055\u308c\u307e\u3059\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30e9\u30b0<\/p>\n<ul>\n<li>\u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30e9\u30b0\u304c\u5927\u304d\u3044\u5834\u5408\u306f\u3001\u5207\u308a\u66ff\u3048\u307e\u3067\u306b\u6642\u9593\u304c\u304b\u304b\u308b\u3001\u3082\u3057\u304f\u306f\u5207\u308a\u66ff\u3048\u306b\u5931\u6557\u3059\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002\u8ca0\u8377\u306e\u304b\u304b\u3089\u306a\u3044\u6642\u9593\u5e2f\u306b\u5207\u308a\u66ff\u3048\u3092\u5b9f\u65bd\u3059\u308b\u306e\u304c\u304a\u3059\u3059\u3081\u3067\u3059\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u52d5\u4f5c\u78ba\u8a8d<\/p>\n<ul>\n<li>\u5207\u308a\u66ff\u3048\u5f8c\u306eDB\u30a8\u30f3\u30b8\u30f3\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u554f\u984c\u306a\u304f\u52d5\u4f5c\u3059\u308b\u304b\u306e\u78ba\u8a8d\u3092\u5b9f\u65bd\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<hr \/>\n<h2>\u307e\u3068\u3081 <a id=\"matome\"><\/a><\/h2>\n<p>\u4eca\u56de\u306f\u3001\u300c\u30d6\u30eb\u30fc\/\u30b0\u30ea\u30fc\u30f3\u30c7\u30d7\u30ed\u30a4\u300d\u3092\u5229\u7528\u3057\u305f\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\u306e<br \/>\n\u6280\u8853\u7684\u306a\u4ed5\u69d8\u3092\u4e2d\u5fc3\u306b\u304a\u5c4a\u3051\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u30c0\u30a6\u30f3\u30bf\u30a4\u30e0\u3082\u77ed\u304f\u975e\u5e38\u306b\u4fbf\u5229\u306a\u534a\u9762\u3001\u6280\u8853\u7684\u306b\u306f\u8907\u96d1\u306a\u5185\u5bb9\u304c\u542b\u307e\u308c\u3066\u3044\u305f\u304b\u3068\u601d\u3044\u307e\u3059\u3002<br \/>\n\u3053\u306e\u8a18\u4e8b\u304c\u3001\u305d\u306e\u3088\u3046\u306a\u72b6\u6cc1\u306e\u7686\u69d8\u306e\u7406\u89e3\u306e\u624b\u52a9\u3051\u306b\u306a\u308c\u3070\u5e78\u3044\u3067\u3059\u3002<\/p>\n<p>\u307e\u305f\u3001\u5f0a\u793e\u3067RDS\u306e\u4fdd\u5b88\u904b\u7528\u5951\u7d04\u304c\u3042\u308b\u304a\u5ba2\u69d8\u306b\u304a\u304b\u308c\u307e\u3057\u3066\u306f\u3001<br \/>\n\u304a\u6c17\u8efd\u306b\u30b5\u30dd\u30fc\u30c8\u62c5\u5f53\u8005\u3078\u304a\u6c17\u8efd\u306b\u3054\u76f8\u8ac7\u304f\u3060\u3055\u3044\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3053\u3068\u306e\u306f\u3058\u307e\u308a Amazon RDS \u306b\u3066\u5229\u7528\u3057\u3066\u3044\u308bMySQL\u3001MariaDB\u3001PostgreSQL\u306a\u3069\u306eDB\u30a8\u30f3\u30b8\u30f3\u306e \u4e00\u90e8\u30d0\u30fc\u30b8\u30e7\u30f3\u306e\u30b5\u30dd\u30fc\u30c8\u7d42\u4e86\u671f\u9650\u304c 2025\u5e743\u6708\u672b\u3068\u306a\u3063\u3066\u304a\u308a\u307e\u3059\u3002 \u5bfe\u8c61\u306eDB\u30a8\u30f3\u30b8\u30f3\u30d0\u30fc\u30b8&#8230;<\/p>\n","protected":false},"author":82,"featured_media":28496,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_locale":"ja","_original_post":"https:\/\/www.skyarch.net\/blog\/?p=28493","footnotes":""},"categories":[20,109],"tags":[],"class_list":{"0":"post-28493","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-aws","8":"category-rds","9":"ja"},"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/posts\/28493","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/users\/82"}],"replies":[{"embeddable":true,"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/comments?post=28493"}],"version-history":[{"count":14,"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/posts\/28493\/revisions"}],"predecessor-version":[{"id":28634,"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/posts\/28493\/revisions\/28634"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/media\/28496"}],"wp:attachment":[{"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/media?parent=28493"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/categories?post=28493"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/tags?post=28493"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}