mysql - 从 Amazon VPC 连接到 MySQL

标签 mysql amazon-ec2 amazon-vpc

我有两个子网:1 个私有(private)子网,1 个公共(public)子网

公共(public)包含一个 Ubuntu 网络服务器。 私有(private)包含 Redhat enterprise 仅带 MySQL(端口 3306、22 开放)

我能够ssh到Ubuntu,然后从Ubuntu ssh到Redhat。但我无法从 Ubuntu 将 MySQL 迁移到 Redhat。它给了我:

ERROR 2003 (HY000): Can't connect to MySQL server on '10.x.x.x.x' (113)

这个问题是在我创建实例的镜像并在 VPC 中创建它之后开始的。

最佳答案

确保检查 redhat 上的 iptables。当我重新启动 redhat 时,它启动了 iptables 并阻止我访问 mysql。

关于mysql - 从 Amazon VPC 连接到 MySQL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22768785/

相关文章:

amazon-web-services - 如何找出 ECS 运行状况检查失败的原因?

amazon-web-services - AWS VPC 内的 TLS 用例?

mysql - 条件不起作用的 NULL 值

mysql - 更新不等于和 Null

performance - 什么是ECU(AWS)?这意味着什么?

windows - 如何以编程方式/远程执行 EC2 Windows 实例中的程序

amazon-web-services - 跨地域VPC是否可以共享专线服务

php - 从 MySQL 表中获取 PHP 测验结果

mysql - 我如何获得少于给定年份和星期的小时数总和

php - 避免在 CentOS AWS EC2 上显示纯 PHP 代码