Home > Article > Backend Development > To install php module on linux --with-mysql --with-mysqli, do you need to install mysql?
In Linux centos environment, install php.5.3
./configure --prefix=/usr/local/php/ --with-config-file-path=/usr/local/php/etc/ --enable-soap - -enable-fpm --enable-mbstring
--with-curl --with-mysql -with-mysqli --with-gd --with-jpeg-dir
Error report:
configure: error: Cannot find libmysqlclient under /usr.
Note that the MySQL client library is not bundled anymore!
I don’t understand. Does the with-mysql module support mysql? Do I have to install mysql on the machine? Because the machine is connected to msyql on other machines, I only need to install support for mysql connection. Is there any other way?
You need these to find other information: mysql-server mysql-client libmysqlclient-dev
In Linux centos environment, install php.5.3
./configure --prefix=/usr/local/php/ --with-config-file-path=/usr/local/php/etc/ --enable-soap - -enable-fpm --enable-mbstring
--with-curl --with-mysql -with-mysqli --with-gd --with-jpeg-dir
Error report:
configure: error: Cannot find libmysqlclient under /usr.
Note that the MySQL client library is not bundled anymore!
I don’t understand. Does the with-mysql module support mysql? Do I have to install mysql on the machine? Because the machine is connected to msyql on other machines, I only need to install support for mysql connection. Is there any other way?
You need these to find other information: mysql-server mysql-client libmysqlclient-dev
You need to install libmysqlclient-dev. This is the development file for the MySQL client library (header files, pkg-config configuration, etc.). It depends on libmysqlclient, which is the MySQL client library used to connect to the MySQL server.
If you want to connect to a MySQL server from a system (even on a remote system), you still need the MySQL client library so that your program knows how to speak the language used by MySQL (MySQL network protocol). Of course, some libraries do not use the official MySQL client library, but implement it themselves, so that the official MySQL client library is not needed (such as pymysql).
As prompted, just install libmysqlclient
You should only need mysql-libs. However, this package has many names, such as mysql-community-libs