Home >Backend Development >PHP Tutorial >html - Why does php report a driver error when using pdo to connect to the database?
As shown in the picture
As shown in the picture
You need to install the PDO extension in Ubuntu's PHP environment, then open or add:
extension=php_pdo_mysql.so
extension=php_pdo.so
Then restart the web container
This problem is a bit troublesome, I suggest you add me for private chat on QQ, 1065890063
There is no PDO extension
Please do not add wrong tags such as java, html, etc.
Install pdo_mysql extension
Please tell me how to solve the problem. Did you not install the PDO extension? still?