2

I'm trying to connect to a database that's hosted on Microsoft Azure and I'm getting this message:

Uncaught exception 'PDOException' with message 'could not find drive...

I know I'm missing a driver somewhere, but don't know where or how I'm supposed to install it. I'm not sure if I need to activate it somewhere in Azure or if this needs to be a local install.

Any info on what I'm supposed to do would be great.

Thanks.

hokkaidi
  • 858
  • 6
  • 19
  • Maybe this thread could help you. https://stackoverflow.com/questions/24384582/pdo-exception-error-while-connecting-to-microsoft-azure – hokkaidi Aug 14 '17 at 21:38
  • Did you read and insure you have the relevant installation of the [mysql driver for your server OS and version from this page](http://php.net/manual/fa/mysql.installation.php)? – gview Aug 15 '17 at 10:25

2 Answers2

0

If you are using Azure Database for MySQL, you need to have a module called pdo_mysql which has been enabled in Azure App Service.

enter image description here

In your local, go to your php.ini file and uncomment (remove ;) this line

;extension=php_pdo_mysql.dll

and then restart your server.

Aaron Chen
  • 9,835
  • 1
  • 16
  • 28
-1

Please read the Prerequisites section of this article to know which driver you need to install to be able to connect to a SQL Server VM on Azure or to connect to a SQL Azure Database Server.

Hope this helps.

Alberto Morillo
  • 13,893
  • 2
  • 24
  • 30