2.追加编译php,使其module目录下生产pdo_mysql.so的文件 tar zxf PDO_MYSQL-1.0.2.tgz cd PDO_MYSQL-1.0.2 /usr/local/php/bin/phpize ./configure --with-php-config=/usr/local/tcrm/php/bin/php-config --with-pdo-mysql=/usr/local/mysql make && make install 系统会提示模块生成在/usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/这个目录下 3.修改php.ini这个文件: extension_dir = "/usr/local/tcrm/php/lib/php/extensions/no-debug-non-zts-20060613/" extension=pdo_mysql.so