Uncaught PDOException: could not find driver
特意在编译php7.2的时候没有带上--with-mysqld,结果会报错
解决:带上重新编译
./configure --prefix=/usr/local/php72 --with-config-file-path=/etc/php72 --enable-fpm --with-pdo-mysql
发现不需要改php.ini文件,重启php-fpm就行了
kill -INT pid
pid可以在/usr/local/php72/var/log/php-fpm.log找到
启动php-fpm
/usr/local/php72/sbin/php-fpm