I am new to Laravel and am trying to follow along with an online tutorial. I came to a point where I need to run php artisan migrate
in the terminal and I get the following error:
Illuminate\Database\QueryException
could not find driver (SQL: select * from information_schema.tables where table_schema = some_db and table_name = migrations and table_type = 'BASE TABLE')
at C:\xampp\htdocs\social\vendor\laravel\framework\src\Illuminate\Database\Connection.php:669
665| // If an exception occurs when attempting to run a query, we'll format the error
666| // message to include the bindings with SQL, which will make this exception a
667| // lot more helpful to the developer instead of just the database's errors.
668| catch (Exception $e) {
> 669| throw new QueryException(
670| $query, $this->prepareBindings($bindings), $e
671| );
672| }
673|
1 C:\xampp\htdocs\social\vendor\laravel\framework\src\Illuminate\Database\Connectors\Connector.php:70
PDOException::("could not find driver")
2 C:\xampp\htdocs\social\vendor\laravel\framework\src\Illuminate\Database\Connectors\Connector.php:70
PDO::__construct("mysql:host=127.0.0.1;port=3306;dbname=some_db", "root", "", [])
I've tried every solution I could find on here and I've gone into my php.ini
file to enable different extensions but nothing seems to work. I found a solution that said to try running sudo apt-get install php-mysql
but I'm using Windows so that's not an option for me. Any help on this matter would be greatly appreciated!