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

Comments

Projects
None yet
2 participants
@arstercz

arstercz commented Jun 29, 2018

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

This comment has been minimized.

Owner

denisenkom commented Jun 30, 2018

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

@arstercz

This comment has been minimized.

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)

@arstercz arstercz closed this Jul 6, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment