Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
402 views
in Technique[技术] by (71.8m points)

sql server - Connect Laravel on IIS to MS SQL

I am having issue connecting my Laravel project to MS SQL DB.

I am getting this error:

SQLSTATE[08001]: [Microsoft][ODBC Driver 17 for SQL Server]TCP Provider: The wait operation timed out.

The MS SQL server is running: Microsoft Windows Server 2019 Standard

The laravel project is running on a Windows IIS server.

Laravel version: 8.20.1

I have followed this guide and created SQL user on the MS SQL server: https://www.microfocus.com/documentation/silk-test/200/en/silktestworkbench-help-en/SILKTEST-7FFBB86A-CREATINGNEWSQLSERVERADMINUSER-TSK.html

I have edited connection details in .env file:

DB_CONNECTION=sqlsrv
DB_HOST=SERVER CONNECTION
DB_PORT=1433
DB_DATABASE=DATABSE_NAME
DB_USERNAME=USER_NAME
DB_PASSWORD=PASSWORD

I have also enabled port 1433 in SQL SERVER NETWORK CONNECTION

Can anyone help with this ?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...