title: Cannot fix PDOException::(“could not find driver”) on Laravel migration
body: <p>Here's a list of stuff I've done in order to attempt to fix the issue:</p>
  
  <p>I'm on Windows 7 and using MAMP. My PHP version is 7.3.7.</p>
  
  <p>The full error I'm getting is:</p>
  
  <pre><code>Illuminate\Database\QueryException  : could not find driver (SQL: select * from information_schema.tables where table_schema = lol and table_name = migrations and table_type = 'BASE TABLE')
  
    at C:\MAMP\htdocs\League Of Legends Backend\vendor\laravel\framework\src\Illuminate\Database\Connection.php:664
      660|         // If an exception occurs when attempting to run a query, we'll format the error
      661|         // message to include the bindings with SQL, which will make this exception a
      662|         // lot more helpful to the developer instead of just the database's errors.
      663|         catch (Exception $e) {
    &gt; 664|             throw new QueryException(
      665|                 $query, $this-&gt;prepareBindings($bindings), $e
  
      666|             );
      667|         }
      668|
  
    Exception trace:
  
    1   Doctrine\DBAL\Driver\PDOException::("could not find driver")
        C:\MAMP\htdocs\League Of Legends Backend\vendor\doctrine\dbal\lib\Doctrine\DBAL\Driver\PDOConnection.php:31
  
    2   PDOException::("could not find driver")
        C:\MAMP\htdocs\League Of Legends Backend\vendor\doctrine\dbal\lib\Doctrine\DBAL\Driver\PDOConnection.php:27
  
    Please use the argument -v to see more details.
  </code></pre>
  
  <p>Used <code>phpinfo()</code> on one of the pages served by the server in order to determine PHP version and location of <code>php.ini</code> file. My PHP version is 7.3.7 and my <code>php.ini</code> file is located at <code>C:\MAMP\conf\php7.3.7\php.ini</code>. These 3 lines are uncommented in that file:</p>
  
  <pre><code>extension=php_mysql.dll
  extension=php_mysqli.dll
  extension=php_pdo_mysql.dll
  </code></pre>
  
  <p>Used get_loaded_extensions on one of the pages served by the server in order to see all loaded extensions. This is the list:</p>
  
  <pre><code>array:45 [▼
    0 =&gt; "Core"
    1 =&gt; "bcmath"
    2 =&gt; "calendar"
    3 =&gt; "com_dotnet"
    4 =&gt; "ctype"
    5 =&gt; "date"
    6 =&gt; "filter"
    7 =&gt; "hash"
    8 =&gt; "iconv"
    9 =&gt; "json"
    10 =&gt; "SPL"
    11 =&gt; "odbc"
    12 =&gt; "pcre"
    13 =&gt; "Reflection"
    14 =&gt; "session"
    15 =&gt; "sockets"
    16 =&gt; "standard"
    17 =&gt; "mysqlnd"
    18 =&gt; "tokenizer"
    19 =&gt; "zip"
    20 =&gt; "zlib"
    21 =&gt; "libxml"
    22 =&gt; "dom"
    23 =&gt; "PDO"
    24 =&gt; "bz2"
    25 =&gt; "SimpleXML"
    26 =&gt; "soap"
    27 =&gt; "xml"
    28 =&gt; "wddx"
    29 =&gt; "xmlreader"
    30 =&gt; "xmlwriter"
    31 =&gt; "apache2handler"
    32 =&gt; "openssl"
    33 =&gt; "gd"
    34 =&gt; "gettext"
    35 =&gt; "mbstring"
    36 =&gt; "exif"
    37 =&gt; "mysqli"
    38 =&gt; "pdo_sqlite"
    39 =&gt; "sqlite3"
    40 =&gt; "curl"
    41 =&gt; "Phar"
    42 =&gt; "imagick"
    43 =&gt; "pdo_mysql"
    44 =&gt; "fileinfo"
  ]
  </code></pre>
  
  <p>In Laravel's database.php file, MySQL is set as default:</p>
  
  <pre><code>'default' =&gt; env('DB_CONNECTION', 'mysql'),
  </code></pre>
  
  <p>I tried using composer update and composer dump-autoload too.</p>
  
  <p>My database env variables are set correctly. I can interact with my database by inserting, deleting, updating and selecting, however, I cannot migrate for some reason:</p>
  
  <pre><code>DB_CONNECTION=mysql
  DB_HOST=127.0.0.1
  DB_PORT=3306
  DB_DATABASE=lol
  DB_USERNAME=root
  DB_PASSWORD=root
  </code></pre>
  
  <p>I've read through all similar questions here and I'm out of options now.</p>