Laravel:錯誤[PDOException]:無法在PostgreSQL中查找驅動程序我正在嘗試通過Laravel連接PostgreSQL數據庫,以便進行php工匠遷移,但似乎沒有被定向,因為它正在讀取MySQL的數據庫名稱。以下是來自database.php的命令:'connections' => array(
'sqlite' => array(
'driver' => 'sqlite',
'database' => __DIR__.'/../database/production.sqlite',
'prefix' => '',
),
'mysql' => array(
'driver' => 'mysql',
'host' => 'localhost',
'database' => 'database',
'username' => 'root',
'password' => '',
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => '',
),
'pgsql' => array(
'driver' => 'pgsql',
'host' => 'localhost',
'database' => 'postgres',
'username' => 'postgres',
'password' => 'root',
'charset' => 'utf8',
'prefix' => '',
'schema' => 'public',
),
'sqlsrv' => array(
'driver' => 'sqlsrv',
'host' => 'localhost',
'database' => 'database',
'username' => 'root',
'password' => '',
'prefix' => '',
),),如果我刪除MySQL路徑,我會得到:[InvalidArgumentException]Database [mysql] not configured.編輯: 當嘗試做php artisan遷移時,我得到'PDOException:找不到驅動程序'。我正在使用WAMP而且我在Win8.1中。使用PostgreSQL作為數據庫。
添加回答
舉報
0/150
提交
取消