Warning: Declaration of Jetpack_IXR_Client::query() should be compatible with IXR_Client::query(...$args) in /home/onedesign/1design.jp/public_html/wp-content/plugins/jetpack/vendor/automattic/jetpack-connection/legacy/class-jetpack-ixr-client.php on line 0

Warning: Cannot modify header information - headers already sent by (output started at /home/onedesign/1design.jp/public_html/wp-content/plugins/jetpack/vendor/automattic/jetpack-connection/legacy/class-jetpack-ixr-client.php:0) in /home/onedesign/1design.jp/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/onedesign/1design.jp/public_html/wp-content/plugins/jetpack/vendor/automattic/jetpack-connection/legacy/class-jetpack-ixr-client.php:0) in /home/onedesign/1design.jp/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/onedesign/1design.jp/public_html/wp-content/plugins/jetpack/vendor/automattic/jetpack-connection/legacy/class-jetpack-ixr-client.php:0) in /home/onedesign/1design.jp/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/onedesign/1design.jp/public_html/wp-content/plugins/jetpack/vendor/automattic/jetpack-connection/legacy/class-jetpack-ixr-client.php:0) in /home/onedesign/1design.jp/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/onedesign/1design.jp/public_html/wp-content/plugins/jetpack/vendor/automattic/jetpack-connection/legacy/class-jetpack-ixr-client.php:0) in /home/onedesign/1design.jp/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/onedesign/1design.jp/public_html/wp-content/plugins/jetpack/vendor/automattic/jetpack-connection/legacy/class-jetpack-ixr-client.php:0) in /home/onedesign/1design.jp/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/onedesign/1design.jp/public_html/wp-content/plugins/jetpack/vendor/automattic/jetpack-connection/legacy/class-jetpack-ixr-client.php:0) in /home/onedesign/1design.jp/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/onedesign/1design.jp/public_html/wp-content/plugins/jetpack/vendor/automattic/jetpack-connection/legacy/class-jetpack-ixr-client.php:0) in /home/onedesign/1design.jp/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1794
{"id":1829,"date":"2016-08-10T08:30:23","date_gmt":"2016-08-09T23:30:23","guid":{"rendered":"https:\/\/1design.jp\/?p=1829"},"modified":"2016-11-21T21:22:56","modified_gmt":"2016-11-21T12:22:56","slug":"%e8%b8%8f%e3%81%bf%e5%8f%b0%e3%82%b5%e3%83%bc%e3%83%90%e3%83%bc%e7%b5%8c%e7%94%b1%e3%81%a7rds%e3%81%ab%e6%8e%a5%e7%b6%9a%e3%81%95%e3%81%9b%e3%82%8b%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"https:\/\/1design.jp\/web-development\/wordpress\/1829","title":{"rendered":"PHP\u3092\u8e0f\u307f\u53f0\u30b5\u30fc\u30d0\u30fc\u7d4c\u7531\u3067RDS\u306b\u63a5\u7d9a\u3055\u305b\u308b\u65b9\u6cd5"},"content":{"rendered":"
\n

\u4e00\u8a00\u307e\u3068\u3081<\/h1>\n

WordPress\u958b\u767a\u3067\u30ea\u30e2\u30fc\u30c8\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u4f7f\u3044\u305f\u3044\uff01
\n\u554f\u984c\u306f\u3001\u8e0f\u307f\u53f0\u30b5\u30fc\u30d0\u30fc\u7d4c\u7531\u3058\u3083\u306a\u3044\u3068\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u306a\u3044\u2026
\nSSH\u306eLocal-Forward\u6a5f\u80fd\u3092\u4f7f\u3048\u3070\u7c21\u5358\u306b\u3067\u304d\u308b\u3002<\/p>\n<\/section>\n

\u80cc\u666f\u30fb\u554f\u984c\u70b9<\/h2>\n

\u4f55\u3082WordPress\u306b\u9650\u3063\u305f\u3053\u3068\u3067\u306f\u306a\u3044\u306e\u3067\u3059\u304c\u3001\u30ea\u30e2\u30fc\u30c8\u306b\u3042\u308b\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u958b\u767a\u8005\u3089\u304c\u5171\u6709\u3057\u3066\u4f7f\u3044\u305f\u3044\u5834\u9762\u306f\u591a\u3005\u3042\u308b\u3068\u601d\u3044\u307e\u3059\u3002\u591a\u304f\u306e\u5834\u5408\u3001\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u4e0a\u306e\u7406\u7531\u3067\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u5916\u90e8(\u30a4\u30f3\u30bf\u30cd\u30c3\u30c8)\u304b\u3089\u306e\u63a5\u7d9a\u304c\u3067\u304d\u306a\u3044\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u308b\u3053\u3068\u304c\u591a\u3044\u3068\u601d\u3044\u307e\u3059\u3002\u8e0f\u307f\u53f0\u3092\u7d4c\u7531\u3057\u306a\u3044\u3068\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u306a\u3044\u3088\u3046\u306a\u69cb\u6210\u304c\u5b9a\u77f3\u3067\u3059\u3088\u306d\u3002<\/p>\n

\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001AWS\u306e\u300cEC2 + RDS\u300d\u3068\u3044\u3046\u69cb\u6210\u3092\u4f8b\u306b\u3001\u30ed\u30fc\u30ab\u30eb\u30de\u30b7\u30f3\u306ePHP(WordPress)\u304b\u3089\u3001\u8e0f\u307f\u53f0\u306e\u5411\u3053\u3046\u306b\u3042\u308bRDS\u306b\u63a5\u7d9a\u3055\u305b\u308b\u65b9\u6cd5\u3092\u7d39\u4ecb\u3067\u304d\u308c\u3070\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n

\u30b5\u30fc\u30d0\u30fc\u69cb\u6210\u56f3<\/h2>\n

(\u672c\u8a18\u4e8b\u3067\u4f7f\u3046IP\u30a2\u30c9\u30ec\u30b9\u306a\u3069\u3001\u3059\u3079\u3066\u67b6\u7a7a\u306e\u3082\u306e\u3067\u3059)
\n\"network\"<\/p>\n

SSH\u306eLocal-Forward\u6a5f\u80fd\u3092\u4f7f\u3046<\/h2>\n

MySQL Workbench<\/a>\u3067\u306f\u300cTCP\/IP over SSH\u300d\u3068\u3044\u3046\u63a5\u7d9a\u65b9\u6cd5\u304c\u3042\u308a\u307e\u3059\u3002\u305d\u308c\u3092\u4f7f\u3048\u3070\u305f\u3068\u3048\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30b5\u30fc\u30d0\u30fc\u304c\u8e0f\u307f\u53f0\u30b5\u30fc\u30d0\u30fc\u306e\u5411\u3053\u3046\u306b\u3042\u308b\u3068\u3057\u3066\u3082\u4e00\u767a\u3067\u63a5\u7d9a\u3067\u304d\u3066\u4fbf\u5229\u3067\u3059\u3088\u306d\u3002PHP\u306eSSH2<\/a>\u62e1\u5f35\u3092\u4f7f\u3063\u3066\u4f3c\u305f\u3088\u3046\u306a\u3053\u3068\u3092PHP\u5074\u3067\u5b9f\u88c5\u3059\u308b\u306e\u304c\u7406\u60f3\u3067\u3059\u304c\u3001WordPress\u3092\u5f04\u3089\u306a\u3044\u3068\u3044\u3051\u306a\u3044\u3057\u3001\u30c7\u30d7\u30ed\u30a4\u3059\u308b\u3068\u304d\u306b\u9762\u5012\u305d\u3046\u3060\u304b\u3089\u3001\u4eca\u56de\u306fSSH\u306eLocal-Forward\u6a5f\u80fd\u3092\u4f7f\u3063\u305f\u65b9\u6cd5\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n

\u5177\u4f53\u7684\u306b\u306f<\/p>\n

    \n
  1. WordPress\u5074\u3067DB\u30db\u30b9\u30c8\u3092127.0.0.1:3333<\/code>\u306b\u5909\u66f4<\/li>\n
  2. \u30ed\u30fc\u30ab\u30eb\u30de\u30b7\u30f3\u3067SSH\u3092\u4f7f\u3063\u3066\u3001\u30ed\u30fc\u30ab\u30eb\u306e3333\u30dd\u30fc\u30c8\u3078\u306e\u30d1\u30b1\u30c3\u30c8\u3092\u8e0f\u307f\u53f0\u30b5\u30fc\u30d0\u30fc\u3092\u7d4c\u7531\u3057\u3066RDS\u306b\u8ee2\u9001\u3059\u308b<\/li>\n<\/ol>\n

    \u3068\u3044\u3046\u6bb5\u53d6\u308a\u3067\u3059\u3002<\/p>\n

    WordPress\u5074\u306e\u8a2d\u5b9a<\/h3>\n

    wp-config.php<\/code>\u5185\u3067<\/p>\n

    \/\/ MySQL \u306e\u30db\u30b9\u30c8\u540d\u3092\u30ed\u30fc\u30ab\u30eb\u30db\u30b9\u30c8\u306e3333\u30dd\u30fc\u30c8\u306b\u5909\u3048\u308b\r\ndefine('DB_HOST', '127.0.0.1:3333');\r\n\r\n\/\/ WordPress\u306eURL\u3092\u30ed\u30fc\u30ab\u30eb\u30de\u30b7\u30f3\u7528\u306b\u5909\u3048\u308b\r\ndefine( 'WP_HOME', 'http:\/\/localhost' );\r\ndefine( 'WP_SITEURL', 'http:\/\/localhost' );<\/pre>\n

    \u3061\u306a\u307f\u306b\u3001WordPress\u306eURL\u306e\u8a2d\u5b9a\u306e\u3068\u3053\u308d\u3067\u3059\u304c\u3001\u79c1\u306f\u30ed\u30fc\u30ab\u30eb\u30db\u30b9\u30c8\u3067\u3082\u672c\u756a\u306eWordPress\u306eURL\u3092\u4f7f\u3063\u3066\u958b\u767a\u3059\u308b\u3053\u3068\u304c\u591a\u3044\u3067\u3059(\u203bhosts\u30d5\u30a1\u30a4\u30eb\u3067\u30de\u30c3\u30d4\u30f3\u30b0\u3092\u8a2d\u5b9a)\u3002\u305d\u306e\u5834\u5408\u306f\u3082\u3061\u308d\u3093http:\/\/localhost<\/code>\u3067\u306f\u306a\u304f\u3001\u672c\u756a\u306eURL\u306b\u306a\u308a\u307e\u3059\u3002\u307f\u306a\u3055\u3093\u3082\u81ea\u5206\u306e\u74b0\u5883\u306b\u5408\u308f\u305b\u3066\u9069\u5b9c\u306bURL\u3092\u5909\u3048\u3066\u4e0b\u3055\u3044\u3002<\/p>\n

    SSH\u306e\u8a2d\u5b9a<\/h3>\n
    ssh \\\r\n-i ~\/.ssh\/id_rsa \\\r\n-p 55555 \\\r\n-L 3333:my-db.xxxxxxxxxxxxxxxx.ap-northeast-1.rds.amazonaws.com:3306 \\\r\n-N -f \\\r\[email protected]<\/pre>\n\n\n\n\n\n\n\n\n
    -i identity_file<\/th>\n\u79d8\u5bc6\u9375\u306e\u30d1\u30b9<\/td>\n<\/tr>\n
    -p port<\/th>\n\u30ea\u30e2\u30fc\u30c8\u30db\u30b9\u30c8(\u8e0f\u307f\u53f0\u30b5\u30fc\u30d0\u30fc)\u306b\u63a5\u7d9a\u3059\u308b\u305f\u3081\u306e\u30dd\u30fc\u30c8\u3002\u30b5\u30fc\u30d0\u30fc\u5074\u3067SSH\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u30dd\u30fc\u30c8\u3092\u5909\u66f4\u3057\u3066\u306a\u3051\u308c\u3070\u8a2d\u5b9a\u3059\u308b\u5fc5\u8981\u306f\u306a\u3044\u3002<\/td>\n<\/tr>\n
    -L [bind_address:]port:host:hostport<\/th>\nLocal-Forward\u306e\u8a2d\u5b9a\u3002
    \nport<\/code>\u306f\u30ed\u30fc\u30ab\u30eb\u30db\u30b9\u30c8\u3067listen\u3057\u305f\u3044\u30dd\u30fc\u30c8\u3002
    \nport<\/code>\u306b\u9001\u3089\u308c\u3066\u304d\u305f\u30d1\u30b1\u30c3\u30c8\u306f\u30ea\u30e2\u30fc\u30c8\u30db\u30b9\u30c8(\u8e0f\u307f\u53f0\u30b5\u30fc\u30d0\u30fc)\u306b\u8ee2\u9001\u3055\u308c\u3001\u3055\u3089\u306b\u30ea\u30e2\u30fc\u30c8\u30db\u30b9\u30c8\u304b\u3089\u3001host<\/code>\u30db\u30b9\u30c8\u306ehostport<\/code>\u30dd\u30fc\u30c8\u306b\u8ee2\u9001\u3055\u308c\u308b\u3002<\/td>\n<\/tr>\n
    -N<\/th>\n[\u30aa\u30d7\u30b7\u30e7\u30f3] \u30ea\u30e2\u30fc\u30c8\u30db\u30b9\u30c8\u306b\u30ed\u30b0\u30a4\u30f3\u3060\u3051\u3057\u3066\u3001\u30b3\u30de\u30f3\u30c9\u304c\u5b9f\u884c\u3067\u304d\u306a\u3044\u3088\u3046\u306b\u3059\u308b\u3002<\/td>\n<\/tr>\n
    -f<\/th>\n[\u30aa\u30d7\u30b7\u30e7\u30f3] \u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u3067\u5b9f\u884c\u3055\u305b\u308b\u3002
    \n-f<\/code>\u3064\u304d\u3067\u5b9f\u884c\u3057\u305f\u5f8c\u3067\u30c8\u30f3\u30cd\u30eb\u3092\u3084\u3081\u305f\u3044\u5834\u5408\u306fkill<\/code>\u3067\u30d7\u30ed\u30bb\u30b9\u3092\u6bba\u3059\u3057\u304b\u306a\u3044\u3067\u3059\u3002\u305d\u308c\u304c\u9762\u5012\u306a\u3089\u4ed8\u3051\u306a\u3044\u3067\u304a\u304d\u307e\u3057\u3087\u3046\u3002<\/td>\n<\/tr>\n
    user@hostname<\/th>\n\u30ea\u30e2\u30fc\u30c8\u30db\u30b9\u30c8\u306e\u30e6\u30fc\u30b6\u540d\u3068\u30db\u30b9\u30c8\u540d<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

    ~\/.ssh\/config<\/code> \u3067\u30b3\u30de\u30f3\u30c9\u3092\u7c21\u7565\u5316<\/h4>\n

    \u30b3\u30de\u30f3\u30c9\u304c\u9577\u3044\u306e\u3067\u3001\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3067\u7c21\u7565\u5316\u3057\u3066\u304a\u304f\u3068\u4fbf\u5229\u3067\u3059\u3002~\/.ssh\/config<\/code>\u3092\u958b\u3044\u3066\u4ee5\u4e0b\u3092\u8ffd\u8a18\u3057\u307e\u3059\u3002<\/p>\n

    # \u8e0f\u307f\u53f0\u30b5\u30fc\u30d0\u30fc\u3068\u8e0f\u307f\u53f0\u30b5\u30fc\u30d0\u30fc\u30c8\u30f3\u30cd\u30eb\u306e\u5171\u901a\u8a2d\u5b9a\r\nHost bastion bastion--tunnel\r\n    User         wang\r\n    HostName     54.249.240.126\r\n    IdentityFile ~\/.ssh\/id_rsa\r\n    Port         55555\r\n\r\n\r\n# \u8e0f\u307f\u53f0\u30b5\u30fc\u30d0\u30fc\u30c8\u30f3\u30cd\u30eb\u306e\u8a2d\u5b9a\r\nHost bastion--tunnel\r\n    LocalForward 3333 my-db.xxxxxxxxxxxxxxxx.ap-northeast-1.rds.amazonaws.com:3306<\/pre>\n

    \u305d\u3046\u3059\u308b\u3068\u3001ssh bastion--tunnel -N -f<\/code>\u3060\u3051\u3067\u30c8\u30f3\u30cd\u30eb\u3092\u958b\u8a2d\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n

    \u4ee5\u4e0a\u3067\u3059\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"

    \u4e00\u8a00\u307e\u3068\u3081 WordPress\u958b\u767a\u3067\u30ea\u30e2\u30fc\u30c8\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u4f7f\u3044\u305f\u3044\uff01 \u554f\u984c\u306f\u3001\u8e0f\u307f\u53f0\u30b5\u30fc\u30d0\u30fc\u7d4c\u7531\u3058\u3083\u306a\u3044\u3068\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u306a\u3044\u2026 SSH\u306eLocal-Forward\u6a5f\u80fd\u3092\u4f7f\u3048\u3070\u7c21\u5358\u306b\u3067\u304d\u308b\u3002 \u80cc\u666f\u30fb\u554f\u984c\u70b9 \u4f55…<\/p>\n","protected":false},"author":2,"featured_media":1837,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"amp_status":"","spay_email":"","footnotes":""},"categories":[30,7],"tags":[],"jetpack_featured_media_url":"https:\/\/1design.jp\/wp-content\/uploads\/2016\/08\/eyecatch.jpg","jetpack_shortlink":"https:\/\/wp.me\/p6Y4kL-tv","_links":{"self":[{"href":"https:\/\/1design.jp\/wp-json\/wp\/v2\/posts\/1829"}],"collection":[{"href":"https:\/\/1design.jp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/1design.jp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/1design.jp\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/1design.jp\/wp-json\/wp\/v2\/comments?post=1829"}],"version-history":[{"count":8,"href":"https:\/\/1design.jp\/wp-json\/wp\/v2\/posts\/1829\/revisions"}],"predecessor-version":[{"id":1986,"href":"https:\/\/1design.jp\/wp-json\/wp\/v2\/posts\/1829\/revisions\/1986"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/1design.jp\/wp-json\/wp\/v2\/media\/1837"}],"wp:attachment":[{"href":"https:\/\/1design.jp\/wp-json\/wp\/v2\/media?parent=1829"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/1design.jp\/wp-json\/wp\/v2\/categories?post=1829"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/1design.jp\/wp-json\/wp\/v2\/tags?post=1829"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}