Page 1 of 1

warning in connection..help..

Posted: Wed Jul 08, 2009 9:54 am
by finch_emo44
i got this warning message:

Warning: mysql_connect() [function.mysql-connect]: Unknown MySQL server host '�localhost�' (11004) in C:\[loc]\default.php on line 16

code here:

<?php

$user=”root”;
$host='http://localhost';
$password=””;

$connection = mysql_connect($host,$user,$password); //line 16

?>

what's the problem here?

Re: warning in connection..help..

Posted: Wed Jul 08, 2009 9:56 am
by superdezign
Is MySQL running?
Normally, that error means that MySQL isn't running on the server. You need to turn it on in order to use it locally.

Re: warning in connection..help..

Posted: Wed Jul 08, 2009 10:00 am
by finch_emo44
yup, i'm using mysql 5..

I also tried this: http://www.phplivesupport.com/documenta ... d=35&pid=1

mine said that it is succesful..

any suggestion?

Re: warning in connection..help..

Posted: Wed Jul 08, 2009 10:05 am
by SvanteH

Code: Select all

$host='http://localhost';
->

Code: Select all

$host='localhost';