pdo mysql扩展_PHP: MySQL (PDO) - Manual

安装

The common Unix distributions include binary versions of PHP that can

be installed. Although these binary versions are typically built with

support for the MySQL extensions, the extension libraries

themselves may need to be installed using an additional package. Check

the package manager than comes with your chosen distribution for

availability.

For example, on Ubuntu the php5-mysql package installs

the ext/mysql, ext/mysqli, and PDO_MYSQL PHP extensions. On CentOS,

the php-mysql package also installs these three

PHP extensions.

Alternatively, you can compile this extension yourself. Building PHP from

source allows you to specify the MySQL extensions you want to use, as well

as your choice of client library for each extension.

When compiling, use --with-pdo-mysql[=DIR] to install

the PDO MySQL extension, where the optional [=DIR]

is the MySQL base library. As of PHP 5.4, mysqlnd

is the default library. For details about choosing a library, see

Choosing a MySQL library.

Optionally, the --with-mysql-sock[=DIR] sets to location

to the MySQL unix socket pointer for all MySQL extensions, including PDO_MYSQL. If

unspecified, the default locations are searched.

Optionally, the --with-zlib-dir[=DIR] is used to set

the path to the libz install prefix.

$ ./configure --with-pdo-mysql --with-mysql-sock=/var/mysql/mysql.sock

SSL support is enabled using the appropriate PDO_MySQL constants,

which is equivalent to calling the » MySQL C API function mysql_ssl_set().

Also, SSL cannot be enabled with PDO::setAttribute because the connection

already exists. See also the MySQL documentation about » connecting to

MySQL with SSL.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值