Posts Remote Database Access To Azure Bitnami VM!
Post
Cancel

Remote Database Access To Azure Bitnami VM!


You’ll be guided on how you can access remote database (MySQL) over bitnamin VM deployed over Azure.

Remort MySQL Access for Azure VM

Step 1: SSH into VM:

1
  sudo ssh -i pem_file.pem azureuser@public_server_ip

Step 2: Get into MySQL settings folder:

1
  cd /opt/bitnami/mysql/conf/

Step 3: Open the file in editor

1
 nano my.cnf

Step 4: Change bind-address to 0.0.0.0

Step 5: Restart the entire server:

1
2
  sudo service bitnami restart apach
  sudo service bitnami restart

Step 6: Add firewall rule in the vm for the sql to allow traffic to access via porta..azure.com

1
2
3
4
5
6
7
8
9
  Source: Any 
  Port: * 
  Destination: Any 
  Service: MySQL
  Destination port ranges: 3306 (Default)
  Protocol: TCP (Default)
  Action: Allow
  Priority: 1040 (works)
  Descriptiion: MYSQL Connection (anything)

Step 7: In php file use the credientials.

1
2
3
4
5
  Eg: 
  define("_DB", "oser");
  define("_PASS", "uaNhBsdRz55L");
  define("_HOST", "40.80.95.59:3306");
  define("_USER", "root");


This post is licensed under Ravi Jain by the author.