My lnmp environment uses Alibaba Cloud RDS database. There is no mysql in the environment. How can I install mysql and mysqli extension through phpize
認證0級講師
DecorationPDO
吧,不需要mysql
environment.
And mysql is connected through socket, so no mysql environment is required.
https://pecl.php.net
Go here to download the source code package, compile and install it.
Didn’t know youphp
什么版本的,mysql
擴展在php7
中已經(jīng)被廢棄,只有mysqli
和mysqlnd
擴展
下面簡要說明php7
中怎么編譯安裝mysqli
Extension
$ cd php7/ext/mysqli
$ phpize
Configuring for:
PHP Api Version: 20160303
Zend Module Api No: 20160303
Zend Extension Api No: 320160303
$ ./configure
$ make && make install
Then, you can php7/ext/mysqli/modules
目錄下看到編譯好了的mysqli.so
It doesn’t matter what you use, these extensions are enabled by default in the current PHP version, and there is no need to handle them manually.