MySQL Forums
Forum List  »  Newbie

could not connect mysql5 from php5
Posted by: zxcse2010
Date: December 30, 2004 01:47AM

Hi,
Developers i am a software analyst from bangladesh,i faced a new problem of connecting.I could not connect mysql 5/mysql 4.01 alpha from php 5 version over apache2 web server on windows 2000 professional sp-4.
I wrote following code for connecting :
code is:
<?php
echo ('<p> This is a test! </p>');

$dbcnx = @mysql_connect('localhost', 'root', 'root');

if (!$dbcnx) {
echo( '<p>Unable to connect to the ' .
'database server at this time.</p>' );
}

// Select the jokes database
if (! @mysql_select_db('test') ) {
die( '<p>Unable to locate the test ' .
'database at this time.</p>' );
}
?>
---------------- i think above code is correct but connection was not established above source.please healp me as soon as possible.

Options: ReplyQuote


Subject
Written By
Posted
November 13, 2004 08:44AM
November 13, 2004 01:38PM
November 15, 2004 08:40AM
December 12, 2004 08:08AM
December 12, 2004 03:58PM
could not connect mysql5 from php5
December 30, 2004 01:47AM
February 04, 2006 06:12AM
April 18, 2007 08:33PM
April 19, 2007 08:47AM
April 19, 2007 11:57AM
July 10, 2007 04:25AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.