Try to comment that line with the extension=pdo_mysql using semi colon ;. Then after editing your php.ini file, restart your server.
Unable to load dynamic library 'pdo_mysql'
Hi, I'm just started learning PHP. And I am using the built-in HTTP server on Mac (Monterey 12.4).
When trying to connect with the mySQL database with PDO it shows:
could not find driver
I uncommented this line on the php.ini extension=pdo_mysql
But now the server shows:
PHP Warning: PHP Startup: Unable to load dynamic library 'pdo_mysql' (tried: /usr/local/lib/php/pecl/20190902/pdo_mysql (dlopen(/usr/local/lib/php/pecl/20190902/pdo_mysql, 0x0009): tried: '/usr/local/lib/php/pecl/20190902/pdo_mysql' (no such file)), /usr/local/lib/php/pecl/20190902/pdo_mysql.so (dlopen(/usr/local/lib/php/pecl/20190902/pdo_mysql.so, 0x0009): tried: '/usr/local/lib/php/pecl/20190902/pdo_mysql.so' (no such file))) in Unknown on line 0
My understanding is (please correct me if I'm wrong) pdo_mysql is not installed in the PHP extension directory /usr/local/lib/php/pecl/20190902/
Is it possible to check if pdo_mysql is installed in any other directory?
Please let me know how I can solve it please.
Please or to participate in this conversation.