久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

  • <tfoot id='k7OwV'></tfoot>
    <legend id='k7OwV'><style id='k7OwV'><dir id='k7OwV'><q id='k7OwV'></q></dir></style></legend>

  • <i id='k7OwV'><tr id='k7OwV'><dt id='k7OwV'><q id='k7OwV'><span id='k7OwV'><b id='k7OwV'><form id='k7OwV'><ins id='k7OwV'></ins><ul id='k7OwV'></ul><sub id='k7OwV'></sub></form><legend id='k7OwV'></legend><bdo id='k7OwV'><pre id='k7OwV'><center id='k7OwV'></center></pre></bdo></b><th id='k7OwV'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='k7OwV'><tfoot id='k7OwV'></tfoot><dl id='k7OwV'><fieldset id='k7OwV'></fieldset></dl></div>

        • <bdo id='k7OwV'></bdo><ul id='k7OwV'></ul>
      1. <small id='k7OwV'></small><noframes id='k7OwV'>

        Laravel Docker 容器無(wú)法連接到遠(yuǎn)程 AWS RDS 數(shù)據(jù)庫(kù)

        Laravel Docker Container Cannot connect to remote AWS RDS Database(Laravel Docker 容器無(wú)法連接到遠(yuǎn)程 AWS RDS 數(shù)據(jù)庫(kù))
        <legend id='mZYpT'><style id='mZYpT'><dir id='mZYpT'><q id='mZYpT'></q></dir></style></legend>

      2. <tfoot id='mZYpT'></tfoot>
        <i id='mZYpT'><tr id='mZYpT'><dt id='mZYpT'><q id='mZYpT'><span id='mZYpT'><b id='mZYpT'><form id='mZYpT'><ins id='mZYpT'></ins><ul id='mZYpT'></ul><sub id='mZYpT'></sub></form><legend id='mZYpT'></legend><bdo id='mZYpT'><pre id='mZYpT'><center id='mZYpT'></center></pre></bdo></b><th id='mZYpT'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='mZYpT'><tfoot id='mZYpT'></tfoot><dl id='mZYpT'><fieldset id='mZYpT'></fieldset></dl></div>
          • <bdo id='mZYpT'></bdo><ul id='mZYpT'></ul>

                <tbody id='mZYpT'></tbody>

                <small id='mZYpT'></small><noframes id='mZYpT'>

                  本文介紹了Laravel Docker 容器無(wú)法連接到遠(yuǎn)程 AWS RDS 數(shù)據(jù)庫(kù)的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!

                  問(wèn)題描述

                  限時(shí)送ChatGPT賬號(hào)..

                  我正在使用一個(gè)容器化的 Laravel 應(yīng)用程序,它應(yīng)該連接到遠(yuǎn)程 rds 數(shù)據(jù)庫(kù),這里是一個(gè)示例 .env

                  I'm working with a containerized Laravel app that is supposed to be connecting to a remote rds database, here is a sample .env

                  DB_HOST=xxxxxx.rds.amazonaws.com
                  DB_DATABASE=sample
                  DB_USERNAME=sample
                  DB_PASSWORD=sample
                  DB_PORT=3306
                  DATABASE_DRIVER=mysql
                  

                  容器正常工作,但問(wèn)題是,當(dāng)我嘗試運(yùn)行 composer ie 時(shí),它??無(wú)法連接到遠(yuǎn)程 rds 數(shù)據(jù)庫(kù):

                  The container works as it should but the problem is, it cannot connect to the remote rds database, when I try running composer ie:

                  $ docker exec -ti laravel-php bash
                  $ composer install
                  

                  我收到此錯(cuò)誤:

                  [PDOException]
                  SQLSTATE[HY000] [1045] Access denied for user 'sample'@'192.168.66.1' (using password: YES)  
                                                                                                                          
                  
                  Script php artisan clear-compiled handling the post-install-cmd event returned with error code 1
                  

                  192.168.66.1 作為我的 docker 容器的 ip,我懷疑數(shù)據(jù)庫(kù)策略是通過(guò) @localhost 訪問(wèn)打開的,因?yàn)槲业拈_發(fā)人員確認(rèn)它對(duì)公共連接開放.

                  192.168.66.1 as my docker container's ip, I suspect that the db policy is open via @localhost access since my dev ops confirmed that it's open for public connections.

                  順便說(shuō)一句,我正在使用 docker-compose 版本 2,這是一個(gè)示例 docker-compose:

                  I'm using docker-compose version 2 btw, here's a sample docker-compose:

                  version: '2'
                  services:
                  
                      sample-server:
                          build:
                              context: ./
                              dockerfile: sample.server.docker
                          volumes:
                              - ../backend:/var/www
                          ports:
                              - "8081:80"
                          environment:
                              - VIRTUAL_HOST=sample.local
                          links:
                              - sample-php
                          depends_on:
                              - sample-php
                      sample-php:
                          build:
                              context: ./
                              dockerfile: sample.php.docker
                          volumes:
                              - .:/var/www
                          links:
                              - sample-database
                          environment:
                              - "DB_PORT=3306"
                              - "DB_HOST=sample-database"
                      sample-database:
                          image: mysql:5.7
                          environment:
                              - "MYSQL_ROOT_PASSWORD=samplepassword"
                              - "MYSQL_DATABASE=sample"
                          ports:
                              - "33081:3306"
                      sample-nginx-proxy:
                          image: jwilder/nginx-proxy
                          ports:
                              - "80:80"
                          volumes:
                              - /var/run/docker.sock:/tmp/docker.sock:ro
                  networks:
                      default:
                          external:
                              name: sample-nginx-proxy
                  

                  我該如何解決這個(gè)問(wèn)題?

                  How can I fix this?

                  推薦答案

                  檢查以下內(nèi)容:

                  數(shù)據(jù)庫(kù)可公開訪問(wèn):在數(shù)據(jù)庫(kù)所在的 VPC 外部進(jìn)行連接,更具體地說(shuō)是通過(guò) Internet 訪問(wèn),需要將數(shù)據(jù)庫(kù)配置為公共可訪問(wèn)性.你說(shuō)的已經(jīng)完成了.由于您有內(nèi)部 IP,而數(shù)據(jù)庫(kù)沒有公共 IP,因此這不是真正必需的.

                  Database is publicly accessible: Connecting outside the VPC that the database resides, more specifically accessed over the internet, requires that the database is configured for Public Accessibility. Which you said is already done. As you have an internal IP, and the database does not have a public IP, this is not really required.

                  基本配置:檢查數(shù)據(jù)庫(kù)名稱和端口是否設(shè)置正確,我相信你已經(jīng)完成了.

                  Basic Configuration: Check that the database name, and port is set correctly, which I am sure you have done.

                  安全組入站規(guī)則:這很可能是這種情況,數(shù)據(jù)庫(kù)將有一個(gè)或多個(gè) 安全組.確保安全組配置為允許從您的案例中的客戶端進(jìn)行入站訪問(wèn):192.168.66.1

                  Security Group Inbound Rules: This is most likely the case, the database will have one or more security groups. Ensure that the security group is configured to allow inbound access from the client in your case: 192.168.66.1

                  確認(rèn)客戶端的IP地址:192.168.66.1 是容器的奇怪 IP,VPC 子網(wǎng)的前 4 個(gè) IP 地址是 保留.

                  Confirm the IP address of the client: 192.168.66.1 is a strange IP for the container, the first 4 IP Addresses of a VPC Subnet are reserved.

                  確認(rèn)網(wǎng)絡(luò)路由:確認(rèn)包含客戶端的 VPC 可以連接到數(shù)據(jù)庫(kù).當(dāng)客戶端在 docker 容器中運(yùn)行時(shí),請(qǐng)確保容器可以訪問(wèn)數(shù)據(jù)庫(kù).簡(jiǎn)單的方法是在數(shù)據(jù)庫(kù)子網(wǎng)中的 EC2 實(shí)例上啟用 ICMP 數(shù)據(jù)包,并檢查您是否可以 Ping 或使用 VPC 路由 分析器.

                  Confirm the network routing: Confirm that the VPC that contains the client can connect to the database. As the client is running within a docker container ensure that the container can access the database. Easy way to do this is enable ICMP packets on an EC2 instance in the database subnet, and check you can Ping it or use the VPC route analyser.

                  檢查數(shù)據(jù)庫(kù)用戶權(quán)限:數(shù)據(jù)庫(kù)用戶可以連接任何地址而不是 localhost.

                  Check the database user rights: Can the database user connect for any address not localhost.

                  VPC 的安全性:檢查兩個(gè)子網(wǎng)的 ACL入站和出站

                  Security on the VPC: Check the ACLs of the subnets for both inbound and outbound

                  更新:這是來(lái)自 AWS 的鏈接:故障排除用于亞馬遜 RDS.

                  UPDATE: Here is a link from AWS: Troubleshooting for Amazon RDS.

                  這篇關(guān)于Laravel Docker 容器無(wú)法連接到遠(yuǎn)程 AWS RDS 數(shù)據(jù)庫(kù)的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                  【網(wǎng)站聲明】本站部分內(nèi)容來(lái)源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問(wèn)題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!

                  相關(guān)文檔推薦

                  SQL query to get all products, categories and meta data woocommerce/wordpress(獲取所有產(chǎn)品、類別和元數(shù)據(jù)的 SQL 查詢 woocommerce/wordpress)
                  How to use MySQL in WSL (Windows Subsystem for Linux)?(如何在 WSL(Linux 的 Windows 子系統(tǒng))中使用 MySQL?)
                  PowerShell MySQL Backup Script Error in Task Scheduler 0x00041301(任務(wù)計(jì)劃程序中的 PowerShell MySQL 備份腳本錯(cuò)誤 0x00041301)
                  Import the data from the XML files into a MySQL database(將數(shù)據(jù)從 XML 文件導(dǎo)入 MySQL 數(shù)據(jù)庫(kù))
                  installed Xampp on Windows 7 32-bit. Errors when starting(在 Windows 7 32 位上安裝 Xampp.啟動(dòng)時(shí)的錯(cuò)誤)
                  Mysql lower case table on Windows xampp(Windows xampp 上的 Mysql 小寫表)
                    <tbody id='wbCZk'></tbody>

                  <small id='wbCZk'></small><noframes id='wbCZk'>

                1. <i id='wbCZk'><tr id='wbCZk'><dt id='wbCZk'><q id='wbCZk'><span id='wbCZk'><b id='wbCZk'><form id='wbCZk'><ins id='wbCZk'></ins><ul id='wbCZk'></ul><sub id='wbCZk'></sub></form><legend id='wbCZk'></legend><bdo id='wbCZk'><pre id='wbCZk'><center id='wbCZk'></center></pre></bdo></b><th id='wbCZk'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='wbCZk'><tfoot id='wbCZk'></tfoot><dl id='wbCZk'><fieldset id='wbCZk'></fieldset></dl></div>
                  <tfoot id='wbCZk'></tfoot>
                  <legend id='wbCZk'><style id='wbCZk'><dir id='wbCZk'><q id='wbCZk'></q></dir></style></legend>
                    <bdo id='wbCZk'></bdo><ul id='wbCZk'></ul>
                            主站蜘蛛池模板: 国产欧美日韩一区 | 福利片在线观看 | 日日干天天干 | 久久33 | 国产精品揄拍一区二区 | 国产一区免费 | 精品欧美一区二区在线观看视频 | 国产在线播 | 在线国产一区二区 | 国产精品免费看 | 国产香蕉视频 | 国产精品成人国产乱 | 久久久久国产 | 五月精品视频 | 国产精品成人一区二区 | 日韩人体视频 | 国产午夜精品视频 | 欧美精品一区二区三区一线天视频 | 综合久久99 | 一级欧美| 中文字幕在线人 | 国产日韩一区二区三区 | 精品视频一区在线 | 天天操天天干天天透 | 国产一区二区在线播放 | 国产精品极品美女在线观看免费 | 国产婷婷精品av在线 | av黄色片 | 99久久精品国产麻豆演员表 | 国产成人艳妇aa视频在线 | 99视频在线免费观看 | 欧美综合一区 | 天天干干| 中文字幕 在线观看 | 很黄很污的网站 | 日韩一区二区在线观看视频 | 蜜桃视频在线观看免费视频网站www | 日本精品一区二区三区在线观看视频 | 久久偷人 | 免费高清av| 亚洲一区二区视频 |