https://github.com/Microsoft/msphpsql/issues/116
4.1.1驱动下载地址
https://github.com/Microsoft/msphpsql/releases/tag/v4.1.1-Windows
还有一说是
在数据库配置中加入 ‘pooling’ => false
‘sqlsrv’ => [
‘driver’ => ‘sqlsrv’,
‘host’ => ‘xxx’,
‘database’ => ‘xxx’,
‘username’ => ‘xxx’,
‘password’ => ‘xxx’,
‘charset’ => ‘utf8’,
‘prefix’ => ”,
‘pooling’ => false
],
或者
注释掉port这一行
'connections' => [
'sqlsrv' => [
'driver' => 'sqlsrv',
'host' => env( 'DB_HOST' ),
'port' => '', // THIS LINE
'database' => env( 'DB_DATABASE' ),
'username' => env( 'DB_USERNAME' ),
'password' => env( 'DB_PASSWORD' ),
'prefix' => '',
'charset' => 'UTF-8',
'pooling' => false,
],
],