Sibeesh Passion

Top Menu

  • Home
  • Search
  • About
  • Privacy Policy

Main Menu

  • Articles
    • Azure
    • .NET
    • IoT
    • JavaScript
    • Career Advice
    • Interview
    • Angular
    • Node JS
    • JQuery
    • Knockout JS
    • Jasmine Framework
    • SQL
    • MongoDB
    • MySQL
    • WordPress
  • Contributions
    • Medium
    • GitHub
    • Stack Overflow
    • Unsplash
    • ASP.NET Forum
    • C# Corner
    • Code Project
    • DZone
    • MSDN
  • Social Media
    • LinkedIn
    • Facebook
    • Instagram
    • Twitter
  • YouTube
    • Sibeesh Venu
    • Sibeesh Passion
  • Awards
  • Home
  • Search
  • About
  • Privacy Policy

logo

Sibeesh Passion

  • Articles
    • Azure
    • .NET
    • IoT
    • JavaScript
    • Career Advice
    • Interview
    • Angular
    • Node JS
    • JQuery
    • Knockout JS
    • Jasmine Framework
    • SQL
    • MongoDB
    • MySQL
    • WordPress
  • Contributions
    • Medium
    • GitHub
    • Stack Overflow
    • Unsplash
    • ASP.NET Forum
    • C# Corner
    • Code Project
    • DZone
    • MSDN
  • Social Media
    • LinkedIn
    • Facebook
    • Instagram
    • Twitter
  • YouTube
    • Sibeesh Venu
    • Sibeesh Passion
  • Awards
  • Linux Azure Function Isolated Dot Net 9 YAML Template Deployment

  • Build, Deploy, Configure CI &CD Your Static Website in 5 mins

  • Post Messages to Microsoft Teams Using Python

  • Get Azure Blob Storage Blob Metadata Using PowerShell

  • Deploy .net 6 App to Azure from Azure DevOps using Pipelines

AzureDatabaseMySQLVirtual MachineWordpress
Home›Azure›Link Your MySQL Database To Azure Virtual Machine And WordPress

Link Your MySQL Database To Azure Virtual Machine And WordPress

By SibeeshVenu
September 24, 2015
1117
0
Share:
Adding end points in Azure Virtual Machine

This article explains how you can link your existing MySQL database to a Azure virtual machine and configure in wordpress. Once your database and wordpress website id ready you can go ahead and link your DB to wordpress and axure virtual machine. If you need to back up and restore your clear db MySQL database in a virtual machine in Azure, I suggest you to read Back Up your ClearDB and restore in Azure. If you are new to azure virtual machine, I strongly recommend you to read here: Create Virtual Machine In Azure. You can also find how to install MySQL in Azure Virtual Machine here Install MySQL in Azure . I hope you will like this.

If you are new to azure, I recommend you to read here: Azure

Background

I hope you read my articles related to Virtual Machines in azure. If not, please read those. I was being limited to use only 20 MB size since one of the MSDN subscription was providing me ClearDB. So I thought of creating a virtual machine and install MySQL. Then I restored my previous Database to my new Database. Here in this article, I will share you the steps to link the database you created to azure virtual machine and wordpress.

Steps to Back Up your ClearDB and restore

Login to your azure portal https://manage.windowsazure.com

Login to your Azure Virtual Machine

Hope you have already installed MySQL in your Virtual Machine. If so, we are ready to go.

First thing we need to do is to add the end points in our Azure virtual machine. To do so you need to follow the below steps.

Add end points in Azure virtual machine

Go to your virtual machine in azure management portal.

Adding end points in Azure Virtual Machine

Adding end points in Azure Virtual Machine

Now click on the end points as shown in the preceding image.

Adding end points in Azure Virtual Machine

Adding end points in Azure Virtual Machine

Click on the add option in the footer area.

Adding end points in Azure Virtual Machine

Adding end points in Azure Virtual Machine

Now you will be getting a pop up, in that please click on the Add standalone end points.

Adding end points in Azure Virtual Machine

Adding end points in Azure Virtual Machine

In the given area, please select MySQL as name and TCP as protocol. Port should be the one we did it while configuring the MySQL. For example 3306. I suggest you to do not edit in that area.

Adding end points in Azure Virtual Machine

Adding end points in Azure Virtual Machine

Click on the tick icon once you have made entry for the required fields. Then you can see the progression and once it is completed, you will get a message as follows.

Adding end points in Azure Virtual Machine

Adding end points in Azure Virtual Machine

So we have successfully created the end points for our virtual machine MySQL. The next step is, to change some settings in the firewall in our virtual machine. Please do this with some care. It is very much important.

Setting the firewall configuration in Azure virtual machine

Go to the start menu and type power shell. You will be given some search results.

Setting the firewall configuration in Azure virtual machine

Setting the firewall configuration in Azure virtual machine

Now you can see a command window with the name of logged in user as shown in the preceding image.

Setting the firewall configuration in Azure virtual machine

Setting the firewall configuration in Azure virtual machine

The next step is a bit complex one. You need to enter a complex command which is shown here.

Setting the firewall configuration in Azure virtual machine

Setting the firewall configuration in Azure virtual machine

For your convenience I am giving the command as below.

[sql]
New-NetFirewallRule -DisplayName "MySQL56" -Direction Indound -Protocol TCP -LocalPort 3306 -Action Allow -Profile Public
[/sql]

You can type the command as shown below.

Setting firewall in azure virtual machine

Setting firewall in azure virtual machine

And if you do the above step correctly, I am sure you will be given a result as follows.

Setting firewall in azure virtual machine

Setting firewall in azure virtual machine

Wow, we have done the settings needed now.

Now we need to change some settings in our wordpress configuration. As you all know the wordpress configuration is in the file called wp-config.php. So we are going to change the configuration in that file.

Changing the configuration to new settings in wordpress

Again go to your manage azure page, click the web application you need to change the settings.

Changing the configuration to new settings in wordpress

Changing the configuration to new settings in wordpress

Now go to the dashboard and click on edit in visual studio on-line.

Changing the configuration to new settings in wordpress

Changing the configuration to new settings in wordpress

You can see your wordpress files now. Click on the wp-config.php.

Changing the configuration to new settings in wordpress

Changing the configuration to new settings in wordpress

It is always better to take a back up or copy of the wp-config.php, so that you can revert back to your clearDB configuration whenever you want. I strongly recommend you to do this step.

Changing the configuration to new settings in wordpress

Changing the configuration to new settings in wordpress

You can rename the pasted file, just right click on the file and click rename.

Changing the configuration to new settings in wordpress

Changing the configuration to new settings in wordpress

As you can see in the below image, I have given the name as ClearDB-Wp-Config.php.

Changing the configuration to new settings in wordpress

Changing the configuration to new settings in wordpress

Open your wp-config.php and change the MySQL host name.

Changing the configuration to new settings in wordpress

Changing the configuration to new settings in wordpress

Now add the port number in the host name because it listen that port.

Changing the configuration to new settings in wordpress

Changing the configuration to new settings in wordpress

Please do not forget to change the database name, user name , password too.

Now I am sure your blog with new MySQL database will be running . Keep blogging. Cheers!.

Conclusion

Did I miss anything that you may think which is needed?.Have you ever tried virtual machine in azure?. If not, I strongly recommend that. So we have successfully configured our new MySQL database to the Azure virtual machine and wordpress. We have also done the firewall changes needed in virtual machine. I hope you liked this article. Please share me your valuable suggestions and feedback.

Your turn. What do you think?

A blog isn’t a blog without comments, but do try to stay on topic. If you have a question unrelated to this post, you’re better off posting it on C# Corner, Code Project, Stack Overflow, Asp.Net Forum instead of commenting here. Tweet or email me a link to your question there and I’ll definitely try to help if I am able to.

Kindest Regards
Sibeesh Venu

TagsAdding end points in Azure Virtual MachineAzureAzure Virtual MachineChange Virtual Machine EndpointsChanging the Firewall Settings In Azure Virtual MachineDatabaseMySQLWordpress
Previous Article

Back Up Or Recovery Media Creation Of ...

Next Article

Check for any unsaved changes in page

0
Shares
  • 0
  • +
  • 0
  • 0
  • 0

SibeeshVenu

I am Sibeesh Venu, an engineer by profession and writer by passion. Microsoft MVP, Author, Speaker, Content Creator, Youtuber, Programmer.

Related articles More from author

  • WordPress login
    AzureHow toWordpress

    Change your Azure Website URLto your cname for all Posts and Categories

    June 1, 2015
    By SibeeshVenu
  • 3 Steps to Join Bizspark
    Career AdviceNews

    How to join bizspark

    June 3, 2015
    By SibeeshVenu
  • Azure

    Secure Serverless Azure Functions AppSetting Using Key Vault

    July 5, 2019
    By SibeeshVenu
  • Wamp ServerWordpress

    Set up WordPress in Your Local Wamp Server

    April 29, 2015
    By SibeeshVenu
  • Azure

    Change MFA Phone/Mobile Number Using PowerShell

    October 19, 2021
    By SibeeshVenu
  • Azure Mobile App preview
    Azure

    Creating Azure Mobile App With Visual Studio

    April 24, 2016
    By SibeeshVenu
0

My book

Asp Net Core and Azure with Raspberry Pi Sibeesh Venu

YouTube

MICROSOFT MVP (2016-2022)

profile for Sibeesh Venu - Microsoft MVP

Recent Posts

  • Linux Azure Function Isolated Dot Net 9 YAML Template Deployment
  • Build, Deploy, Configure CI &CD Your Static Website in 5 mins
  • Easily move data from one COSMOS DB to another
  • .NET 8 New and Efficient Way to Check IP is in Given IP Range
  • Async Client IP safelist for Dot NET
  • Post Messages to Microsoft Teams Using Python
  • Get Azure Blob Storage Blob Metadata Using PowerShell
  • Deploy .net 6 App to Azure from Azure DevOps using Pipelines
  • Integrate Azure App Insights in 1 Minute to .Net6 Application
  • Azure DevOps Service Connection with Multiple Azure Resource Group

Tags

Achievements (35) Angular (14) Angular 5 (7) Angular JS (15) article (10) Article Of The Day (13) Asp.Net (14) Azure (65) Azure DevOps (10) Azure Function (10) Azure IoT (7) C# (17) c-sharp corner (13) Career Advice (11) chart (11) CSharp (7) CSS (7) CSS3 (6) HighChart (10) How To (9) HTML5 (10) HTML5 Chart (11) Interview (6) IoT (11) Javascript (10) JQuery (82) jquery functions (9) JQWidgets (15) JQX Grid (17) Json (7) Microsoft (8) MVC (20) MVP (9) MXChip (7) News (18) Office 365 (7) Products (10) SQL (20) SQL Server (15) Visual Studio (10) Visual Studio 2017 (7) VS2017 (7) Web API (12) Windows 10 (7) Wordpress (9)
  • .NET
  • Achievements
  • ADO.NET
  • Android
  • Angular
  • Arduino
  • Article Of The Day
  • ASP.NET
  • Asp.Net Core
  • Automobile
  • Awards
  • Azure
  • Azure CDN
  • azure devops
  • Blockchain
  • Blog
  • Browser
  • C-Sharp Corner
  • C#
  • Career Advice
  • Code Snippets
  • CodeProject
  • Cognitive Services
  • Cosmos DB
  • CSS
  • CSS3
  • Data Factory
  • Database
  • Docker
  • Drawings
  • Drill Down Chart
  • English
  • Excel Programming
  • Exporting
  • Facebook
  • Fun
  • Gadgets
  • GitHub
  • GoPro
  • High Map
  • HighChart
  • How to
  • HTML
  • HTML5
  • Ignite UI
  • IIS
  • Interview
  • IoT
  • JavaScript
  • JQuery
  • jQuery UI
  • JQWidgets
  • JQX Grid
  • Json
  • Knockout JS
  • Linux
  • Machine Learning
  • Malayalam
  • Malayalam Poems
  • MDX Query
  • Microsoft
  • Microsoft ADOMD
  • Microsoft MVP
  • Microsoft Office
  • Microsoft Technologies
  • Microsoft Windows
  • Microsoft Windows Server
  • Mobile
  • MongoDB
  • Monthly Winners
  • MVC
  • MVC Grid
  • MySQL
  • News
  • Node JS
  • npm
  • Number Conversions
  • October 2015
  • Office 365
  • Office Development
  • One Plus
  • Outlook
  • Page
  • PHP
  • Poems
  • PowerShell
  • Products
  • Q&A
  • Raspberry PI
  • React
  • SEO
  • SharePoint
  • Skype
  • Social Media
  • Software
  • Spire.Doc
  • Spire.PDF
  • Spire.XLS
  • SQL
  • SQL Server
  • SSAS
  • SSMS
  • Storage In HTML5
  • Stories
  • Third Party Software Apps
  • Tips
  • Tools
  • Translator Text
  • Uncategorized
  • Unit Testing
  • UWP
  • VB.Net
  • Videos
  • Virtual Machine
  • Visual Studio
  • Visual Studio 2017
  • Wamp Server
  • Web API
  • Web Platform Installer
  • Webinars
  • WebMatrix
  • Windows 10
  • Windows 7
  • Windows 8.1
  • Wordpress
  • Writing

ABOUT ME

I am Sibeesh Venu, an engineer by profession and writer by passion. Microsoft MVP, Author, Speaker, Content Creator, Youtuber, Programmer. If you would like to know more about me, you can read my story here.

Contact Me

  • info@sibeeshpassion.com

Pages

  • About
  • Search
  • Privacy Policy
  • About
  • Search
  • Privacy Policy
© Copyright Sibeesh Passion 2014-2025. All Rights Reserved.
Go to mobile version