1

I am working on Laravel 8 project, I ran migrations and made models, resource controller, routes and views. After running project with routing, "could not find driver" error was appeared. Can anyone help me to solve this problem?

1
  • Sounds like PDO is not installed on server. What does phpinfo show? Commented Oct 26, 2021 at 23:28

3 Answers 3

1

It seems like you have a missing dependency. run these commands

composer update
composer require doctrine/dbal

second solution: Edit your php.ini .Find and uncomment the following line (remove the ; character)

;extension=pdo_mysql.so //uncomment this line just remove ;
Sign up to request clarification or add additional context in comments.

1 Comment

This solution work for me. Tnx bro.
0

Seems like your database driver is missing.

What you can do is: First install the driver

For ubuntu and mysql database.

sudo apt-get install php7.x-mysql

Minimum is php7.3 as that is the minimum requirement for laravel 8.

You also can search for other database systems. To search for available driver in your machine/server:

sudo apt-cache search drivername

Then run the command

php artisan migrate

Comments

0

If your php version is correct then

Need to open php.ini file. uncomment extension=pdo_mysql.so; by removing the # in the beginning

Then, restart your Apache server. For more information, please read the documentation.

1 Comment

How can I restart Apache server on windows 10?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.