![](/img/trans.png)
[英]Unable to connect to postgres in cloud sql from google app engine nodes
[英]Connect local postgres database to Google Cloud
我對雲服務非常陌生(而且,后端不是我的專業領域),我正在嘗試將我的本地數據庫部署到谷歌雲,以便我可以在投資組合中展示我的應用程序。
谷歌雲 shell 要求我使用我的 postgres 用戶和密碼登錄,我認為我做對了,因為它在控制台中顯示了以下內容,但對我的本地數據庫一無所知
You are now connected to database "postgres" as user "postgres".
postgres-> [\l
List of databases
Name | Owner | Encoding | Collate | Ctype | Access privileges
---------------+-------------------+----------+------------+------------+-----------------------------------------
cloudsqladmin | cloudsqladmin | UTF8 | en_US.UTF8 | en_US.UTF8 |
postgres | cloudsqlsuperuser | UTF8 | en_US.UTF8 | en_US.UTF8 |
template0 | cloudsqladmin | UTF8 | en_US.UTF8 | en_US.UTF8 | =c/cloudsqladmin +
| | | | | cloudsqladmin=CTc/cloudsqladmin
template1 | cloudsqlsuperuser | UTF8 | en_US.UTF8 | en_US.UTF8 | =c/cloudsqlsuperuser +
| | | | | cloudsqlsuperuser=CTc/cloudsqlsuperuser
(4 rows)
postgres->
另外,如果有人有更好/更簡單的選擇來上傳數據庫,我願意接受其他選項(除非說選項是 heroku,因為我無法使其工作)
您必須將本地 PostgreSQL 遷移到 GCP。
本文檔將有助於https://cloud.google.com/solutions/migrating-postgresql-to-gcp
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.