PDA

View Full Version : how to connect to my mysql database??


hos
1-23-04, 07:06 AM
I 've been searching for a FAQ or help file which shows me how to connect to my mysql database

my last try is
$conn = mysql_connect("mysql05.powweb.com",$user,$password);

(I saw this server name in my phpmyadmin)


I also tried first
mysql_connect("localhost",$user,$password);


how must I connect ???

further on I think the help files are a bit outdated if the tell you how to install phpmyadmin ?????:p

Glendon
1-23-04, 07:36 AM
This should work. I have no idea how to install php though :(


$username = "yourusername";
$password = "yourpassword";
$server = "mysql.yourhost.com";
$db = mysql_connect($server, $username, $password);

hos
1-23-04, 07:56 AM
no need to install php I think, it's already working. but the connection still isn't working :(

hos
1-23-04, 08:27 AM
ah the connection is working now with you're method :)