[请益] EC2 mySQL连线问题

楼主: Rivety (no)   2015-06-01 00:46:28
想从外面连进amazon web service ec2 下架的ubuntu mysql数据库
测试使用的php内容如下
<?php
header("Content-Type: text/html; charset=utf-8");
$db_link = mysqli_connect("http://我的EC2-IP", "USERNAME", "PASSWORD");
if (!$db_link) {
echo "资料连结失败";
}else{
echo "资料连结成功";
}
?>
努力google已经去把EC2 /etc/mysql/my.cnf 的bind-address 改成 0.0.0.0
还是连结失败啊...? 烦请指点迷津
作者: dlikeayu (太阳拳vs野球拳)   2015-06-01 00:49:00
security groups 有开?ec2 ip也不是那样打,你的instance有开public ip吗?
楼主: Rivety (no)   2015-06-01 01:34:00
SECURITY GROUP设定 http://imgur.com/nJVJEVa有elastic ip连结instance, 成功了, 阿好蠢啊....谢谢d大..

Links booklink

Contact Us: admin [ a t ] ucptt.com