-
Notifications
You must be signed in to change notification settings - Fork 375
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Connection failed to sqlsrv : SQLSTATE[HYT00]: [unixODBC][Microsoft][ODBC Driver 13 for SQL Server]Login timeout expired #323
Comments
Can you connect to sql server using |
I have not installed sqlcmd on my linux server. Do I have to install mssql-tools on CentOS? |
BTW, I used the Remi's Repository to install the php7.1 and php-sqlsrv by following the instruction below. Download the latest remi-release rpm from rpm -Uvh remi-release*rpmInstall php71-php-sqlsrv rpm package: yum --enablerepo=remi install php71-php-sqlsrv |
I found another issue which maybe associated with this one. |
@larryu : Were you able to connect using sqlcmd? This will help us debug the issue a little better. Here is how you can install sqlcmd:
Then connect via sqlcmd
|
No luck with #298. |
@meet-bhagdev I got the following error. My SQL Server version is 2012. |
@meet-bhagdev New information. I reinstalled the sqlcmd based on your step. Then I can connect to the SQLServer via sqlcmd. But still cannot connect to SQL Server via Laravel 5.4. PDOException in Connector.php line 68: |
Are sqlcmd and Laravel both on the same machine? The Login timeout expired error seems be a network error. |
@meet-bhagdev Yes. You are right. Seems to be a network error. I reinstalled all the driver again. Then tried to use php artisan tinker to connect to the db, that works. Then tried to use web page to connect to the db, no lucks. Then following #298, it works. |
Same problem here, using Laravel 5.4. Solved using IP address instead of names in database connection strings, on config/database.php. |
Thanks @chgalvez I changed from
to
and everything connected perfect =) Was having this issue with OSX running docker image for SQL Server on Linux |
Happy to help! |
I use Lavavel 5.4 on CentOS7.2 with Php7.1.
I installed # yum --enablerepo=remi-test install php71-php-sqlsrv.
Server name, user name and password are all OK.
I can access the SQL server when I deploy my app on windows, however I cannot connect to sqlserver when I deploy the app on CentOS.
Any idea and suggestions?
Thanks.
The text was updated successfully, but these errors were encountered: