I Can't Connect to mysql
This is the code I have in my php file and the output I get:
<?php
$link = mysqli_connect('localhost', 'root', 'password', 'world');
/* check connection */
if (mysqli_connect_errno()) {
printf("Connect failed: %s\n", mysqli_connect_error());
exit();
}
if (!mysqli_query($link, "SET a=1")) {
printf("Errormessage: %s\n", mysqli_error($link));
}
/* close connection */
mysqli_close($link);
?>
The error I get is :
Connect failed: Unknown database 'world'
Please help me someone out there. Thanks a lot
Subject
Written By
Posted
I Can't Connect to mysql
August 25, 2005 08:16PM
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.