totobeloeil
04-06-2006, 09:21 AM
Hello,
I can't connect to mySQL because something don't work :
I've got the 'echo' I put just before CONNECT.PHP calls mysql_connect, but I the 'echo' that is just after the call doesn't appear :
if (!defined('PHPDIG_DB_NAME')) {
define('PHPDIG_DB_PREFIX','');
define('PHPDIG_DB_HOST','localhost');
define('PHPDIG_DB_USER','root');
define('PHPDIG_DB_PASS','admin');
define('PHPDIG_DB_NAME','phpdig');
}
echo 'connect.php - avant appel de @mysql_connect<br>';
$id_connect = @mysql_connect(PHPDIG_DB_HOST,PHPDIG_DB_USER,PHPDIG_DB_PASS);
if (!$id_connect) {
echo ('out 1 connect.php<br>');
die("connect.php - Unable to connect to database : Check the connection script.\n");
}
echo 'connect.php - apres appel de @mysql_connect<br>';
The phpdig database and tables have been created in command-line mode, so mySQL is working.
What's wrong ?
I can't connect to mySQL because something don't work :
I've got the 'echo' I put just before CONNECT.PHP calls mysql_connect, but I the 'echo' that is just after the call doesn't appear :
if (!defined('PHPDIG_DB_NAME')) {
define('PHPDIG_DB_PREFIX','');
define('PHPDIG_DB_HOST','localhost');
define('PHPDIG_DB_USER','root');
define('PHPDIG_DB_PASS','admin');
define('PHPDIG_DB_NAME','phpdig');
}
echo 'connect.php - avant appel de @mysql_connect<br>';
$id_connect = @mysql_connect(PHPDIG_DB_HOST,PHPDIG_DB_USER,PHPDIG_DB_PASS);
if (!$id_connect) {
echo ('out 1 connect.php<br>');
die("connect.php - Unable to connect to database : Check the connection script.\n");
}
echo 'connect.php - apres appel de @mysql_connect<br>';
The phpdig database and tables have been created in command-line mode, so mySQL is working.
What's wrong ?