[英]Pdo Dblib Mssql Connection Error
I am using my sync system for 2 years. 我正在使用我的同步系统2年。 And i didn't change anything. 而且我什么都没改变。 wierdly today sync system is broken. 今天同步系统坏了。 And i recieved an error message. 而且我收到一条错误消息。
Connection failed: SQLSTATE[01002] Adaptive Server connection failed (severity 9)
I google it. 我用谷歌搜索。
And i learned it about freetds version problem. 我了解到有关freetds版本的问题。
For checking it 用于检查
I wrote this line in ssh 我在ssh中写了这一行
TDSVER=7.0 tsql -H 78.***.***.49 -p 1433 -U DBNAME
I recieved this message. 我收到了这则消息。
locale is "tr_TR.UTF-8"
locale charset is "UTF-8"
using default charset "UTF-8"
Msg 18456 (severity 14, state 1) from *****SERVER Line 1:
"Login failed for user 'DBNAME'."
Error 20002 (severity 9):
Adaptive Server connection failed
There was a problem connecting to the server
Same mistake. 同样的错误。
I'm using dblib for connection via pdo. 我正在使用dblib通过pdo进行连接。
What should i do ? 我该怎么办 ? What is the problem ? 问题是什么 ?
UPDATE: 更新:
I read this part in php manuel 我在php manuel中阅读了这一部分
"If it is not possible to use SqlSrv, you can use the PDO_ODBC driver to connect to Microsoft SQL Server and Sybase databases, as the native Windows DB-LIB is ancient, thread un-safe and no longer supported by Microsoft. " “如果无法使用SqlSrv,则可以使用PDO_ODBC驱动程序连接到Microsoft SQL Server和Sybase数据库,因为本机Windows DB-LIB是古老的,线程不安全,并且不再受Microsoft支持。 ”
My Free Tds Settings 我的免费Tds设置
Version: freetds v0.91
freetds.conf directory: /etc
MS db-lib source compatibility: yes
Sybase binary compatibility: yes
Thread safety: yes
iconv library: yes
TDS version: 4.2
iODBC: no
unixodbc: yes
SSPI "trusted" logins: no
Kerberos: yes
It is ridiculous. 这太荒谬了。 But i found the problem. 但是我发现了问题。
"enforce password expiration" was on. “强制密码过期”已启用。 And windows forces to change db password. Windows会强制更改db密码。 When i disabled it, we solved the problem. 当我禁用它时,我们解决了问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.