I have exactly the same problem, running Apache, PHP 5, MySQL 5 and PHP just seems not to note that MySQL exists in the machine.
MySQL is working, in the PATH and ok, the same with Apache. I found that MySQL is NOT enabled by default in PHP 5 like it was in PHP 4, but I haven't found the settings that I have have to set in the PHP.INI file in order to tell PHP about MySQL.
I have been trying uncommenting some lines but it just don't work. Does anybody knows where to find exactly what the settings has to be enabled in the PHP.INI to make this work?
Oh, and I copied the DLL's from the ext folder to the c:\php\ folder too instead of changing the setting in the php.ini file.
Everything is working fine but no MySQL access for PHP in my webpages.