dbcli / mssql-cli

A command-line client for SQL Server with auto-completion and syntax highlighting
BSD 3-Clause "New" or "Revised" License
1.35k stars 192 forks source link

unable to connect mssql from Linux centos #545

Open shiva1232 opened 2 years ago

shiva1232 commented 2 years ago

I am trying to connect for automation from Linux centos VM to windows MSSQL servers below .

mssql-cli -S XXXXXXX,1433 -U pamus-adm -d Password: Error message: Login failed for user 'pamus-adm'.

user account(pamus-adm) has access. I am able to log in manually. How to troubleshoot and fix. Please help.

greenseeker commented 2 years ago

It looks like you may be using a Windows-style server argument whereas Linux just uses hostname. Try -S localhost if you're running it from the database server.