简体   繁体   中英

PHP5 MySQL5 PDOException “could not find driver”

I have already tried the instructions mentioned in this post but still couldn't resolve the issue.

System Specifications:

  • Windows 7 Professional SP1 (x64)
  • Apache 2.1.12 (x64)
  • PHP 5.6.6 (x64)
  • MySQL 5.6.22 (x64)

The following configurations are set as well:

extension_dir = "C:\Apache\php\ext"
....
extension=php_pdo_mysql.dll

$db = new PDO("mysql:host=localhost;dbname=customers", $user, $pass);

Unfortunately I am still having the exception, "PDOException: Could not find driver".

PS/ I am new to PHP ;)

I've just removed the existing MySQL 5.6.22 and installed 5.6.23 -a different build. Now it is working fine but I am not sure what went down the road.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM