This is possibly a silly error, but I am unable to get the php code to connect to my data base, the code is as follows :
$cxn = mysqli_connect( "localhost", "Grayhill", "D0wnend", "GrayhillDataBase" ) or die ("Couldn't connect to server.");
The entry in the config.inc.php file is as follows :
<?php
/*
* Generated configuration file
* Generated by: phpMyAdmin 2.11.9.2 setup script by Michal ÄŒihaÅ™ <michal@cihar.com>
* Version: $Id: setup.php 11423 2008-07-24 17:26:05Z lem9 $
* Date: Tue, 18 Nov 2008 17:55:54 GMT
*/
/* Servers configuration */
$i = 0;
/* Server localhost (config:root) [1] */
$i++;
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
/* Server localhost (config:Grayhill) [2] */
$i++;
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'Grayhill';
$cfg['Servers'][$i]['password'] = 'D0wnend';
/* End of servers configuration */
$cfg['blowfish_secret'] = '4922cc59b16e51.63372312';
?>
And the error is :
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'Grayhill'@'localhost' (using password: YES) in C:\xampp\htdocs\index\Login\LoginScript.php on line 24
Couldn't connect to server.
The application status is as follows :
XAMPP Application Status 1.1.1.0
Apache State 1 Service 1 Start 1 Thread 0 Op 0 Port 60
Mysqu State 1 Service 0 Start 1 Thread 160 Op 0 Port 3306
The Apache / php for all the other pages is running fine, what have I done wrong with the MySQL / Php interface, I havr run out of ideas.