Home > Database > Mysql Tutorial > 使php支持pdo_mysql_MySQL

使php支持pdo_mysql_MySQL

WBOY
Release: 2016-06-01 13:43:41
Original
856 people have browsed it

bitsCN.com 1.下载pdo_mysql包
 
wget http://pecl.php.net/get/PDO_MYSQL-1.0.2.tgz
 
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
 
4.重启apache或nginx(fastcGI)使其重新加载php配置文件。
本文出自 “赵海华_运维之路” 博客 bitsCN.com

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template