search
HomeBackend DevelopmentPHP7Detailed explanation of php7 mysql extension installation method

php mysql installation method: first download the mysql extension; then unzip it and initialize it using the phpize tool; then configure and execute "make && make install"; finally add the content as "extension=pdo_mysql.so" .

Detailed explanation of php7 mysql extension installation method

Recommended tutorial: "PHP7"

PHP7 installation mysql extension

1. Download the mysql extension

http://git.php.net/?p=pecl/database/mysql.git;a=summary

2. Unzip and initialize using the phpize tool (phpize is generally under the php installation directory /bin/)

Unzip the extension Execute /www/server/php/71/bin/phpize

3. Perform configure

./configure --with-php-config=/www/server/php/71/bin/php-config

4.make in the folder after && make install

After this step is completed, the system will prompt:

Installing shared extensions: /www/server/php/71/lib/php/extensions/no-debug-non-zts-20160303/

The mysql.so we want is in this path.

This path is also the default extension_dir:

Detailed explanation of php7 mysql extension installation method

PHP default extension_dir path

5. Modify php .ini

Add a line in the php.ini file:

extension=pdo_mysql.so

Save and restart the service.

If you modify extension_dir, you need to copy the mysql.so file to the corresponding path.

The above is the detailed content of Detailed explanation of php7 mysql extension installation method. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools