Unknown MySQL server host

01/09/2011 00:57 sakura2010#1
Hello , this days I was making my private server with dydns , all works very well except the website :rtfm:

Quote:
example.dyndns.biz
My config file

PHP Code:
<?php
$ip 
'example.dyndns.biz';
$user 'root';
$pw 'mypassword';

mysql_connect($ip$user$pw) or die('Error.');
?>
all ok , port 3306 opened , when I try to connect I get this error :

Unknown MySQL server host 'example.dyndns.biz'

I am trying to run the website out of my localhost because Idk how to run website from it :D and I preffer a website in a free hosting , the problem is that unknow error :mad:
01/09/2011 01:03 'Haseo#2
i think you must write the port in mysql_connect to but i only think it or go to google and search for mysql connect per php!
01/09/2011 01:10 αίίR7#3
Quote:
Originally Posted by .Best View Post
i think you must write the port in mysql_connect to but i only think it or go to google and search for mysql connect per php!
nn, php knows the standart port for mysql (3306), so its ok without this port.


port 3306 for mysql open in your router config?
01/09/2011 01:51 sakura2010#4
Quote:
Originally Posted by αίίR7 View Post
nn, php knows the standart port for mysql (3306), so its ok without this port.


port 3306 for mysql open in your router config?
Yes :confused:
01/09/2011 11:39 'Haseo#5
can you connect per navicat to the mysql host?
01/09/2011 11:45 coolerj#6
The ip mus be localhost.