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?

MySQLにログインできなかった

0
Posted at

はじめに

AWSにデプロイする際にMySQLにログインできなかったので、解決した方法についてまとめます。

状況と原因

状況としては、RDSを作成して、WebサーバーからRDSに接続しようとしたら接続できなかった。
原因はセキュリティグループのインバウンドの設定をしていなかったからです。

セキュリティグループの設定

インバウンドルールにこの次のように設定することでWebサーバーからのみMySQLにアクセスすることができます。
スクリーンショット 2025-11-27 17.38.34.png

インバウンドルール

インバウンドルールは外部から内部へのアクセスを制御するルールです。
今回の設定ではWebサーバーからMySQLへのアクセスを許可しています。

まとめ

インバウンドルールを設定することでWebサーバーからMySQLへアクセスすることができました。

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?