Pada Thu, 7 Nov 2002 12:10:21 -0500
[EMAIL PROTECTED] menulis:

> Hello all, I'm a newbie to Mysql.  I just installed mysql 3.23.53 on
> Solaris 7.  I am running Apache 2.0.42 and PHP 4.2.3.
> 
> I am trying to connect to my Mysql DB via Apache and PHP, but I get the
> following error:  "Warning: Unknown MySQL Server Host '' (1) in
> helloSql.php on line 3 Warning: MySQL Connection Failed: Unknown MySQL
> Server Host '' (1) in helloSql.php on line 3 Could not connect"
> 
> Here is the code I used.
> 
> <?php
> // Connecting, selecting database
> $link = mysql_connect("<localhost>", "<root>", "<mypassword>")
>     or die("Could not connect");
> print "Connected successfully";

is your mysqld running ?

how to check ? run :
shell# mysql -uroot -p

is this the real code ?
$link = mysql_connect("<localhost>", "<root>", "<mypassword>")

if it is, so you should remove the "<>" sign, and looks like this :
$link = mysql_connect("localhost", "root", "mypassword")


-- 
Dicky Wahyu Purnomo - System Administrator
PT FIRSTWAP: Jl Kapt. Tendean No. 34 - Jakarta Selatan (12790)
Phone: +62 21 79199577 - HP: +62 8158787286
Web: http://www.1rstwap.com


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to