Score:0

Cannot connect to remote mysql server 2012 from ubuntu 22.04 using frets or ms sql driver

US flag

I recently installed ubuntu 22.04. I then installed openssl, unixodbc-dev, freetds, and mssqlodbc18 using apt. When I try to connect to a remote SQL Server I get an error. It is SQL Server Express 2012.

Error 20002 (severity 9):
Adaptive Server connection failed

I changed the FreeTds.conf file to include as below:

[sqlserver]
        host = XXX.XXX.XXX.X
        port = 1433
        tds version = 7.4
        instance=XX_XXXX}

I also reduced the CipherString to SECLEVEL=0 in the openssl.cnf file. However, when I try to connect it gives me the same error.

If I telnet to the server on that port, I can connect.

The same problem persists when I use pyodbc from python to connect and execute a query on the SQL Server instance.

I also installed Microsoft odic driver 18 and tried to connect using isql command with the same error.

Score:0
gs flag

Arjun, i'm having the same issue. I tried ubuntu 22/20 and php 8.0/8.2. Also tried pdo_sqlsrv, sqlsrv. Also tried freetd and didn't work. Using ubuntu it dons't work. But when i tried using pdo_sqlsrv on windows 11/PHP 8.2 it did work.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.