Skip to content
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

Prepare failed:Login error: EOF when to connect sql server 2005 #399

Closed
arstercz opened this issue Jun 29, 2018 · 2 comments
Closed

Prepare failed:Login error: EOF when to connect sql server 2005 #399

arstercz opened this issue Jun 29, 2018 · 2 comments

Comments

@arstercz
Copy link

error occurs when I use the github.com/denisenkom/go-mssqldb/examples/simple/simple.go to connect my sql server 2005 whether the password is correct or not:

# on the centos6.8 system, go-1.10
# ./simple -port 11433 -server 10.0.10.2 -user test -password xxxxx
2018/06/29 20:41:21 Prepare failed:Login error: EOF

the env on my sql server:

Windows Server 2003 Enterprise Edition Service Pack 2
Microsoft SQL Server 2005 - 9.00.5000.00 (Intel X86)  Copyright (c) 1988-2005 Microsoft Corporation  Enterprise Edition on Windows NT 5.2 (Build 3790: Service Pack 2) 

and also print error when I use usql connect the sql server:

# usql --username test --password  'mssql://10.0.10.2:1433/test'
Enter password: 
error: mssql: Login error: EOF

anyone can help with this? thanks!

@denisenkom
Copy link
Owner

Please enable verbose logging on driver and send me driver logs and also SQL server logs.

@arstercz
Copy link
Author

arstercz commented Jul 1, 2018

hi @denisenkom , I read this link #27 and notice that our sql server have no enable encrypt option, so it's ok when I disabled the encryt option:

# ./simple -port 1433 -server 10.0.10.2 -user test -password xxxxx --debug
 password:xxxxx
 port:1433
 server:10.0.10.2
 user:test
 connString:server=10.0.10.2;user id=test;password=xxxxx;port=1433;encrypt=disable
somenumber:1
somechars:abc
bye

and the usql is also ok:

# usql --password mssql://test@10.0.10.2:1433/test?encrypt=disable
Enter password:
Connected with driver mssql (Microsoft SQL Server 9.00.5000.00, SP4, Enterprise Edition)
Type "help" for help.

ms:test@10.0.10.2:1433/test=> select @@version;
                                col0
+-------------------------------------------------------------------+
  Microsoft SQL Server 2005 - 9.00.5000.00 (Intel X86)
  	Dec 10 2010 10:56:29
  	Copyright (c) 1988-2005 Microsoft Corporation
  	Enterprise Edition on Windows NT 5.2 (Build 3790: Service Pack 2)

(1 rows)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants