Search code examples
mysqlsqlsql-serverlinked-server

Connection to MSSQL from MySQL


I have a MySQL DB on Ubuntu Server. Is any possibility to establish a connection with remote MSSQL DB and use this DB in query? For example, execute in MySQL query like this:

SELECT mysql_table.field1,
       mssql_table.field2
FROM   MySQL.table_name AS mysql_table,
       MSSQL.table_name AS mssql_table
WHERE  mysql_table.id = mssql_table.id

Solution

  • As from the explanation here you cant use MySQL to connect to MSSQL.

    You will have to use any clients.You can use FREETDS client for linux.You can also use OBDC and JDBC.