Unexpected EOF from the server
OS error 36, "Operation now in progress"
首先,你要不装unixODBC的话你肯定没法用freetds的,肯定一直报错!所以你先要安装unixodbc,直接brew install unixodbc就可以了~~
我们可以打开freetds的报错来看:
sublime /usr/local/freetds/etc/freetds.conf
打开:
dump file = /tmp/freetds.log
然后我们可以在/etc/freetds.conf中配置:
# 开发库
[dev]
host = 192.168.100.79
port = 1433
tds version = 5.0
然后我们到bin目录下:
./tsql -S dev -U dbuser
输入密码之后报错:
我们可以把tds version设置为7.0再试下,一般情况下freetds连接报错eof的都是version错误
# 开发库
[dev]
host = 192.168.100.79
port = 1433
tds version = 7.0
之后试了一下,可以了~~
junjiedeMacBook-Pro:bin junjielin$ ./tsql -S dev -U dbuser
Password:
locale is "zh_CN.UTF-8"
locale charset is "UTF-8"
using default charset "UTF-8"
后来因为重装电脑,需要再次调试连接mssql,发现其实连接sqlserver和是否在/usr/local/freetds/etc/freetds.conf 中配置没有关系~~~~