嗨,我想從源碼到MySQL遷移,我安裝WAMP的服務器,配置此,做工精細,但...PDOException找不到驅動程序Laravel 5.4
[PDOException]
could not find driver
我看到這個錯誤時,我想
php artisan migrate
選擇PHP:25年6月5日,但7.0.10不工作太
我的php.ini從瓦帕
;extension=php_pdo_firebird.dll
extension=php_pdo_mysql.dll
;extension=php_pdo_oci.dll
;extension=php_pdo_odbc.dll
extension=php_pdo_pgsql.dll
extension=pgsql.so
extension=php_pdo_sqlite.dll
;extension=php_pgsql.dll
我dtabase.php
'default' => env('DB_CONNECTION', 'mysql'),
'connections' => [
'sqlite' => [
'driver' => 'sqlite',
'database' => database_path('database.sqlite'),
'prefix' => '',
],
'mysql' => [
'driver' => 'mysql',
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '3306'),
'database' => env('DB_DATABASE', 'mwebsite'),
'username' => env('DB_USERNAME', 'root'),
'password' => env('DB_PASSWORD', ''),
'charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci',
'prefix' => '',
'strict' => true,
'engine' => null,
],
和我.ENV
DB_HOST=127.0.0.1
DB_DATABASE=mwebsite
DB_USERNAME=root
DB_PASSWORD=
// PHP的信息 配置命令
cscript /nologo configure.js "--enable-snapshot-build" "--enable-debug-pack" "--with-pdo-oci=c:\php-sdk\oracle\x64\instantclient_12_1\sdk,shared" "--with-oci8-12c=c:\php-sdk\oracle\x64\instantclient_12_1\sdk,shared" "--enable-object-out-dir=../obj/" "--enable-com-dotnet=shared" "--with-mcrypt=static" "--without-analyzer" "--with-pgo"
PDO
PDO support enabled
PDO drivers mysql, pgsql, sqlite
是否在'phpinfo()'中列出了pdo_mysql? – nXu
是的,看看編輯:) –