当前位置: 代码迷 >> 综合 >> PHP7.x安装mysql扩展
  详细解决方案

PHP7.x安装mysql扩展

热度:92   发布时间:2023-12-10 14:57:25.0
  • mysql扩展下载
    http://git.php.net/?p=pecl/database/mysql.git;a=summary

  • 使用phpize工具初始化
    sudo /usr/local/bin/phpize

    报错提示

    Cannot find autoconf. Please check your autoconf installation and the
    $PHP_AUTOCONF environment variable. Then, rerun this script.

    解决措施:
    sudo yum install -y m4 autoconf

  • 编译mysql扩展
    sudo ./configure --with-php-config=/usr/local/bin/php-config --with-mysql=mysqlnd

    sudo make && sudo make install

  相关解决方案