Copy the libmysql tutorial to windows/system32 and copy libmysql.dll to apache/bin.
Of course, the easiest way is:
In apache:
Loadfile d:/php tutorial/php5.2.13/libmysql.dll
With only the above line, mysql can be successfully used.
My server version: win7
Apache 2.2.13
php 5.2.13
mysql5.1.37
phpmyadmin3.3.2
The following is the partial configuration of my apache.
phpinidir d:/php/php5.2.13 #Not required
Loadfile d:/php/php5.2.13/php5ts.dll
Loadfile d:/php/php5.2.13/libmysql.dll
loadmodule php5_module d:/php/php5.2.13/php5apache2_2.dll
addtype application/x-httpd-php .php