How to compile pdo_mysql module with php ?
Hello,
PDO_MYSQL is a driver that implements the PHP Data Objects (PDO) interface to enable access from PHP to MySQL 3.x and 4.x databases.
PDO_MYSQL will take advantage of native prepared statement support present in MySQL 4.1 and higher. If you’re using an older version of the mysql client libraries, PDO will emulate them for you.
Steps to compile compile pdo_mysql module with php
1) Download the PDO package to server
# wget http://pecl.php.net/get/PDO
2) Manually build and install the PDO extension:
# tar xzf PDO-0.2.tgz
# cd PDO-0.2
# phpize
# ./configure
# make
# make install
# echo extension=pdo.so >> /usr/local/php5/lib/php.ini
3) rebuild PHP along with the drivers for PDO_mysql.
CUSTOM_PHP_FLAGS=”–with-pdo-mysql” /scripts/easyapache
4) check php module using php -m command
Enjoys



















Brilliant. Thanks for posting this Alex, it really helped.
I only needed the CUSTOM_PHP_FLAGS line to add the PDO_MySQL module as cPanel with PHP 5.2+ seems to include the PDO package by default but only with the sqlite module.
Cheers.
How do install PDO_MYSQL in windows.
I have the PDO extensions enabled in my php.ini and php on windows path but still its not working. On my phpinfo() the PDO has no value
Thanks Alex,
Great help