PHP Adaptive Server连接失败(严重性9) [英] PHP Adaptive Server connection failed (severity 9)

查看:96
本文介绍了PHP Adaptive Server连接失败(严重性9)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试连接到Microsoft SQL Server 2008,我的应用程序在Linux服务器上运行,并且我安装了dblib pdo驱动程序.我使用端口转发通过端口1433连接.我不断收到此消息:

I'm trying to connect to microsoft SQL server 2008 my application is running on a linux server and I have the dblib pdo driver installed. I used port forwarding to connect thru port 1433. I keep getting this message:

SQLSTATE[01002] Adaptive Server connection failed (severity 9);  

PHP:

$connect = new PDO('dblib:host=ipaddres:1433;dbname=namedb','username','password');

推荐答案

我建议以这种方式测试带有tsql的数据库连接: tsql -H server_address -p 1433 -U用户-P pass -D dbname

I suggest to test DB connectivity w/ tsql in this way : tsql -H server_address -p 1433 -U user -P pass -D dbname

就我而言,我发现只是原因:该帐户的密码已过期" PDO给了我一个奇怪的错误,而tsql给了我正确的错误.

in my case I found that simply "Reason: The password of the account has expired" PDO gave me a strange error while tsql gave me the right error.

这篇关于PHP Adaptive Server连接失败(严重性9)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆