Connect self hosted mariadb on virtual machine

Matt Jones 1 Reputation point
2021-05-17T14:42:01.547+00:00

Hi,

I have installed Ubuntu Linux 18.04 version on my Azure virtual machine. I can easily connect to the db from the same server. But when I try to connect it from outside using any sql client like DBeaver or SQL yog. It doesn't allow me to connect. It always give "Connection refused" error. I have whitelisted 3306 port for both inbound and outbound traffic. I also added port 3306 in iptables as suggested in this article (https://azure.microsoft.com/en-in/blog/create-your-own-dedicated-mysql-server-for-your-azure-websites/). But I didn't find way to create endpoint for this port as the link mentioned in this article is broken and no more exists.

It would be good to have some guidance on how can connect to the Mariadb database installed on my virtual machine from outside>

Thanks.

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
9,014 questions
{count} votes

1 answer

Sort by: Most helpful
  1. prmanhas-MSFT 17,946 Reputation points Microsoft Employee Moderator
    2021-05-21T12:19:22.89+00:00

    @Matt Jones Apologies for the delay in response and all the inconvenience caused because of the issue.

    Can you check below and let me know if it helped:

    https://mariadb.com/kb/en/installing-and-using-mariadb-via-docker/#connecting-to-mariadb-from-outside-the-container

    https://forums.docker.com/t/configuring-mariadb-in-a-container-for-remote-client-access/8761/3

    https://serverfault.com/questions/808977/mariadb-refuses-remote-connections

    https://mariadb.com/kb/en/troubleshooting-connection-issues/

    Hope it helps!!!

    Please "Accept as Answer" if it helped so it can help others in community looking for help on similar topics.

    Disclaimer: This response contains a reference to a third-party World Wide Web site. Microsoft is providing this information as convenient to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there.
    There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.