To use in PHP
mysql_connect()
function, you need to turn on
php_mysql
Library
However, when compiling PHP, the following parameters are very puzzled:
- --with-mysql=mysql Client Connection Library
- --with-mysqli=mysql Client Connection Library
- --with-pdo-mysql=mysql Client Connection Library
"--with-mysql=mysql Client Connection Library" Why do you write this, the Php_mysql library, the php_mysqli
library is provided by PHP, or is generated by the MySQL Client connection library?
Reply content:
To use a function in PHP mysql_connect()
, you need to open php_mysql
the library,
However, when compiling PHP, the following parameters are very puzzled:
- --with-mysql=mysql Client Connection Library
- --with-mysqli=mysql Client Connection Library
- --with-pdo-mysql=mysql Client Connection Library
"--with-mysql=mysql Client Connection Library" Why do you write this, the Php_mysql library, the php_mysqli
library is provided by PHP, or is generated by the MySQL Client connection library?
PHP's Mysql/mysqli library is just a simple package for the C API of MySQL, and does not include the implementation of the C API, it relies on libmysqlclient.so and related header files, so it needs to be in the same path as it was compiled.
--with-mysql=[Path] The path here is the path specified by--prefix when compiling MySQL, which should contain the include and Lib two directories, which will contain the above files.
The MySQL client library is used to connect to the MySQL server. PHP's MySQL extension library is for PHP to be able to invoke the MySQL client library.
Libraries are used for linking, not for generating other libraries.