rails-sqlserver / tiny_tds

TinyTDS - Simple and fast FreeTDS bindings for Ruby using DB-Library.
Other
607 stars 189 forks source link

Cannot connect to SQL Server #457

Closed deczibru closed 3 years ago

deczibru commented 4 years ago

Environment

Operating System

Ubuntu 18.04.4 LTS

TinyTDS Version and Information

tiny_tds (2.1.2)

                            Version: freetds v1.00.82
             freetds.conf directory: /etc/freetds
     MS db-lib source compatibility: no
        Sybase binary compatibility: yes
                      Thread safety: yes
                      iconv library: yes
                        TDS version: 4.2
                              iODBC: no
                           unixodbc: yes
              SSPI "trusted" logins: no
                           Kerberos: yes
                            OpenSSL: no
                             GnuTLS: yes
                               MARS: no

Description

Can't connect to SQL Server using rails db:create, however i can connect to server using rails c with client = TinyTds::Client.new username: 'rails_dev', password: 'mypassword', host: 'ip'. With this connection i can execute queries etc.

SQL Server logs shows Login failed for user 'rails_dev'. Reason: Password did not match that for the login provided.

database.yml file looks like this

default: &default adapter: sqlserver encoding: utf-8 pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %> timeout: 50000 host: ip port: 1433 mode: dblib

development: <<: *default database: apps_development username: rails_dev passwrod: mypassword

rbumg commented 4 years ago

Is your typo (passwrod: mypassword) from adding it into the issue body or is that the way it appears in your database.yml file?

aharpervc commented 3 years ago

I'm going to close this issue, since it doesn't seem like a tiny tds problem, assuming @rbumg is correct. If it turns out to be something else, we can reopen the issue