PDO: Could not find driver php/mysql

前端 未结 2 751
南笙
南笙 2020-12-10 18:50

i\'m having issues connecting to my database on a web host that I have, i\'m using the following:

$dsn = \'mysql:host=mysql1.hosting.digiweb.ie;dbname=mydbna         


        
相关标签:
2条回答
  • 2020-12-10 19:08

    go to your php.ini file and uncomment this line

        extension=php_pdo_mysql.dll
    

    and then restart your apache

    0 讨论(0)
  • 2020-12-10 19:21

    Change your extension dir to be absolute in php.ini. I changed it from

    extension_dir = "ext" 
    

    to

    extension_dir = "C:/{PATH TO PHP DIRECTORY}/ext"
    

    and it worked.

    0 讨论(0)
提交回复
热议问题