Same problem happened to me. I followed Dreamweaver's help file on installing PHP and MySql, and the "Unidentified Error" thingie showed on connection.
I found this solution:
1) When I installed php, I downloaded the "Windows Installer" package. That actually didn't come with support for MySQL (oh, this took some time to figure allright ...)
2) What I needed was the files php_mysql.dll and libmysql.dll.
3) I downloaded the full php package, and copied out the dll files to \winnt\system32.
4) Uncomment the line extension=php_mysql.dll in php.ini.
5) Voilá, the test connection worked.
HTH,
haavarl