error when attempting to connect to MySQL with PHP
Posted on 2007-11-13
I am using Windows Small Business Server 2003 with IIS 6.0. I am attempting to connect to a mysql database using the following code:
$conn = mysqli_connect('192.168.1.x', 'root@localhost', 'password', 'database');
I have also created another user account, and provided all privileges to the account in the MySQL client. I then tried connecting with the new user account with the same error message
Warning: mysqli_connect() [function.mysqli-connect]: (28000/1045): Access denied for user 'root@localhost'@'cogent-s1.CogentMedia.local' (using password: YES) in C:\StuffLocator\email_verification.php on line 20
Access denied for user 'root@localhost'@'cogent-s1.CogentMedia.local' (using password: YES)
I have checked the php.ini to ensure that the extension=php.mysqli.dll is uncommented and that the php.mysql.dll is in the extensions folder.
I appreciate all help that can be provided.