0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

早い!簡単!1分でCloud Runを使ってphpMyAdmin環境構築!【Cloud SQL】

Last updated at Posted at 2023-04-04

TL;DR

gcloud run deploy phpmyadmin \
  --image phpmyadmin \
  --region asia-northeast1 \
  --allow-unauthenticated \
  --port 80 \
  --set-env-vars=PMA_ARBITRARY=1
Cloud SQL Proxyを使用する場合
gcloud run deploy phpmyadmin \
  --image phpmyadmin \
  --region asia-northeast1 \
  --allow-unauthenticated \
  --port 80 \
  --add-cloudsql-instances $DEVSHELL_PROJECT_ID:asia-northeast1:mysql \
  --set-env-vars=PMA_SOCKET=/cloudsql/$DEVSHELL_PROJECT_ID:asia-northeast1:mysql

$DEVSHELL_PROJECT_ID:asia-northeast1:mysqlは適宜変更してね
image.png

コンソールから作成する方法

サービスの作成

image.png

コンテナイメージのURLにphpmyadminと入力

image.png

未認証の呼び出しを許可

image.png

コンテナポートを80にする

image.png

環境変数を設定

IPを直接指定する場合

PMA_ARBITRARY=1

image.png

Cloud SQL Proxyを使用する場合

PMA_SOCKET=/cloudsql/$PROJECT_ID:$REGION:$INSTANCE_NAME

image.png
image.png

アップロードするファイルのサイズの上限も上げられます
image.png

作成

image.png

  • タイムアウトを長めにしておくとphpMyAdminがログアウトしにくくなるかもしれません

参考

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?