Connecting mysql remotely via free host

喜欢而已 提交于 2019-11-30 23:20:16

问题


I registered on 000webhost and I can connect to mysql db pages that are uploaded there via:

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 ?


回答1:


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




回答2:


000webhost does not provide MySQL remote access for free accounts, have a look, so either go for an upgradation

Or try http://www.freemysql.net for remote free mysql server, But again its free hence very slow,

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"



来源:https://stackoverflow.com/questions/10831915/connecting-mysql-remotely-via-free-host

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!