When installing php, Which path is specified by -- with-mysql?

Source: Internet
Author: User
Mysql is installed with rpm. After installation, the files are scattered in several directories, and you do not know which directory to specify when installing php. The following is the result of rpm-qlmysql-community-server. {Code...} mysql is installed with rpm. After installation, the files are scattered in several directories, and you do not know which directory to specify when installing php.

Below isrpm -ql mysql-community-server.

/etc/logrotate.d/mysql/etc/my.cnf/etc/my.cnf.d/usr/bin/innochecksum/usr/bin/lz4_decompress/usr/bin/my_print_defaults/usr/bin/myisam_ftdump/usr/bin/myisamchk/usr/bin/myisamlog/usr/bin/myisampack/usr/bin/mysql_install_db/usr/bin/mysql_plugin/usr/bin/mysql_secure_installation/usr/bin/mysql_ssl_rsa_setup/usr/bin/mysql_tzinfo_to_sql/usr/bin/mysql_upgrade/usr/bin/mysqld_pre_systemd/usr/bin/mysqldumpslow/usr/bin/perror/usr/bin/replace/usr/bin/resolve_stack_dump/usr/bin/resolveip/usr/bin/zlib_decompress/usr/lib/systemd/system/mysqld.service/usr/lib/tmpfiles.d/mysql.conf/usr/lib64/mysql/mecab/usr/lib64/mysql/mecab/dic/usr/lib64/mysql/mecab/dic/ipadic_euc-jp/usr/lib64/mysql/mecab/dic/ipadic_euc-jp/char.bin/usr/lib64/mysql/mecab/dic/ipadic_euc-jp/dicrc/usr/lib64/mysql/mecab/dic/ipadic_euc-jp/left-id.def/usr/lib64/mysql/mecab/dic/ipadic_euc-jp/matrix.bin/usr/lib64/mysql/mecab/dic/ipadic_euc-jp/pos-id.def/usr/lib64/mysql/mecab/dic/ipadic_euc-jp/rewrite.def/usr/lib64/mysql/mecab/dic/ipadic_euc-jp/right-id.def/usr/lib64/mysql/mecab/dic/ipadic_euc-jp/sys.dic/usr/lib64/mysql/mecab/dic/ipadic_euc-jp/unk.dic/usr/lib64/mysql/mecab/dic/ipadic_sjis/usr/lib64/mysql/mecab/dic/ipadic_sjis/char.bin/usr/lib64/mysql/mecab/dic/ipadic_sjis/dicrc/usr/lib64/mysql/mecab/dic/ipadic_sjis/left-id.def/usr/lib64/mysql/mecab/dic/ipadic_sjis/matrix.bin/usr/lib64/mysql/mecab/dic/ipadic_sjis/pos-id.def/usr/lib64/mysql/mecab/dic/ipadic_sjis/rewrite.def/usr/lib64/mysql/mecab/dic/ipadic_sjis/right-id.def/usr/lib64/mysql/mecab/dic/ipadic_sjis/sys.dic/usr/lib64/mysql/mecab/dic/ipadic_sjis/unk.dic/usr/lib64/mysql/mecab/dic/ipadic_utf-8/usr/lib64/mysql/mecab/dic/ipadic_utf-8/char.bin/usr/lib64/mysql/mecab/dic/ipadic_utf-8/dicrc/usr/lib64/mysql/mecab/dic/ipadic_utf-8/left-id.def/usr/lib64/mysql/mecab/dic/ipadic_utf-8/matrix.bin/usr/lib64/mysql/mecab/dic/ipadic_utf-8/pos-id.def/usr/lib64/mysql/mecab/dic/ipadic_utf-8/rewrite.def/usr/lib64/mysql/mecab/dic/ipadic_utf-8/right-id.def/usr/lib64/mysql/mecab/dic/ipadic_utf-8/sys.dic/usr/lib64/mysql/mecab/dic/ipadic_utf-8/unk.dic/usr/lib64/mysql/mecab/etc/usr/lib64/mysql/mecab/etc/mecabrc/usr/lib64/mysql/plugin/usr/lib64/mysql/plugin/adt_null.so/usr/lib64/mysql/plugin/auth_socket.so/usr/lib64/mysql/plugin/debug/usr/lib64/mysql/plugin/debug/adt_null.so/usr/lib64/mysql/plugin/debug/auth_socket.so/usr/lib64/mysql/plugin/debug/ha_example.so/usr/lib64/mysql/plugin/debug/innodb_engine.so/usr/lib64/mysql/plugin/debug/keyring_file.so/usr/lib64/mysql/plugin/debug/libmemcached.so/usr/lib64/mysql/plugin/debug/libpluginmecab.so/usr/lib64/mysql/plugin/debug/locking_service.so/usr/lib64/mysql/plugin/debug/mypluglib.so/usr/lib64/mysql/plugin/debug/mysql_no_login.so/usr/lib64/mysql/plugin/debug/mysqlx.so/usr/lib64/mysql/plugin/debug/rewrite_example.so/usr/lib64/mysql/plugin/debug/rewriter.so/usr/lib64/mysql/plugin/debug/semisync_master.so/usr/lib64/mysql/plugin/debug/semisync_slave.so/usr/lib64/mysql/plugin/debug/validate_password.so/usr/lib64/mysql/plugin/debug/version_token.so/usr/lib64/mysql/plugin/ha_example.so/usr/lib64/mysql/plugin/innodb_engine.so/usr/lib64/mysql/plugin/keyring_file.so/usr/lib64/mysql/plugin/libmemcached.so/usr/lib64/mysql/plugin/libpluginmecab.so/usr/lib64/mysql/plugin/locking_service.so/usr/lib64/mysql/plugin/mypluglib.so/usr/lib64/mysql/plugin/mysql_no_login.so/usr/lib64/mysql/plugin/mysqlx.so/usr/lib64/mysql/plugin/rewrite_example.so/usr/lib64/mysql/plugin/rewriter.so/usr/lib64/mysql/plugin/semisync_master.so/usr/lib64/mysql/plugin/semisync_slave.so/usr/lib64/mysql/plugin/validate_password.so/usr/lib64/mysql/plugin/version_token.so/usr/sbin/mysqld/usr/sbin/mysqld-debug/usr/share/doc/mysql-community-server-5.7.12/usr/share/doc/mysql-community-server-5.7.12/COPYING/usr/share/doc/mysql-community-server-5.7.12/ChangeLog/usr/share/doc/mysql-community-server-5.7.12/INFO_BIN/usr/share/doc/mysql-community-server-5.7.12/INFO_SRC/usr/share/doc/mysql-community-server-5.7.12/README/usr/share/doc/mysql-community-server-5.7.12/my-default.cnf/usr/share/man/man1/innochecksum.1.gz/usr/share/man/man1/lz4_decompress.1.gz/usr/share/man/man1/my_print_defaults.1.gz/usr/share/man/man1/myisam_ftdump.1.gz/usr/share/man/man1/myisamchk.1.gz/usr/share/man/man1/myisamlog.1.gz/usr/share/man/man1/myisampack.1.gz/usr/share/man/man1/mysql.server.1.gz/usr/share/man/man1/mysql_install_db.1.gz/usr/share/man/man1/mysql_plugin.1.gz/usr/share/man/man1/mysql_secure_installation.1.gz/usr/share/man/man1/mysql_ssl_rsa_setup.1.gz/usr/share/man/man1/mysql_tzinfo_to_sql.1.gz/usr/share/man/man1/mysql_upgrade.1.gz/usr/share/man/man1/mysqld_multi.1.gz/usr/share/man/man1/mysqld_safe.1.gz/usr/share/man/man1/mysqldumpslow.1.gz/usr/share/man/man1/mysqlman.1.gz/usr/share/man/man1/perror.1.gz/usr/share/man/man1/replace.1.gz/usr/share/man/man1/resolve_stack_dump.1.gz/usr/share/man/man1/resolveip.1.gz/usr/share/man/man1/zlib_decompress.1.gz/usr/share/man/man8/mysqld.8.gz/usr/share/mysql/dictionary.txt/usr/share/mysql/fill_help_tables.sql/usr/share/mysql/innodb_memcached_config.sql/usr/share/mysql/install_rewriter.sql/usr/share/mysql/magic/usr/share/mysql/my-default.cnf/usr/share/mysql/mysql-log-rotate/usr/share/mysql/mysql_security_commands.sql/usr/share/mysql/mysql_sys_schema.sql/usr/share/mysql/mysql_system_tables.sql/usr/share/mysql/mysql_system_tables_data.sql/usr/share/mysql/mysql_test_data_timezone.sql/usr/share/mysql/uninstall_rewriter.sql/var/lib/mysql/var/lib/mysql-files/var/lib/mysql-keyring/var/run/mysqld

Reply content:

Mysql is installed with rpm. After installation, the files are scattered in several directories, and you do not know which directory to specify when installing php.

Below isrpm -ql mysql-community-server.

/etc/logrotate.d/mysql/etc/my.cnf/etc/my.cnf.d/usr/bin/innochecksum/usr/bin/lz4_decompress/usr/bin/my_print_defaults/usr/bin/myisam_ftdump/usr/bin/myisamchk/usr/bin/myisamlog/usr/bin/myisampack/usr/bin/mysql_install_db/usr/bin/mysql_plugin/usr/bin/mysql_secure_installation/usr/bin/mysql_ssl_rsa_setup/usr/bin/mysql_tzinfo_to_sql/usr/bin/mysql_upgrade/usr/bin/mysqld_pre_systemd/usr/bin/mysqldumpslow/usr/bin/perror/usr/bin/replace/usr/bin/resolve_stack_dump/usr/bin/resolveip/usr/bin/zlib_decompress/usr/lib/systemd/system/mysqld.service/usr/lib/tmpfiles.d/mysql.conf/usr/lib64/mysql/mecab/usr/lib64/mysql/mecab/dic/usr/lib64/mysql/mecab/dic/ipadic_euc-jp/usr/lib64/mysql/mecab/dic/ipadic_euc-jp/char.bin/usr/lib64/mysql/mecab/dic/ipadic_euc-jp/dicrc/usr/lib64/mysql/mecab/dic/ipadic_euc-jp/left-id.def/usr/lib64/mysql/mecab/dic/ipadic_euc-jp/matrix.bin/usr/lib64/mysql/mecab/dic/ipadic_euc-jp/pos-id.def/usr/lib64/mysql/mecab/dic/ipadic_euc-jp/rewrite.def/usr/lib64/mysql/mecab/dic/ipadic_euc-jp/right-id.def/usr/lib64/mysql/mecab/dic/ipadic_euc-jp/sys.dic/usr/lib64/mysql/mecab/dic/ipadic_euc-jp/unk.dic/usr/lib64/mysql/mecab/dic/ipadic_sjis/usr/lib64/mysql/mecab/dic/ipadic_sjis/char.bin/usr/lib64/mysql/mecab/dic/ipadic_sjis/dicrc/usr/lib64/mysql/mecab/dic/ipadic_sjis/left-id.def/usr/lib64/mysql/mecab/dic/ipadic_sjis/matrix.bin/usr/lib64/mysql/mecab/dic/ipadic_sjis/pos-id.def/usr/lib64/mysql/mecab/dic/ipadic_sjis/rewrite.def/usr/lib64/mysql/mecab/dic/ipadic_sjis/right-id.def/usr/lib64/mysql/mecab/dic/ipadic_sjis/sys.dic/usr/lib64/mysql/mecab/dic/ipadic_sjis/unk.dic/usr/lib64/mysql/mecab/dic/ipadic_utf-8/usr/lib64/mysql/mecab/dic/ipadic_utf-8/char.bin/usr/lib64/mysql/mecab/dic/ipadic_utf-8/dicrc/usr/lib64/mysql/mecab/dic/ipadic_utf-8/left-id.def/usr/lib64/mysql/mecab/dic/ipadic_utf-8/matrix.bin/usr/lib64/mysql/mecab/dic/ipadic_utf-8/pos-id.def/usr/lib64/mysql/mecab/dic/ipadic_utf-8/rewrite.def/usr/lib64/mysql/mecab/dic/ipadic_utf-8/right-id.def/usr/lib64/mysql/mecab/dic/ipadic_utf-8/sys.dic/usr/lib64/mysql/mecab/dic/ipadic_utf-8/unk.dic/usr/lib64/mysql/mecab/etc/usr/lib64/mysql/mecab/etc/mecabrc/usr/lib64/mysql/plugin/usr/lib64/mysql/plugin/adt_null.so/usr/lib64/mysql/plugin/auth_socket.so/usr/lib64/mysql/plugin/debug/usr/lib64/mysql/plugin/debug/adt_null.so/usr/lib64/mysql/plugin/debug/auth_socket.so/usr/lib64/mysql/plugin/debug/ha_example.so/usr/lib64/mysql/plugin/debug/innodb_engine.so/usr/lib64/mysql/plugin/debug/keyring_file.so/usr/lib64/mysql/plugin/debug/libmemcached.so/usr/lib64/mysql/plugin/debug/libpluginmecab.so/usr/lib64/mysql/plugin/debug/locking_service.so/usr/lib64/mysql/plugin/debug/mypluglib.so/usr/lib64/mysql/plugin/debug/mysql_no_login.so/usr/lib64/mysql/plugin/debug/mysqlx.so/usr/lib64/mysql/plugin/debug/rewrite_example.so/usr/lib64/mysql/plugin/debug/rewriter.so/usr/lib64/mysql/plugin/debug/semisync_master.so/usr/lib64/mysql/plugin/debug/semisync_slave.so/usr/lib64/mysql/plugin/debug/validate_password.so/usr/lib64/mysql/plugin/debug/version_token.so/usr/lib64/mysql/plugin/ha_example.so/usr/lib64/mysql/plugin/innodb_engine.so/usr/lib64/mysql/plugin/keyring_file.so/usr/lib64/mysql/plugin/libmemcached.so/usr/lib64/mysql/plugin/libpluginmecab.so/usr/lib64/mysql/plugin/locking_service.so/usr/lib64/mysql/plugin/mypluglib.so/usr/lib64/mysql/plugin/mysql_no_login.so/usr/lib64/mysql/plugin/mysqlx.so/usr/lib64/mysql/plugin/rewrite_example.so/usr/lib64/mysql/plugin/rewriter.so/usr/lib64/mysql/plugin/semisync_master.so/usr/lib64/mysql/plugin/semisync_slave.so/usr/lib64/mysql/plugin/validate_password.so/usr/lib64/mysql/plugin/version_token.so/usr/sbin/mysqld/usr/sbin/mysqld-debug/usr/share/doc/mysql-community-server-5.7.12/usr/share/doc/mysql-community-server-5.7.12/COPYING/usr/share/doc/mysql-community-server-5.7.12/ChangeLog/usr/share/doc/mysql-community-server-5.7.12/INFO_BIN/usr/share/doc/mysql-community-server-5.7.12/INFO_SRC/usr/share/doc/mysql-community-server-5.7.12/README/usr/share/doc/mysql-community-server-5.7.12/my-default.cnf/usr/share/man/man1/innochecksum.1.gz/usr/share/man/man1/lz4_decompress.1.gz/usr/share/man/man1/my_print_defaults.1.gz/usr/share/man/man1/myisam_ftdump.1.gz/usr/share/man/man1/myisamchk.1.gz/usr/share/man/man1/myisamlog.1.gz/usr/share/man/man1/myisampack.1.gz/usr/share/man/man1/mysql.server.1.gz/usr/share/man/man1/mysql_install_db.1.gz/usr/share/man/man1/mysql_plugin.1.gz/usr/share/man/man1/mysql_secure_installation.1.gz/usr/share/man/man1/mysql_ssl_rsa_setup.1.gz/usr/share/man/man1/mysql_tzinfo_to_sql.1.gz/usr/share/man/man1/mysql_upgrade.1.gz/usr/share/man/man1/mysqld_multi.1.gz/usr/share/man/man1/mysqld_safe.1.gz/usr/share/man/man1/mysqldumpslow.1.gz/usr/share/man/man1/mysqlman.1.gz/usr/share/man/man1/perror.1.gz/usr/share/man/man1/replace.1.gz/usr/share/man/man1/resolve_stack_dump.1.gz/usr/share/man/man1/resolveip.1.gz/usr/share/man/man1/zlib_decompress.1.gz/usr/share/man/man8/mysqld.8.gz/usr/share/mysql/dictionary.txt/usr/share/mysql/fill_help_tables.sql/usr/share/mysql/innodb_memcached_config.sql/usr/share/mysql/install_rewriter.sql/usr/share/mysql/magic/usr/share/mysql/my-default.cnf/usr/share/mysql/mysql-log-rotate/usr/share/mysql/mysql_security_commands.sql/usr/share/mysql/mysql_sys_schema.sql/usr/share/mysql/mysql_system_tables.sql/usr/share/mysql/mysql_system_tables_data.sql/usr/share/mysql/mysql_test_data_timezone.sql/usr/share/mysql/uninstall_rewriter.sql/var/lib/mysql/var/lib/mysql-files/var/lib/mysql-keyring/var/run/mysqld

Looks like you want to compile php? If yes, let's look down.

Cd
./Configure -- help | grep mysql # First let's see what this parameter is.

The software paths specified during compilation are usually source code paths.
My suggestion is: php-related software/plug-ins, either compiled or rpm.

If your PHP version is later than 5.3, try this:--with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd

PHP extensions for various Database Systems

Three major MySQL Connection Methods in PHP (the underlying implementation of the driver started from 5.4 is mysqlnd ):
Http://php.net/manual/zh/mysqli.overview.php
Mysqli (preferred) pdo_mysql (recommended) mysql (not recommended)
PHP has built-in MySQL driver mysqlnd Since 5.4:
Php-src/ext/mysqlnd/
Php-src/ext/mysql/
Php-src/ext/mysqli/
Php-src/ext/pdo_mysql/
Link: mysql, mysqli, and pdo_mysql. The underlying programming interfaces for operating MySQL in PHP depend on the MySQL driver mysqlnd built in PHP.

In PHP5.3, mysqlnd support is enabled as follows:
-- With-mysql = mysqlnd
-- With-mysqli = mysqlnd
-- With-pdo-mysql = mysqlnd
If it is left blank after PHP5.4, mysqlnd: is enabled by default:
-- With-mysql
-- With-mysqli
-- With-pdo-mysql
PHP7 is not supported at the beginning -- with-mysql.
-- With-pdo-sqlite is enabled by default. pdo_sqlite is recommended for SQLite operations.
-- With-sqlite3 is enabled by default, which is experimental.
The ext directory of the Windows binary package contains the following extensions:
Php_mysql.dll
Php_mysqli.dll
Php_pdo_mysql.dll
Php_sqlite3.dll
Php_pdo_sqlite.dll
Debian/Ubuntu software package: php5-mysqlnd php5-sqlite

PostgreSQL Driver for PHP:
-- With-pgsql = DIR
-- With-pdo-pgsql = DIR
DIR is the PostgreSQL base install directory or the path to pg_config.
Debian/Ubuntu software package: php5-pgsql
Apt-cache depends php5-pgsql to see its dependency on libpq5 PostgreSQL C client library.
The Development Kit libpq-dev contains/usr/bin/pg_config.
Sudo apt-get install libpq-dev
-- With-pgsql =/usr/bin/pg_config
-- With-pdo-pgsql =/usr/bin/pg_config

Oracle Driver for PHP:
-- With-oci8 = DIR
-- With-pdo-oci = DIR this extension is experimental.
DIR defaults to $ ORACLE_HOME.
You can also install the Oracle Instant Client and specify the following parameters:
-- With-oci8 = shared, instantclient,/usr/lib/oracle/11.2/client/lib
-- With-pdo-oci = shared, instantclient,/usr/lib/oracle, 11.2
Oracle Instant Client (60 MB ):
Http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html
Php_oci8.dll
Php_oci8_11g.dll
Php_pdo_oci.dll

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.