MySQL is not enabled by default, so the Php_mysql.dll Dynamic Connection library must be activated in php.ini. In addition, PHP also needs access to the MySQL Client connection library. The Windows release of PHP includes a Libmysql.dll file that must be placed in the Windows system path path in order for PHP to talk to MySQL. How to see "How to add a PHP directory to Windows path" in the FAQ. This is not recommended, although it is possible to copy Libmysql.dll to the Windows system directory (because the system directory is by default in the system path).
To activate any PHP extension library (for example, Php_mysql.dll), the PHP instruction Extension_dir to be set to the directory where the PHP extension library resides. See Manual Windows Installation Guide. An example of a Extension_dir value under PHP 5 is c:/php/ext.
Solution:
Copy a libmysql.dll from the PHP directory and put it under C:/windows/system32.
If we don't want to do this, we can do a little bit of literature.
Under Windows Nt,2000,xp and 2003:
Go to Control Panel and open the System icon (Start-> setup-> Control Panel-> System, Windows xp/2003 is: Start-> Control Panel-> System)
Select the Advanced tab page
Click on the "Environment variables" button
In the System Variables column
Locate the Path (you may need to scroll down to find it)
Double-click the Path of the mouse
In the end add your PHP directory, including the front of the ";" (For example:; c:/php)
Click "OK" and restart the computer
You need to edit the Autoexec.bat file in Windows 98/me:
Open Notepad (start-> run, then enter Notepad and click OK)
Open C:/autoexec.bat File
Find such a line: path=c:/windows; C:/windows/command; And at the end add; c:/php
Save the file and restart the computer
In the latest version of PHP, this file may not be available and needs to be copied from an earlier version of PHP.