(upbeat music)
Hello and welcome.
Please enjoy this short readiness video
on Azure Database for MySQL.
Hi Colin, how are you doing today?
I'm good.
Thank you, Sanjay.
All right, well, good to have you on the show.
Thank you.
So let's get started.
What are you going to talk about?
So I'm going to talk about migrating MySQL
on-prem to Azure and some of the tools and processes
and tips and tricks.
All right, let's get started.
Okay.
So first I'll just cover a couple of slides
like why people migrate.
So there's lots and lots
of reasons people migrate.
Sometimes it's you're running out of capacity on-prem.
You want to get out of managing your on-prem hardware,
supporting OS's, compliance issues,
you know, you need to take advantage
of new compliance regulations.
Microsoft Azure has 90 plus.
You know, you want more advanced security.
It's all built into Azure.
I see.
So there's lots and lots of reasons
for your applications,
whether it's eCommerce, retail, web and mobile applications
running on MySQL today.
And what is all the tools
that we provide to make it easy?
Yeah, so some of the tools we provide
I think are, there's obviously open source ones
like the MySQL Workbench,
or there's tools like Azure Database Migration services
to help you migrate from on-prem to the cloud.
Okay.
So lots of reasons to migrate,
why each will trigger a migration.
We think Azure Database for MySQL is a great platform.
As a service it's the fully managed community for MySQL.
We've covered this in--
Yes we have.
A few other sessions.
All to scale and security compliance.
So I'll just gloss over this slide a little bit.
There's all the value add of running
this managed service in Azure.
So the first place to land
is really the Azure Database Migration Guide.
Here you can see the URL, datamigration.microsoft.com.
This has all the migration steps,
the detailed steps, for different workloads,
different databases migrating to Azure.
And here you'll find MySQL and all the steps,
the key steps.
So these will be broken down to three sections,
like the Pre-Migration where you set everything,
your workload.
You go through your schemas, your tables,
figuring out some tips and tricks
like, you know, do you have some older tables
then some little tips to move them to a new schema,
to a new table type, alter table,
and you can just do the engine equals
the new type of engine.
Same with migration then.
Then you're doing all the migration services
and using some of the tools like MySQL Workbench
to do a dump and restore.
It takes you through the process of,
do you do it online or offline?
So again, you're assessing your workload
to the size of your database and,
like if it's 150 gig or less and it's not mission critical
in terms of, it could be down for a short period of time,
you could just use opensource tools.
I see.
And just do a dump and restore,
moving it to Azure SQL to Azure Database for MySQL.
If it's more mission critical,
then you'd want to go to the online approach
where some of our tools come into play.
Like the retail scenario
you were talking about before?
Correct.
I think those are the two main options to assess.
I think--
The DRS right?
The same tools we use for Postgre SQL or SQL Server
are the same tools for this?
Correct.
It's the same tool.
Okay.
The same tool.
And then there are other tools as well
for your application like Azure Migrate,
we're not covering here today,
which will help you with your application migration as well.
If it's running on-prem,
moving that to the cloud.
So I'm gonna go straight into the demo.
I'll just cover the demo concepts.
I think this may have been covered earlier,
but if you've got on-prem MySQL,
the first thing we'll do
is we'll migrate our initial load.
So that would be doing the--
Just the schema.
Just the schema, then also the initial data.
So we'll just snap all the data using a dump
and then a restore to migrate that.
Then we run DMS.
So this is doing a continuous sync.
So it's doing our logs and it's continuously replicating
to our new target once we start Azure's SQL database.
So like basically new customers coming
into a store, still catching up.
We're still storing the information.
So your app is still running.
Nothing's changed on the application, still running.
Still routing to the on-prem SQL,
then at a certain point, you're going
to start to wind down your traffic
on your primary application
and you're going to stop new traffic coming in.
Then you're going to wait for that last batch within DMS
and do a cut over and then the last thing you'll want to do
is really just update your connection string.
So, you know, your mission critical application
can be down for just a matter of minutes
and you can do a pretty smooth cut over
for a mission critical app.
Just do it on the weekend.
Maybe give yourself maybe an hour or so
and you can do a cut over pretty quickly.
Fantastic.
Let's see this in action.
So, here I've got my test application.
This is the web app for Tasks, pretty simple.
This is actually online on our docs.
So what I'm gonna do,
I've got this all up and running in Azure at the moment.
I'm going to go to,
I've wrote down my initial steps one and two.
I'm gonna do the last step, which is my migration cut over.
So you've already copied
initial load, initial schema, and data, right?
Now you're, okay, doing the cut over.
Doing the cut over.
So here I'm going to start a new project
and you're gonna, bear with me, I'm gonna save--
Absolutely.
Take your time.
MySQL.
(keyboard clicking)
Nope.
There's my project.
I'm going to select my source
and this is My SQL on-prem.
We're gonna have a target.
It's going to be Azure Database for MySQL.
Is this a new DMS or the Wizard?
Is this a DMS?
This is DMS.
Okay.
So we're now running
Azure Database Migration Service.
Okay.
You've got a couple of choices here.
Online or offline.
I've got it set to online.
Yep.
And then we're gonna run our project.
And it tells you here to install MySQL Workbench.
You know, to do that initial load
of your schema and data.
So now I'm gonna just set up my source.
I have my cheat sheet here.
Of course, if it helps.
So, my source name.
I'm gonna jump backwards and forwards here.
So this is my source,
so I'm actually running MySQL on a Linux Box.
(keyboard clicking)
And my password...
It's pretty straightforward stuff.
And then the source.
Yeah so now we are connecting
to the on-prem MySQL or MySQL in the VM, you know?
Yeah so I've got this running in a VM.
This is just a Ubuntu box running MySQL.
And now we're gonna select our target.
So this is my previously provisioned
Azure Database for MySQL.
So I've previously provisioned this.
So here's my source.
You can see that's database.azure.com.
And my username.
And password for that.
And passwords do look complicated.
You didn't use password at one?
No, no.
I should've made it easier for myself
but I've got my little cheat sheet so it helps.
So it's fairly straightforward.
We've got five steps here.
Select the source, select the target.
Now it's connected to those.
We are going to select our sample database.
So this is one preselected so we're going
to move this sample DB.
And I'm going to save that.
And give it a name.
Yes.
(keyboard clicking)
So now we're going to run this activity.
So it's got everything set up.
So this takes a few minutes, so what it's doing now,
it's actually looking at all those transaction logs
on the source and it's copying over
the remaining ones of those to the target.
Okay.
So it's just populating that database
so we should be able to do a quick
refresh here in a minute.
And you can see it's initializing.
It's running this.
If I click on the database, so here you'd see,
if you were running many of them,
you'd see a whole list of your databases.
Still three minutes more to go.
Go ahead.
Yeah, so I'm just refreshing again.
I can see now it's completed.
That was a pretty small database actually.
So we can actually do the cut over
and you'll see, the key thing here
on the cut over is obviously this.
Your pending changes needs to be zero.
I see.
And then you'd select confirm
and then apply on your cut over.
I'm gonna jump back here now to the application.
So we'd do the cut over and then on your application
you'd obviously stop your application
just before you do that cut over
and then on my application, the last thing you do
while your primary app is down,
is you're just gonna change your connection stream.
So my application is running as an app service in Azure.
I would go to configuration.
Pretty straightforward stuff, this.
And in my connection stream and my host and my password
I would change these.
So if I go show values,
I'll just do one of them for you.
Here's my new connection string and password.
So my connection string here,
instead of being on-prem,
that would be my new connection string.
And that's it!
And then you'd restart the application
and then you're up and running.
Wow.
So, application will seamlessly move
from the previous VM database to the one in Azure.
Correct.
That's fantastic.
Any closing thoughts?
That's exciting.
By the way, that's so much easier
than it used to be before.
I skipped the prerequisites piece,
but again that's fairly easy.
There's lots of tools there.
There's all sorts of tools and services
from partners as well.
So, there's a documentation
and great docs on how to do all of this
and also that data migration guide there.
There's TCO calculators to help you
with the cost of ownership from moving
from on-prem to the cloud
and there's also lots of partners, actually,
to help you with tools and services
for doing post-migration,
like some of the performance testing and tuning
you'd need to do after migration.
Great to see a list of partners as well there.
Thank you so much, Colin, for all this great information.
Okay, thank you.
Thanks for watching this short Azure Readiness video.