【问题标题】:Not able to connect to AWS RDS from Wordpress无法从 Wordpress 连接到 AWS RDS
【发布时间】:2019-11-10 01:24:15
【问题描述】:

我的 EC2 实例有一个安全组(我们称之为 AccessFromEverywhere,它基本上允许来自所有 IP 的入站 HTTP、HTTPS 和 SSH 流量。然后我为 AWS RDS 创建了另一个安全组,该安全组具有可从AccessFromEverywhere 访问的端口 3306 . 我们称这个安全组为AWS-RDS

然后我设置了一个 RDS MySQL 实例并允许它从AWS-RDS 访问。当我尝试在此 EC2 实例上安装 Wordpress 的新副本时,我收到以下错误:

Can’t select database
We were able to connect to the database server (which means your username and password is okay) but not able to select the [db name] database.

Are you sure it exists?
Does the user root have permission to use the syndb database?
On some systems the name of your database is prefixed with your username, so it would be like username_[db name]. Could that be the problem?
If you don’t know how to set up a database you should contact your host. If all else fails you may find help at the WordPress Support Forums.

我在这里错过了什么?

【问题讨论】:

  • 允许它从 AWS-RDS 访问,这是什么意思?这是否意味着您为 RDS 选择了一个安全组 AWS-RDS?
  • 是的。这意味着在我可以声明 IP 的字段中,我添加了 AWS-RDS,因为该字段也接受安全组值。

标签: wordpress amazon-ec2 amazon-rds


【解决方案1】:

解决了!我需要在 RDS 配置中添加一个数据库名称。此初始设置不会自动填充该字段。初始配置创建一个数据库实例,但不是一个实际的数据库。

【讨论】:

    猜你喜欢
    • 2017-09-13
    • 2021-06-10
    • 2018-05-13
    • 1970-01-01
    • 2016-04-15
    • 2019-09-01
    • 2020-10-19
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多