简体   繁体   中英

Tried to utilize azure windows 2012 R2 virtual machine mysql but I can't access it

I recently got interested in utilizing a bunch of VM that I have access to and I come to a conclusion that windows server R2 2012 was the easiest to start with. I was able to remotely connect to it, no problem I manage to install MySQL server and IIS where I am able to see it on localhost.

Here is how the IIS looks like

and here is the localhost database from the VM

grant all privileges on *.* 'USERNAME'@'IP' IDENTIFIED BY 'PASSWORD';

FLUSH PRIVILEGES;

在此输入图像描述

I figured out that I needed to grant privileges to users and ip's as well. However, whenever I try to connect it outside the machine, with the IP or DNS it just gives me an error. What am I doing wrong? Since clearly the VM visibility is the issue here.

Here is the firewall and azure firewall

在此输入图像描述

And whenever I try to connect with the following

hostname: dns or ip from the VM on azure

(I haven't tried the nettworks adresse that you get from azure, but not sure really which to use )

port:3306

I get a nasty cannot connect to with, basically I don't its not visiable and how do I make it visable to other machines/devices/apps

Yes, the issue should be somewhere in the settings. Firstly, could you check if you can connect to the MySQL from the inside of the VM?

Please make sure that you done all of the needed configuration actions. You may refer to the official guidance (it is for SQL Server, so avoid the SQL Server relevant bullets) - you should end with that list:

Create a TCP endpoint for the virtual machine

Open TCP ports in the Windows firewall

You shown the first one configuration, so what is left to configure is the Windows firewall.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM