Go to the php source code package ext [root @ linuxphp] cdusrlocalsrcphp-521 into the php source code package ext
[Root @ linux php] # cd/usr/local/src/php-5.2.17/ext/pdo_mysql
[Root @ linux pdo_mysql] #/usr/local/php/bin/phpize (the phpize command is used to prepare the compiling environment of the PHP plug-in module)
Processing ING:
PHP Api Version: 20041225
Zend Module Api No: 20060613
Zend Extension Api No: 220060519
[Root @ linux pdo_mysql] #. /configure -- with-php-config =/usr/local/php/bin/php-config -- with-pdo-mysql =/usr/local/mysql (assume that your mysql is installed in/usr/local/mysql)
[Root @ linux pdo_mysql] # make & makeinstall
..........
Build complete.
Don't forget to run 'Make test '.
Installing shared extensions:/usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/
Modify php. ini to add
Extension = "/usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/pdo_mysql.so"
Restart apache apachectl restart
Pdo_mysql is in phpinfo.