安装pdo_mysql的方式历程纪录_华为手机相册数据恢

日期:2014-09-04 / 人气: / 来源:网络

根据开发需要现要安装pdo_mysql,相应版本去http://pecl.php.net/package/pdo_mysql 查看;
安装如下:

一、下载相应tgz包;
wget http://pecl.php.net/get/pdo_mysql-1.0.2.tgz

二、安装开始;
[[email protected] software]# tar zxvf pdo_mysql-1.0.2.tgz
package2.xml
pdo_mysql-1.0.2/config.m4
pdo_mysql-1.0.2/CREDITS
pdo_mysql-1.0.2/mysql_driver.c
pdo_mysql-1.0.2/mysql_statement.c
pdo_mysql-1.0.2/pdo_mysql.c
pdo_mysql-1.0.2/php_pdo_mysql.h
pdo_mysql-1.0.2/php_pdo_mysql_int.h
pdo_mysql-1.0.2/php_pdo_mysql_sqlstate.h
package.xml
[[email protected] software]# cd pdo_mysql-1.0.2
[[email protected] pdo_mysql-1.0.2]# ls
config.m4 CREDITS mysql_driver.c mysql_statement.c pdo_mysql.c php_pdo_mysql.h php_pdo_mysql_int.h php_pdo_mysql_sqlstate.h
[[email protected] pdo_mysql-1.0.2]# /usr/local/php/bin/phpize
Configuring for:
PHP Api Version:         20041225
Zend Module Api No:      20060613
Zend Extension Api No:   220060519

1、[[email protected] pdo_mysql-1.0.2]#./configure
执行时报错如下;
configure: warning: You will need re2c 0.12.0 or later if you want to regenerate PHP parsers.
checking for gawk... gawk
checking for MySQL support for PDO... yes, shared
checking for mysql_config... not found
configure: error: Cannot find MySQL header files under
解决办法:
cp /usr/local/mysql/bin/mysql_config /usr/bin

2、[[email protected] pdo_mysql-1.0.2]#make
执行时报错如下:
/software/pdo_mysql-1.0.2/php_pdo_mysql_int.h:25:19: error: mysql.h: No such file or directory
In file included from /software/pdo_mysql-1.0.2/pdo_mysql.c:31:
/software/pdo_mysql-1.0.2/php_pdo_mysql_int.h:36: error: expected specifier-qualifier-list before 'MYSQL'
/software/pdo_mysql-1.0.2/php_pdo_mysql_int.h:48: error: expected specifier-qualifier-list before 'MYSQL_FIELD'
/software/pdo_mysql-1.0.2/php_pdo_mysql_int.h:53: error: expected specifier-qualifier-list before 'MYSQL_RES'
make: *** [pdo_mysql.lo] Error 1
解决办法:
yum install mysql-devel
[[email protected] pdo_mysql-1.0.2]# make install

三、修改php.ini;
extension_dir = "/usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/"
extension = "pdo_mysql.so"
OK,到此安装完成,可以查看phpinfo.php里找到对应的pdo_mysql。

分享心得之mssql和MySQL有哪些区别

最近在做mssql转换成mysql的工作,1 mysql支持enum,和set类型,sql server不支持2 mysql不支持nchar,nvarchar,ntext类型3 mysql的递增语句是AUTO_INCREMENT,而mssql是identity(1,1)。

MySQL教程,mssql

作者:管理员




现在致电4006-2991-90 OR 查看更多联系方式 →

Go To Top 回顶部