When installing PHP, which path does--with-mysql specify?

Source: Internet
Author: User
Keywords Php
MySQL is installed with RPM, after loading the files scattered in several directories, and then do not know when installing PHP should specify which directory, for advice.

Here are rpm -ql mysql-community-server the results.

/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 loading the files scattered in several directories, and then do not know when installing PHP should specify which directory, for advice.

Here are rpm -ql mysql-community-server the results.

/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're compiling PHP? If yes, look down.

Cd
./configure--help |grep MySQL # Let's see what this parameter is for.

The path of the associated software that is usually specified at compile time is the source path.
My advice is: PHP-related software/plugins, either compiled, or both rpm.

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

PHP for each database system corresponding to the extension

PHP three major MySQL connection methods (5.4 start to drive the underlying implementation are all MYSQLND):
http://php.net/manual/zh/mysqli.overview.php
Mysqli (preferred) pdo_mysql (recommended) MySQL (not recommended)
PHP has built-in MySQL driver Mysqlnd starting from 5.4:
php-src/ext/mysqlnd/
php-src/ext/mysql/
php-src/ext/mysqli/
php-src/ext/pdo_mysql/
Relationship: Mysql,mysqli,pdo_mysql This 3 set of PHP operation MySQL programming interface bottom all rely on PHP built-in MySQL driver mysqlnd.

PHP5.3 Enable MYSQLND support like this:
--with-mysql=mysqlnd
--with-mysqli=mysqlnd
--with-pdo-mysql=mysqlnd
When PHP5.4 is left blank, MYSQLND is enabled by default:
--with-mysql
--with-mysqli
--with-pdo-mysql
PHP7 began to no longer support--with-mysql.
--with-pdo-sqlite is enabled by default, it is recommended to use Pdo_sqlite to manipulate SQLite.
--with-sqlite3 is enabled by default, and this extension is experimental in nature.
The following extensions are built into the Windows binary package ext directory:
Php_mysql.dll
Php_mysqli.dll
Php_pdo_mysql.dll
Php_sqlite3.dll
Php_pdo_sqlite.dll
Debian/ubuntu 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 Package: Php5-pgsql
Apt-cache depends Php5-pgsql sees its dependency libpq5 this PostgreSQL's C client library.
Development package Libpq-dev with/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 in nature.
DIR defaults to $ORACLE _home.
or install the Oracle Instant client and specify this:
--with-oci8=shared,instantclient,/usr/lib/oracle/11.2/client/lib
--with-pdo-oci=shared,instantclient,/usr/lib/oracle,11.2
Oracle Instant Client Download address (60MB):
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.