DiscoverInside MySQL: Sakila SpeaksMySQL Shell Does All The Things!
MySQL Shell Does All The Things!

MySQL Shell Does All The Things!

Update: 2024-05-07
Share

Description

For this episode, Fred and Scott are joined by Miguel Araujo, Senior Principal Software Engineer for MySQL Shell. Miguel outlines MySQL Shell's history and discusses its more popular and powerful features. The conversation winds down with us discussing our favorite features.

---------------------------------------------------------

Episode Transcript:

00;00;09;13 - 00;00;30;16
Welcome to Inside MySQL: Sakila Speaks, a podcast dedicated to all things MySQL. We bring you the latest news from the MySQL team, MySQL product updates and insightful interviews with members of the MySQL community. Sit back and enjoy as your hosts bring you the latest updates on your favorite open-source database. Let's get started.
 
00;00;30;20 - 00;01;01;11
Hello and welcome to Sakila Speaks, the podcast dedicated to MySQL. I'm leFred and I'm Scott Stroz. I know today's guest for a long time already has had the chance to work with them on several solutions. Please welcome Miguel Araujo, Senior Principal software Engineer on the MySQL Shell Team. Miguel is the technical lead developer of the Admin API, core component of the HA and the replication solutions like the MySQL InnoDB Cluster MySQL InnoDB replica set and MYSQL InnoDB cluster set.
 
00;01;01;28 - 00;01;25;07
Welcome, Miguel. Hey guys. Thanks for inviting me to this podcast. So, Miguel, we want you to talk about MySQL Shell. Can you give us a high-altitude overview of what MySQL Shell is? Basically, what it is, who should be using it and why? So first and foremost, Shell is the command client for my SQL Server, right?
 
00;01;25;21 - 00;01;50;28
You can do with Shell what you could do with a classic MySQL client. So, you connect to a server to my SQL server and it can run queries on it using SQL. But Shell is much, much more than that. It's a... we like to call it a modern advanced command client for MySQL server, and maybe I should get a little quick history lesson about it.
 
00;01;50;28 - 00;02;27;00
So, Shell came out with... there was a purpose to build this new command client and this kick comes back to 2016. If I recall correctly, when the document store was being developed and implemented. And with MySQL Doc Strore we have created this new API to interact with it, the X-dev API, and this X-Dev API follow the common standards and this was implemented in JavaScript in Python, and for that we needed a new shell, a new command line client to interact with the server and speak.
 
00;02;27;10 - 00;03;05;16
This is new API and interact with the Doc Store. So, for that we create this shell with the with implementation of the X-Dev API exposed in JavaScript and Python. So Shell was born with a with this multi-language support so SQL classic and then JavaScript in Python and in the beginning with with the X-Dev API exposed to those two languages. But we also built it as a modern interface, so it has a customizable and reactive prompt.
 
00;03;05;29 - 00;03;32;21
It has auto-completion, syntax highlight. It has a built-in help system. So, it's built as the for example, we have in Linux bash or the Shell or on Shell or whatever or in Windows PowerShell and Shell can be seen as something like that. But for MySQL, so you started your shell, you can run commands in it, you can connect to instances and operate on them.
 
00;03;32;21 - 00;04;06;21
So, it has this interact interface and also a scripting interface because since you have support for those languages, for JavaScript Python and SQL you can write your own scripts and then you can execute them in in Shell. And a another general feature ... most known and, and useful are the APIs built in. So I was just mentioning the X-Dev API that was the first one.
 
00;04;07;07 - 00;04;37;05
And then we of we have introduced the Shell API and the utilities and then the Admin API and the so starting with the Shell API, for example, we have operating system utilities. You can create reports, you can create plugins. The utilities include things such as the upgrade checker that is a utility built in shell that you can use to verify whether your server is ready to be upgraded to the new version.
 
00;04;37;20 - 00;05;09;05
And if not, what needs to be done. You have things as dump and load to dump instances and load them. This is very fast. It's it's very loved by the community and the Admin API that is used to deploy MySQL architectures like Fred said in the beginning – InnoDB cluster states replica set and so on. And also Shell is extensible, can write plugins for it and that's something great.
 
00;05;09;05 - 00;05;35;10
And that's one of the things that makes it a modern client. Yeah, to be honest, I am a very fan of Shell. It replaced the old MySQL client for me, the classic one I always use Shell everywhere. And so recently during the MySQL Belgium days, who you are there, you were speaking also about Shell. Many people like Booking.com and Canonical guys.
 
00;05;35;18 - 00;05;58;14
They praised MySQL shell. They use it, they love it, and especially the admin API. So let me ask you a personal question. As the Admin API is your baby, are you proud of that? Oh yeah, I am. And it's it's you know, it's one of the most rewarding things that you can get as a as a software engineer is to to get this kind of feedback from the user.
 
00;05;58;14 - 00;06;34;08
So, I know now that I didn't waste seven years coding this thing for nobody to use. It's I don't know that there's a lot of people happy with it and lots of users and, and people like Booking.com or Canonical using it. It's, it's, it's really motivating. It's, it's really rewarding. So, I'm quite, quite happy about it. And and not only that they, they are users there but they use it extensively and they have huge deployments and the kind of feedback you get from those those users, it's it's it's great.
 
00;06;35;03 - 00;07;02;09
It validates many of our decisions and invalidates others and provides feedback to make things better for the future. So, it's it's really it's really great, really happy. So as a developer myself, I can appreciate the the feeling of hearing that other people like what you've created. So, congratulations on that. Yeah, thanks. Now, you and Fred have have both talked about the admin API.
 
00;07;02;24 - 00;07;44;10
Can you give our listeners some details about the API and what can be done with it? And is there any functionality in the API that maybe hasn't been implemented yet? Okay. So again, a bit of historical context. So, MySQL has had support for replication for a very, very long time. Right? There was the asynchronous classic replication and before we put before Shell and the other API DBA and, and sysadmins and so on, they, they had to deploy those replication topologies manually.
 
00;07;44;20 - 00;08;18;09
And that involved a lot of steps, manual steps. It involved a lot of scripting, automation, monitoring and so on. And that's led to many customized, customized solutions, lots of deviations and lots of work for this. These people maintaining those architectures. And then in 2016, 2015 of them remember exactly the group replication was being developed and it came out as a preview.
 
00;08;19;17 - 00;08;50;17
And with that we thought. So, we have Shell, we can write APIs in Shell, we can manage instances of MySQL, so, let's do something to help users to deploy MySQL architectures. So back then, architecture based on group replication and asynchronous replication. And let's make an API to make that super easy to deploy, super easy to maintain and ...and to monitor.
 
00;08;51;01 - 00;09;19;28
And this is how the Admin API was born. Initially we focused on group replication because this brought a lot of great things, such as out of a lower consistency network, partition handling and so on. So that was the first focus and we, we've, we've developed the API with that in mind because group replication wasn't and still can be tricky to deploy and maintain.
 
00;09;20;15 - 00;09;48;07
And with the Admin API with just two or three commands, you can have your cluster up and running. It's very easy and it's very, very straightforward and it's pleasant. We tried to focus on usability a lot to make the experience pleasant, but also it's you're also it's powerful in the sense that you also can do things and configure things to the data.
 
00;09;48;07 - 00;10;34;13
So, so the Admin API was born from that need. And we, we introduced the support for InnoDB Cluster, but then we also added support for sandbox management. So, you can deploy sandboxes to test the solutions before going into production. You have things to help you configure the instances to be ready for the MySQL architectures. So, with a single command you can connect to an instance and the command will tell you some instances where they are not in the sense of if if the right configurations are in place and if they are not, you have another command that will just apply them for you.
 
00;10;34;17 - 00;11;22;26
So crazy. You also can create accounts to manage the topologies and then you have the whole set of commands to deploy InnoDB cluster, InnoDB replica set, cluster set. And the last addition is read replicas. We have integrated the whole thing and we have also integrated provisioning. So, for example, when you add an instance to a cluster, we will take a look at the GTID sets and the replications, the status of the data sets and so on, and we will guide the users to to the right provisioning method either based on replication or clone, and Shell will automate everything for you.
 
00;11;22;27 - 00;11;53;29<br /

Comments 
loading
00:00
00:00
1.0x

0.5x

0.8x

1.0x

1.25x

1.5x

2.0x

3.0x

Sleep Timer

Off

End of Episode

5 Minutes

10 Minutes

15 Minutes

30 Minutes

45 Minutes

60 Minutes

120 Minutes

MySQL Shell Does All The Things!

MySQL Shell Does All The Things!

Oracle Corporation