锟斤拷装

Warning

锟斤拷锟斤拷展锟斤拷 PHP 5.5.0 锟斤拷锟窖凤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷 PHP 7.0.0 锟斤拷始锟斤拷锟狡筹拷锟斤拷应使锟斤拷 MySQLi 锟斤拷 PDO_MySQL 锟斤拷展锟斤拷锟芥换之锟斤拷锟轿硷拷 MySQL锟斤拷选锟斤拷 API 指锟斤拷锟皆硷拷锟斤拷锟� FAQ 锟斤拷锟斤拷取锟斤拷锟斤拷锟斤拷息锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷校锟�

锟斤拷锟斤拷时锟斤拷只要使锟斤拷 --with-mysql[=DIR] 锟斤拷锟斤拷选锟筋即锟缴o拷锟斤拷锟叫匡拷选锟斤拷 [DIR] 指锟斤拷 MySQL 锟侥帮拷装目录锟斤拷

锟斤拷然锟斤拷 MySQL 锟斤拷展锟斤拷锟斤拷锟� MySQL 4.1.0 锟斤拷锟斤拷锟皆猴拷姹撅拷锟斤拷锟斤拷锟斤拷锟斤拷锟街э拷锟斤拷锟叫╋拷姹撅拷峁╋拷亩锟斤拷夤︼拷堋锟揭癸拷锟斤拷锟叫╋拷锟斤拷埽锟斤拷锟绞癸拷锟� MySQLi 锟斤拷展锟解。

锟斤拷锟揭憋拷锟阶� mysql 锟斤拷展锟斤拷锟� mysqli 锟斤拷展锟解,锟斤拷锟斤拷使锟斤拷同一锟斤拷锟酵伙拷锟剿匡拷锟皆憋拷锟斤拷锟轿何筹拷突锟斤拷

锟斤拷 Linux 系统锟铰帮拷装

Note: [DIR] is the path to the MySQL client library files (headers and libraries), which can be downloaded from » MySQL.

ext/mysql compile time support matrix
PHP 锟芥本 默锟斤拷 锟斤拷锟斤拷选锟斤拷: mysqlnd 锟斤拷锟斤拷选锟斤拷: libmysql 锟斤拷锟斤拷锟斤拷志
4.x.x libmysql 锟斤拷锟斤拷锟斤拷 --without-mysql to disable MySQL enabled by default, MySQL client libraries are bundled
5.0.x, 5.1.x, 5.2.x libmysql 锟斤拷锟斤拷锟斤拷 --with-mysql=[DIR] MySQL is no longer enabled by default, and the MySQL client libraries are no longer bundled
5.3.x libmysql --with-mysql=mysqlnd --with-mysql=[DIR] mysqlnd is now available
5.4.x mysqlnd --with-mysql --with-mysql=[DIR] mysqlnd is now the default

锟斤拷 Windows 系统锟铰帮拷装

PHP 4

PHP MySQL 锟斤拷展锟窖撅拷锟斤拷锟斤拷锟斤拷 PHP锟斤拷

PHP 5+

MySQL 默锟斤拷未锟斤拷锟矫o拷锟斤拷吮锟斤拷锟斤拷锟� php.ini 锟叫硷拷锟斤拷 php_mysql.dll 锟斤拷态锟斤拷锟接库。锟斤拷锟解,PHP 锟斤拷锟斤拷要锟斤拷锟斤拷 MySQL 锟酵伙拷锟斤拷锟斤拷锟接库。PHP 锟斤拷 Windows 锟斤拷锟叫帮拷锟斤拷锟斤拷锟揭伙拷锟� libmysql.dll锟斤拷为锟斤拷锟斤拷 PHP 锟杰猴拷 MySQL 锟皆伙拷锟斤拷锟斤拷锟侥硷拷锟斤拷锟斤拷锟斤拷锟� Windows 锟斤拷系统路锟斤拷 PATH 锟叫★拷锟斤拷锟斤拷锟斤拷锟斤拷 FAQ 锟叫碉拷"锟斤拷锟斤拷锟斤拷 PHP 目录锟斤拷锟诫到 Windows PATH锟斤拷"锟斤拷锟斤拷锟杰斤拷 libmysql.dll 锟斤拷锟斤拷锟斤拷 Windows 系统目录锟斤拷也锟斤拷锟皆o拷锟斤拷为系统目录默锟斤拷锟斤拷系统路锟斤拷 PATH 锟叫o拷锟斤拷锟斤拷锟斤拷锟狡硷拷锟斤拷锟斤拷锟斤拷锟斤拷

要锟斤拷锟斤拷锟轿猴拷 PHP 锟斤拷展锟解(锟斤拷锟斤拷 php_mysql.dll锟斤拷锟斤拷PHP 指锟斤拷 extension_dir 要锟斤拷锟斤拷为 PHP 锟斤拷展锟斤拷锟斤拷锟节碉拷目录锟斤拷锟轿硷拷锟街癸拷 Windows 锟斤拷装指锟斤拷锟斤拷PHP 5 锟斤拷 extension_dir 取值锟斤拷一锟斤拷锟斤拷锟斤拷锟斤拷 c:\php\ext锟斤拷

Note:

锟斤拷锟斤拷锟斤拷锟� web 锟斤拷锟斤拷锟斤拷时锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟铰的达拷锟斤拷"Unable to load dynamic library './php_mysql.dll'"锟斤拷锟斤拷锟斤拷锟斤拷为系统锟揭诧拷锟斤拷 php_mysql.dll 锟酵o拷锟斤拷 libmysql.dll锟斤拷

PHP 5.3.0+

The MySQL Native Driver is enabled by default. Include php_mysql.dll, but libmysql.dll is no longer required or used.

MySQL 锟斤拷装注锟斤拷锟斤拷锟斤拷

Warning

锟斤拷同时锟斤拷锟节憋拷锟斤拷展锟斤拷锟� recode 锟斤拷展锟斤拷时 PHP 锟斤拷锟杰伙拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟较拷锟� recode 锟斤拷展锟解。

Note:

锟斤拷锟斤拷锟揭拷锟酵拷锟� latin锟斤拷默锟斤拷值锟斤拷锟斤拷锟街凤拷锟斤拷锟斤拷锟斤拷锟诫安装锟解部锟侥o拷锟角绑定的o拷锟窖憋拷锟斤拷锟斤拷锟斤拷锟斤拷锟街凤拷锟斤拷支锟街碉拷 libmysql锟斤拷