close

[Fixed] Laravel PDOException could not find driver

Today We are Going To Solve Laravel PDOException could not find driver in laravel. Here we will Discuss All Possible Solutions and How this error Occurs So let’s get started with this Article.

How to Fix Laravel PDOException could not find driver Error?

  1. How to Fix Laravel PDOException could not find driver Error?

    To Fix Laravel PDOException could not find driver Error just Find php.ini path via phpinfo(). To solve this error just follow the below steps
    First of all find php.ini path via phpinfo() And then uncomment the line textension=php_pdo_mysql.dll from your code. And add this line to your code extension=pdo_mysql.so And at the last just run sudo apt-get install php-mysql And your error will be removed. Try that.

  2. Laravel PDOException could not find driver

    To Fix Laravel PDOException could not find driver Error just Run the command. You can fix your issue by just running the below command: composer update composer require doctrine/dbal

Solution 1 : Find php.ini path via phpinfo()

To solve this error just follow the below steps

  1. First of all find php.ini path via phpinfo()
  2. And then uncomment the line textension=php_pdo_mysql.dll from your code.
  3. And add this line to your code extension=pdo_mysql.so
  4. And at the last just run sudo apt-get install php-mysql

And your error will be removed. Try that.

Solution 2 : Run the command

You can fix your issue by just running the below command:

composer update

composer require doctrine/dbal

Conclusion

So these were all possible solutions to this error. I hope your error has been solved by this article. In the comments, tell us which solution worked? If you liked our article, please share it on your social media and comment on your suggestions. Thank you.

Also Read This Solutions

Leave a Comment