[Resolved] Connecting Metabse to SQL Server from the VM

Hi All,

I have setup Metabase on a virtual machine running on Ubuntu 18. I am trying to connect to the SQL Server instance hosted on my local Windows 10. What should I do to ensure I can successfully connect to the database?

Hi @asimumba
You probably need to make sure that SQL Server is not using dynamic ports, and then you would define the port in Metabase. Other than that, it should work with 2012r2 or newer.

And of course whatever firewalls and network bridging needed to communicate between them, but you’ll find better help in forums dedicated to that, since it’s not specific to Metabase.

@flamber thanks for the heads up. By the way, SQL Server is using a static port and I am able to connect to the database locally with the same user I would like to you in the VM. Do I need to set any firewall exceptions for the port?

@asimumba If it already works, then I don’t understand what the question is.

With the same user credentials I am able to connect to the database on the host machine. Now I want to access the host SQL Server database from Metabase in the virtual machine. I hope that clarifies my question.

@asimumba Are you talking about Windows Authentication? Connect to SQL Server with windows authentication

No. I would like to connect with a named user. Except Metabase is installed on a VM and the database is sitting on a Windows 10 machine.

@asimumba I don’t understand the problem. It sounds like a network bridging problem, if you cannot see the SQL Server from the VM running Metabase. Again, there’s much better forums for that, since it’s not specific to Metabase, but general networking on VMs.

Not sure why you’re not just running Metabase directly on the Windows machine as a JAR file. Alternatively using Docker, which has much less overhead than a full VM running Ubuntu.

@flamber I am preparing the VM do deploy it to a wider audience. My set-up on my personal Windows PC works like a charm. I am trying to check the connection to work remotely over a VM.

Hi, if you want to connect with a named user, you need to make sure both SQL Server and Windows Authentication mode is enabled.

@CZvackoI actually succeeded. The problem was on the host, which I resolved by using the IP address for the host-only network.