-2

I'm using a vps using Microsoft Azure and I setup a Linux Ubuntu Server, basically a lamp stack. The url is http://jflorescadev.cloudapp.net/ and it's public ip is 23.97.56.207. If I put it both on the browser I can access it fine but whenever I try to connect to MySQL using MySQL Workbench it can't connect. Sure I can connect to ssh and make the database manage there but I want to make it on a GUI so I used MySQL Workbench.

All the credentials to connect is already configured like something:

GRANT ALL ON *.* to user@'%' IDENTIFIED BY 'password'; 
GRANT ALL ON *.* to user@localhost IDENTIFIED BY 'password'; 
GRANT ALL ON *.* to user@'%' IDENTIFIED BY 'password'; 

And in my Azure Portal the port is already open. So I check using just the commmand line:

ping 23.97.56.207

or

ping jflorescadev.cloudapp.net

Both gave me a timeout response. Why is that? Thanks

jackhammer013
  • 2,295
  • 11
  • 45
  • 95
  • Maybe your remote machine has ICMP request disallowed for security reason – Bertrand Martel Aug 13 '15 at 15:17
  • This question belongs on ServerFault, not StackOverflow. Af far as ping goes: @BertrandMartel is correct: ICMP traffic does not get sent to VMs from the outside. You'd need to use a tcp-based ping tool. – David Makogon Aug 13 '15 at 15:22

1 Answers1

0

You need to add an endpoint in the Azure portal for the VM you have created. https://azure.microsoft.com/en-gb/documentation/articles/virtual-machines-set-up-endpoints/

on the port you want to use for MySql. Make the public port something random and the private port the default for MySql (3306).

Next you will need to configure MySQl to listen for remote connections (Remote Connections Mysql Ubuntu), and finally open the firewall on your ubuntu box. Then you will be able to connect. Wont be very secure tho' :)

Community
  • 1
  • 1
  • There are no firewall rules set, by default, on the Azure linux images. Plus the OP already stated the port was open (via the portal). – David Makogon Aug 13 '15 at 15:21
  • Well, I took the OPs question to mean he could not connect via Workbench not that he could not ping the machine. If the OP follows those steps,, MySql workbench will connect. I included all steps necessary, including those the OP has already done. Point taken about the VM firewall defaults in Azure tho' –  Aug 13 '15 at 15:27
  • Thanks! I fixed it now using the 3rd step you gave me, I already added the endpoint on setup, what I lack is the 3rd step : – jackhammer013 Aug 14 '15 at 07:51