Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQL Server from Ubuntu - login failed

I have a brand new Ubuntu 12 box. I installed unixodbc and the 64 bit linux MS SQL Server 2008 driver.

When I run

sqlcmd -S dbserver -U me -P secret

I get back

Login failed for user 'me'.

The same sqlcmd line works fine on Windows.

Mixed authentication is turned on.

I am using the correct username and password (again, same command on windows works).

I can telnet to dbserver:1433; it does not appear to be a network issue.

like image 771
Jay Eckles Avatar asked Feb 05 '26 13:02

Jay Eckles


1 Answers

We have Ubuntu 12.04 connecting to MSSQL. Here's what we did

sudo apt-get install freetds-dev freetds-bin tdsodbc -y
sudo nano /etc/freetds/freetds.conf

delete the test connections and add your SQL info

[mySQLserver]
    host = 192.168.1.5
    instance = MYSQLSERVER
    port = 1433
    tds version = 8.0

then run the following

tsql -S 192.168.1.5 -U sa 
tsql -C
isql -v MSSQL sa 'yourSqlPassword'
service --status-all

hope this helps

like image 189
rdaniels Avatar answered Feb 09 '26 08:02

rdaniels



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!