Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Connecting mysql remotely via free host

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 ?

like image 212
Dev555 Avatar asked May 31 '12 10:05

Dev555


People also ask

Does MySQL allow remote connections?

Set up Firewall to Allow Remote MySQL ConnectionYour MySQL database should now allow remote connections from devices using your IP address. This value can be set in your MySQL configuration file or from all devices if this value is 0.0. 0.0. Your device firewall or network firewall will still block connections.


2 Answers

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"

like image 145
s4p3r_c1n0s Avatar answered Oct 07 '22 04:10

s4p3r_c1n0s


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

like image 33
Abhishek Bhatia Avatar answered Oct 07 '22 02:10

Abhishek Bhatia