Resource icon

How to fix Laravel error illuminate database query exception?

It’s a hard thing to focus on error repeatedly. But we are responsible to sort out the issue immediately whenever you get an error from any application. Now, comes the error when dealing with Windows 10 Laravel development executing particular command PHP artisan migration.

Laravel – One of the best frameworks named as a popular web application is Laravel. The syntax is easily readable and makes you do tasks like session, caching, authentication and routing. We need help while transferring database schema in Laravel, in that case, migration will help you a lot. It has columns and rows to predict your handy work. Migration has a predefined format so no need to create manually.

You can see the error code:

Code:
$ php artisan migrate:install

could not find driver (SQL: create table `migrations` (`id` int unsigned not null auto_increment primary key, `migration` varchar(255) not null, `batch` int not null) default character set utf8mb4 collate ‘utf8mb4_unicode_ci’)
Here’s the step to resolve the issue:

Step 1:
Go to the folder “PHP” and check php.ini for updating it again. Just open the file php.ini in the folder “PHP” and then add the coding mentioned below:

Code:
extension=php_pdo_mysql.dll
Step 2: Again, go to the folder “xampp” and then update php.ini by adding the code:

Code:
extension=php_pdo_mysql.dll
Step 3: Open the control panel and do restart on MySQL & Apache for restarting XAMPP.

Now, you can run the command “PHP artisan migrate” so that, you won’t get any problems now.
Author
kumkumsharma
Views
7,068
First release
Last update
Rating
0.00 star(s) 0 ratings

More resources from kumkumsharma

Top