List:MySQL on Win32« Previous MessageNext Message »
From:dpgirago Date:February 14 2007 2:29pm
Subject:Re: Can't get a MySQL connection either
View as plain text  
| This is posted by another user and I am also trying for answers at the
|MySql-PHP list:
| 
| When entering the following, I do not get a response in any fashion from 
the
| developmental server on my system, just a blank page. Any ideas how I 
can
| complete the connection?
|
| <!doctype html public "-//W3C//DTD HTML 4.0 //EN"> <html> <head>
| <title>MySql</title>
| </head>
| <body>
| <?php
| $dbServer='localhost';
| $dbUser='root';
| $dbPass='';
| $dbName='test';
| $link = mysql_connect("$dbServer", "$dbUser", "$dbPass") or die("Could 
not
| connect");
| print "Connected Successfully<br>";
| mysql_select_db("$dbName") or die("Could not select database");
| print "Database selected successfully<br>";
| mysql_close($link);
| ?>
| </body>
| </html>
|
| Vince Bravdica

Vince,

Maybe add mysql_error() inside your die statment after trying to connect:
$link = mysql_connect("$dbServer", "$dbUser", "$dbPass") or die("Could not
connect" . mysql_error());
Thread
Can't get a MySQL connection eitherVince Bravdica14 Feb
Re: Can't get a MySQL connection eitherdpgirago14 Feb
Re: Can't get a MySQL connection eitherMichael Louie Loria15 Feb