Jump to content

PHP connect to my external mysql


Gotik2

Recommended Posts

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

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...