TinyTds ::错误:用户登录faild' sa'

时间:2017-11-30 09:22:48

标签: ruby-on-rails sql-server ruby-on-rails-4

我尝试通过rails console连接sql-server

ActiveRecord :: Base.establish_connection(:adapter =>" sqlserver",:encoding =>" utf8",:host =>" 10.10.10.62 ",:database =>" cosec",:username =>" sa",:password =>" ****" )

但我收到了错误..

  

TinyTds ::错误:用户' sa'

的登录faild

1 个答案:

答案 0 :(得分:0)

它应该是这样的: -

FLUSH PRIVILEGES;

development:
  # <<: *default
  adapter: sqlserver
  mode: dblib
  host: 10.10.10.62
  port: 1433
  database: cosec
  username: sa
  password: *****
  timeout: 50000000