Jump to content

PHP connect to my external mysql


Recommended Posts

Posted

Hi, Im trying to connect with my mysql server on my pc

wowla.servegame.com with port 3306

When I connect from other pc with sqlyog I can, but when I try to connect from the host I can not :S

 

Im using this

 

$dbhost = 'wowla.servegame.com:3306';

$dbuser = 'myuser';

$dbpass = 'mypass';

 

mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql');

 

I tried too

 

$dbhost = 'wowla.servegame.com';

$dbuser = 'myuser';

$dbpass = 'mypass';

 

mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql');

 

But nothing, always it say

 

Warning: mysql_connect() [function.mysql-connect]: Can't connect to MySQL server on 'wowla.servegame.com' (4) in /home/wowla/public_html/index.php on line 6

Error connecting to mysql

 

I think Im doing something wrong

 

Anyone can help me please? I dont know what to do :S

Posted

Then you need to consult the person hosting your MySQL server to add HelioHost to their access list.

Posted

I have the mysql with remote acceses enable because I cna enter with the same code (php) in other hosts but here it say

 

Warning: mysql_connect() [function.mysql-connect]: Can't connect to MySQL server on 'wowla.servegame.com' (4) in /home/wowla/public_html/test.php on line 6

 

Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /home/wowla/public_html/test.php on line 7

 

 

The host block this connecition?

Posted

Yes, the MySQL host is blocking your connection. You need to talk to them and have them remove their firewall or add an exception.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...