So, I just got a new computer (excellent), but I cannot connect to MySQL via my PHP pages.
Running Windows XP Pro, I've installed IIS and MySQL 4. I can connect to the database from the Command line, and PHPMyAdmin works fine. But when I try to run this code from PHP:
$link = mysql_connect('localhost', 'gareth', '[password]') or die("Could not connect");
mysql_select_db('test');
I get this result:
Warning: mysql_connect(): Access denied for user: 'gareth@localhost' (Using password: YES) in c:\inetpub\wwwroot\tbrooks\TMP2j9oqxq230.php on line 7
Could not connect
I've checked everything. Running WinMySQLAdmin, I can see that I have the user and password right. Can anyone offer any suggestions?