0

I'm trying to connect to a MySQL server instance, using a distributed query, with the folling query:

SELECT * 
FROM openrowset('SQLNCLI11','server=<>,33333;uid=root;pwd=<>','SELECT * FROM mov.users')

I get the following errors:

OLE DB provider "SQLNCLI11" for linked server "(null)" returned message "Client unable to establish connection due to prelogin failure". OLE DB provider "SQLNCLI11" for linked server "(null)" returned message "Protocol error in TDS stream". Msg 7303, Level 16, State 1, Line 1 Cannot initialize the data source object of OLE DB provider "SQLNCLI11" for linked server "(null)".

I've tried using SSL on my MSSQL instances and nothing. I've ran the execute command for the sp_configure to enable 'ad hoc distributed queries', and nothing. I've tried to create a linked server but it doesn't seem to be a mssql on linux compatible feature.

How can I cestablish a direct connection between a MSSQL running on linux to a MySQL server?

4
  • Have you tested the connection to each database separately? Commented Jan 15, 2021 at 20:22
  • Yes, I can connect to MySQL using workbench and to MSSQL using management studio Commented Jan 15, 2021 at 20:24
  • Can you connect to MySQL using Management Studio? This would test whether your ODBC connections are set up properly. The following article may help: gunnarpeipman.com/mssql-mysql-linked-server Commented Jan 15, 2021 at 20:29
  • Management studio connected to a mssql server instance running on linux doesn't allow adding linked servers. Another option is connecting with odbc drivers. But it's not able to establish a connection, due to a 'prelogin failure'. Commented Jan 15, 2021 at 20:46

1 Answer 1

0

On Linux, SQL Server does not support Linked Servers to data sources other than SQL Server. See unsupported features

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.