首页 > 解决方案 > 我正在使用 manjaro 并且无法使用 php artisan 迁移它显示找不到 sql 驱动程序

问题描述

我一直面临的问题是

   Illuminate\Database\QueryException  : could not find driver (SQL: select * from information_schema.tables where table_schema = public and table_name = migrations and table_type = 'BASE TABLE')

  at /home/orsih/Documents/project/ITG/multischool/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) {
  > 664|             throw new QueryException(
    665|                 $query, $this->prepareBindings($bindings), $e
    666|             );
    667|         }
    668| 

  Exception trace:

  1   Doctrine\DBAL\Driver\PDO\Exception::("could not find driver")
      /home/orsih/Documents/project/ITG/multischool/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDO/Exception.php:18

  2   Doctrine\DBAL\Driver\PDO\Exception::new()
      /home/orsih/Documents/project/ITG/multischool/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:43

  Please use the argument -v to see more details.

我尝试从扩展名中删除逗号=pdo_mysql无法阻止扩展名=pdo_mysql.so

谢谢你

标签: phplinuxlaravel

解决方案


我正在使用 pgsql,所以我不得不注释掉

exptension=pdo_mysql
exptension=pdo_pgsql
exptension=pgsql

它对我有用,希望对你有帮助


推荐阅读