php 通过免费主机远程连接mysql
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/10831915/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Connecting mysql remotely via free host
提问by Dev555
I registered on 000webhost and I can connect to mysql db pages that are uploaded there via:
我在 000webhost 上注册,我可以连接到通过以下方式上传的 mysql db 页面:
mysql_connect('localhost', 'user', 'pass') or die('Could not connect to database');
mysql_select_db('name') or die('Could not select database');
But it seems it does not allow connecting remotely.
但它似乎不允许远程连接。
Is there any free host which has mysql db and allows remote connections ?
是否有任何具有 mysql db 并允许远程连接的免费主机?
采纳答案by Abhishek Bhatia
try heliohost.org
I used it sometime back and they got good service as well.The only problem is the registration get filled too quickly
试试heliohost.org
我以前用过,他们的服务也很好。唯一的问题是注册太快了
回答by s4p3r_c1n0s
000webhost does not provide MySQL remote access for free accounts, have a look, so either go for an upgradation
000webhost 不提供免费账户的 MySQL 远程访问,看看,所以要么升级
Or try http://www.freemysql.netfor remote free mysql server, But again its free hence very slow,
或尝试http://www.freemysql.net远程免费 mysql 服务器,但再次免费,因此速度很慢,
mysql_connect('SQL**.FREEMYSQL.NET', 'USER', 'PASS') or die('Could not connect to database');
mysql_select_db('DBNAME') or die('Could not select database');
Do not use "localhost"
不要使用“本地主机”

