SlideShare a Scribd company logo
Frédéric Descamps
Community Manager
MySQL
MySQL Shell for Visual Studio
Code
a new client for developers and DBAs
Who am I ?
about.me/lefred
Copyright @ 2022 Oracle and/or its affiliates.
2
@lefred
MySQL Evangelist
using MySQL since version 3.20
devops believer
likes 🏀
living in
h ps://lefred.be
Frédéric Descamps
Copyright @ 2022 Oracle and/or its affiliates.
3
Why Visual Studio Code ?
IDE
Copyright @ 2022 Oracle and/or its affiliates.
4
MySQL Shell for VS Code
Copyright @ 2022 Oracle and/or its affiliates.
5
Visual Studio Code is the most
popular IDE with developers
MySQL Shell for VS Code
Copyright @ 2022 Oracle and/or its affiliates.
5
MySQL Shell for VS Code
We want to o er a single interface to the developers and and the operators/DBAs.
Copyright @ 2022 Oracle and/or its affiliates.
6
MySQL Shell for VS Code
We want to o er a single interface to the developers and and the operators/DBAs.
A place where MySQL Workbench and MySQL Shell can merge.
Copyright @ 2022 Oracle and/or its affiliates.
6
Installation
Easy to install & secure
Copyright @ 2022 Oracle and/or its affiliates.
7
MySQL Shell for VS Code - Installation
The installation is very simple using Visual Studio Code's Marketplace:
Copyright @ 2022 Oracle and/or its affiliates.
8
MySQL Shell for VS Code - Installation
Or just use CTRL-P in Visual Studio code and paste the following command:
ext install Oracle.mysql-shell-for-vs-code
Copyright @ 2022 Oracle and/or its affiliates.
9
MySQL Shell for VS Code - Requirements
The list of requirements is pre y short:
Visual Studio Code >= 1.63.0
Windows 64bit or 32bit OR Linux 64 bit OR macOSX 10.11+
(optional) MySQL Shell >= 8.0.28
Copyright @ 2022 Oracle and/or its affiliates.
10
MySQL Shell for VS Code - Installation: certi cates
The rst time the extension is installed, the setup wizard is started to generate certi cates.
Those certi cates are installed on your local user account in order to securely access
MySQL Shell.
Copyright @ 2022 Oracle and/or its affiliates.
11
MySQL Shell for VS Code - Installation: certi cates
You need to install them or the extension won't work properly:
Copyright @ 2022 Oracle and/or its affiliates.
12
MySQL Shell for VS Code - Linux
This is a demo on Linux:
Copyright @ 2022 Oracle and/or its affiliates.
13
MySQL Shell for VS Code - under the hood
The certi cates, log le and some data are stored in the ~/.mysqlsh-gui directory:
Copyright @ 2022 Oracle and/or its affiliates.
14
Features
overview
Copyright @ 2022 Oracle and/or its affiliates.
15
MySQL Shell for VS Code
Copyright @ 2022 Oracle and/or its affiliates.
16
Activity Bar's
Icon & View
Container.
The view container
appears as an icon in
the activity bar after
you install the MySQL
Shell for VS Code
extension.
MySQL Shell for VS Code
Copyright @ 2022 Oracle and/or its affiliates.
17
Database Editor
Connections
View
This is where you can
create and manage
connections to MySQL
servers and MySQL
HeatWave
MySQL Shell for VS Code
Copyright @ 2022 Oracle and/or its affiliates.
18
OCI and MySQL
HeatWave View
Con gure the Oracle
Cloud Instrastructure
pro le and access
your resources.
MySQL Shell for VS Code
Copyright @ 2022 Oracle and/or its affiliates.
19
MySQL Shell
Sessions View
This is the place where
you can create and
manage MySQL Shell
sessions.
MySQL Shell for VS Code
Copyright @ 2022 Oracle and/or its affiliates.
20
MySQL Shell
Tasks View
Here you can see all
ongoing tasks for
MySQL Shell.
MySQL Shell for VS Code
Copyright @ 2022 Oracle and/or its affiliates.
21
SQL Notebook
SQL Notebook is an
embedded, console-
type editor, which
combines elements of
a classic terminal and
a visual editor.
MySQL Shell for VS Code
Copyright @ 2022 Oracle and/or its affiliates.
22
MySQL Shell
Console
MySQL Shell GUI
Console provides the
full power of the
MySQL Shell inside a
notebook- interface-
styled editor
MySQL Shell for VS Code
Copyright @ 2022 Oracle and/or its affiliates.
23
VScode ouput,
debug,
terminal...
This is the standard panel of VS
code with an embedded terminal,
the debug console and the output.
MySQL Shell and MySQL Shell
Tasks have their own output that
can be selected. This is very useful
when debuging the extension.
MySQL Shell for VS Code
Copyright @ 2022 Oracle and/or its affiliates.
24
This editor supports 3 languages:
SQL
JavaScript
TypeScript
2 protocols are supported:
classic MySQL protocol (3306)
X Protocol (mysqlx) (33060)
MySQL Shell for VS Code - SQL Notebook
The SQL Notebook editor is the default editor each time you establish a connection to
MySQL (or SQLite).
Copyright @ 2022 Oracle and/or its affiliates.
25
MySQL Shell for VS Code - SQL Notebook
The SQL Notebook editor combines the best of the GUI editors and the command line
clients.
You can see it like a endless document where each commands (called prompt) is followed
by a result area (output) that is linked to it.
If you have multiple statements, the output area will contains multiple tabs:
Copyright @ 2022 Oracle and/or its affiliates.
26
MySQL Shell for VS Code - SQL Notebook
The commands can be modi ed ad in nitum: you can croll up and down in the document
and change all statements any time.
The editor provides command completion:
Copyright @ 2022 Oracle and/or its affiliates.
27
MySQL Shell for VS Code - SQL Notebook
We have also added a graphs capabilities (work in progress) in TypeScript. Currently
PieGraph() is available:
Copyright @ 2022 Oracle and/or its affiliates.
28
MySQL Shell for VS Code - SQL Notebook (cool)
MySQL Shell is integrated to VS code also when you edit other les:
Copyright @ 2022 Oracle and/or its affiliates.
29
You can select any
SQL statement in your
code and execute it
the SQL Notebook
MySQL Shell for VS Code - SQL Notebook (cool)
Copyright @ 2022 Oracle and/or its affiliates.
30
MySQL Shell for VS Code - SQL Notebook (cool)
It gets executed in a new block (prompt + output):
Copyright @ 2022 Oracle and/or its affiliates.
31
MySQL Shell for VS Code - SQL Notebook (cool)
You can modify your query and test it. When ready send it back modi ed to the code:
Copyright @ 2022 Oracle and/or its affiliates.
32
MySQL Shell for VS Code - SQL Notebook (cool)
Done ! This is a very cool feature for developers !
Copyright @ 2022 Oracle and/or its affiliates.
33
It supports 3 languages:
SQL
JavaScript
Python
2 protocols are supported:
classic MySQL protocol (3306)
X Protocol (mysqlx) (33060)
MySQL Shell for VS Code - MySQL Shell Console
The MySQL Shell Consoles view allows you to have dedicated area for working with
multiple MySQL Shell sessions.
This is exacly like the usual temrinal MySQL Shell but in VS code:
Copyright @ 2022 Oracle and/or its affiliates.
34
MySQL Shell for VS Code - MySQL Shell Console
The AdminAPI is available when using MySQL Shell Console session. Same for the utilities:
Copyright @ 2022 Oracle and/or its affiliates.
35
You also have the possibility to connect to
your MySQL HeatWave instances using the
Bastion Service that the extension will
deploy and con gure for you !
MySQL Shell for VS Code - OCI
If you are using OCI, MySQL Shell for VS Code is your best companion.
It uses by default all con guration pro les de ned in ~/.oci/con g le.
You have the possibility to see all your MySQL HeatWave instances but also other resources
like compute instances.
Copyright @ 2022 Oracle and/or its affiliates.
36
MySQL Shell for VS Code - OCI
If no bastion host is present, a new one will be created:
Copyright @ 2022 Oracle and/or its affiliates.
37
MySQL Shell for VS Code - OCI
Copyright @ 2022 Oracle and/or its affiliates.
38
MySQL Shell for VS Code - OCI
MySQL Shell Dump & Load utility is integrated and optimized for OCI MySQL HeatWave
service:
Copyright @ 2022 Oracle and/or its affiliates.
39
MySQL Shell for VS Code - OCI
Copyright @ 2022 Oracle and/or its affiliates.
40
MySQL Shell for VS Code - OCI
Copyright @ 2022 Oracle and/or its affiliates.
41
MySQL Shell for VS Code - OCI
Copyright @ 2022 Oracle and/or its affiliates.
42
MySQL Shell for VS Code - se ings
You have the possibility to modify some se ings for the extension (numbers of records in
paging, capitalize the SQL commands, ...)
Copyright @ 2022 Oracle and/or its affiliates.
43
Components
How does it work
Copyright @ 2022 Oracle and/or its affiliates.
44
MySQL Shell for VS Code
The MySQL Shell for VS Code extension is composed of multiple elements that are
interconnected:
the VS code extension
an embedded MySQL Shell
a MySQL Shell GUI plugin
starting a webserver
using a secure SSL connection via the certi cate created during installation
Copyright @ 2022 Oracle and/or its affiliates.
45
This is the reason why the extension can be
downloaded for di erent Operating
Systems and architecture:
MySQL Shell for VS Code - embedded Shell
The extension contains MySQL Shell, so there is no need to install MySQL Shell to use the
extension in VS code.
   
   
   
   
    On Linux that MySQL Shell is available on
~/.vscode/extensions/oracle.mysql-shell-for-vs-code-1.1.8-linux-
x64/shell/bin/mysqlsh
If you run it manually it uses your default ~/.mysqlsh directory for con guration, prompt,
history,...
Copyright @ 2022 Oracle and/or its affiliates.
46
MySQL Shell for VS Code - Webserver
As soon as you start VS code, if you have the MySQL Shell for VS Code extension installed,
the embedded MySQL Shell will start its own webserver:
Copyright @ 2022 Oracle and/or its affiliates.
47
MySQL Shell for VS Code - Webserver
As soon as you start VS code, if you have the MySQL Shell for VS Code extension installed,
the embedded MySQL Shell will start its own webserver:
For example, the SQL Notebook connects to that webserver. For mysql-blue[My]SQL Shell
Console, it's di erent, a new instance of MySQL Shell is used:
Copyright @ 2022 Oracle and/or its affiliates.
47
MySQL Shell for VS Code - Webserver
When started by the extension, MySQL Shell's GUI Webinterface is protected and works only
in VS code:
Copyright @ 2022 Oracle and/or its affiliates.
48
MySQL Shell for VS Code - Webserver
Copyright @ 2022 Oracle and/or its affiliates.
49
MySQL Shell for VS Code - Webserver
If you have a user it will work, if not, you need to create one.
Copyright @ 2022 Oracle and/or its affiliates.
50
MySQL Shell for VS Code - Webserver
And you can then connect using of those users:
Copyright @ 2022 Oracle and/or its affiliates.
51
How can I help ?
Test and report bugs
Copyright @ 2022 Oracle and/or its affiliates.
52
MySQL Shell for VS Code - helping
The best way to help this new extension for Visual Studio Code is to test it actively and to
report bugs. Directly from VS code:
Copyright @ 2022 Oracle and/or its affiliates.
53
MySQL Shell for VS Code - helping
Or ling a bug directly on h ps://bugs.mysql.com/ :
Copyright @ 2022 Oracle and/or its affiliates.
54
More
What about my MySQL Shell plugins ?
Copyright @ 2022 Oracle and/or its affiliates.
55
What about MySQL Shell plugins ?
When we released the extension, people started asking about the MySQL Shell plugins they
were using with MySQL Shell in Terminal.
Can they still be used with MySQL Shell for Visual Studio code ?
Copyright @ 2022 Oracle and/or its affiliates.
56
What about MySQL Shell plugins ?
When we released the extension, people started asking about the MySQL Shell plugins they
were using with MySQL Shell in Terminal.
Can they still be used with MySQL Shell for Visual Studio code ?
YES !
Copyright @ 2022 Oracle and/or its affiliates.
56
Plugins in MySQL Shell for VS Code
You just need to copy your plugins in the appropriate directory.
On Linux:
/home/fred/.mysqlsh-
gui/plugin_data/gui_plugin/shell_instance_home/plugins
On Windows:
Copyright @ 2022 Oracle and/or its affiliates.
57
Plugins in MySQL Shell for VS Code
Once installed you can access them using the MySQL Shell Console. Plugins are not
available in SQL Notebook:
Copyright @ 2022 Oracle and/or its affiliates.
58
Plugins in MySQL Shell for VS Code - example
Copyright @ 2022 Oracle and/or its affiliates.
59
Plugins in MySQL Shell for VS Code - example
Copyright @ 2022 Oracle and/or its affiliates.
60
Plugins in MySQL Shell for VS Code - example
Copyright @ 2022 Oracle and/or its affiliates.
61
Plugins in MySQL Shell for VS Code - example
Copyright @ 2022 Oracle and/or its affiliates.
62
Plugins in MySQL Shell for VS Code - example
Copyright @ 2022 Oracle and/or its affiliates.
63
Plugins in MySQL Shell for VS Code - example
Copyright @ 2022 Oracle and/or its affiliates.
64
Plugins in MySQL Shell for VS Code - modules
If you are missing Python modules like this:
Copyright @ 2022 Oracle and/or its affiliates.
65
Plugins in MySQL Shell for VS Code - modules
Pip can be used with MySQL Shell to install the missing module:
Copyright @ 2022 Oracle and/or its affiliates.
66
Plugins in MySQL Shell for VS Code - modules
Copyright @ 2022 Oracle and/or its affiliates.
67
Plugins in MySQL Shell for VS Code
You can nd many plugins in this GitHub repository:
h ps://github.com/lefred/mysqlshell-plugins
(*) some layout output can be incompatible
Copyright @ 2022 Oracle and/or its affiliates.
68
Percona Live 2022 - MySQL Shell for Visual Studio Code
Share your ❤to MySQL
#mysql
Join our slack channel!
bit.ly/mysql-slack
Copyright @ 2022 Oracle and/or its affiliates.
70
Questions ?
Copyright @ 2022 Oracle and/or its affiliates.
71

More Related Content

PDF
State of the Dolphin - May 2022
PDF
MySQL Connectors 8.0.19 & DNS SRV
PDF
Percona Live 2022 - MySQL Architectures
PDF
LinuxFest Northwest 2022 - The Evolution of a MySQL Database System
PDF
MySQL Document Store를 활용한 NoSQL 개발
PPTX
Meetup 23 - 02 - OVN - The future of networking in OpenStack
PDF
Benefits of Stream Processing and Apache Kafka Use Cases
PPTX
Ceph Performance and Sizing Guide
State of the Dolphin - May 2022
MySQL Connectors 8.0.19 & DNS SRV
Percona Live 2022 - MySQL Architectures
LinuxFest Northwest 2022 - The Evolution of a MySQL Database System
MySQL Document Store를 활용한 NoSQL 개발
Meetup 23 - 02 - OVN - The future of networking in OpenStack
Benefits of Stream Processing and Apache Kafka Use Cases
Ceph Performance and Sizing Guide

What's hot (20)

PPTX
Deep Dive into Apache Kafka
PDF
MySQL Database Architectures - High Availability and Disaster Recovery Solution
PDF
MySQL InnoDB Cluster - New Features in 8.0 Releases - Best Practices
PDF
MySQL Shell for DBAs
PDF
ProxySQL High Avalability and Configuration Management Overview
PDF
Sql server 2019 new features
PDF
Disaster Recovery Options Running Apache Kafka in Kubernetes with Rema Subra...
PDF
NGINX: Basics and Best Practices EMEA
PDF
MySQL Shell for Database Engineers
PDF
DevJam 2019 - Introduction to Kubernetes
PDF
Scaling your Data Pipelines with Apache Spark on Kubernetes
PDF
Kubernetes Secrets Management on Production with Demo
PDF
OpenShift 4, the smarter Kubernetes platform
PDF
(Declarative) Jenkins Pipelines
PDF
OpenShift-Technical-Overview.pdf
PPTX
Enable DPDK and SR-IOV for containerized virtual network functions with zun
PDF
Oracle Real Application Clusters 19c- Best Practices and Internals- EMEA Tour...
PDF
Database automation guide - Oracle Community Tour LATAM 2023
PPTX
NGINX: High Performance Load Balancing
Deep Dive into Apache Kafka
MySQL Database Architectures - High Availability and Disaster Recovery Solution
MySQL InnoDB Cluster - New Features in 8.0 Releases - Best Practices
MySQL Shell for DBAs
ProxySQL High Avalability and Configuration Management Overview
Sql server 2019 new features
Disaster Recovery Options Running Apache Kafka in Kubernetes with Rema Subra...
NGINX: Basics and Best Practices EMEA
MySQL Shell for Database Engineers
DevJam 2019 - Introduction to Kubernetes
Scaling your Data Pipelines with Apache Spark on Kubernetes
Kubernetes Secrets Management on Production with Demo
OpenShift 4, the smarter Kubernetes platform
(Declarative) Jenkins Pipelines
OpenShift-Technical-Overview.pdf
Enable DPDK and SR-IOV for containerized virtual network functions with zun
Oracle Real Application Clusters 19c- Best Practices and Internals- EMEA Tour...
Database automation guide - Oracle Community Tour LATAM 2023
NGINX: High Performance Load Balancing
Ad

Similar to Percona Live 2022 - MySQL Shell for Visual Studio Code (20)

PDF
the State of the Dolphin - October 2020
PDF
MySQL Shell - the best DBA tool ?
PDF
MySQL Cluster 8.0 tutorial
PDF
Les nouveautés de MySQL 8.0
PDF
State of the Dolphin 2020 - 25th Anniversary of MySQL with 8.0.20
PDF
MySQL Shell: the best DBA tool !
PDF
Pi Day 2022 - from IoT to MySQL HeatWave Database Service
PDF
MySQL Database Service Webinar: Installing Drupal in oci with mds
PDF
MySQL Shell - The Best MySQL DBA Tool
PDF
UAE MySQL Users Group Meet-up : MySQL Shell Document Store & more...
PDF
MySQL Day Roma - MySQL Shell and Visual Studio Code Extension
PDF
MySQL Database Service Webinar: Upgrading from on-premise MySQL to MDS
PDF
Compiling OpenSSL For Windows
PDF
Les nouveautés de MySQL 8.0
PDF
Deploying Magento on OCI with MDS
PDF
State of The Dolphin - May 2021
PDF
RivieraJUG - MySQL 8.0 - What's new for developers.pdf
PDF
MySQL 8.0 InnoDB Cluster - Easiest Tutorial
PPTX
DataDrivenMtl 20170906 - SQL Server 2017 on Linux
PDF
MySQL docker with demo by Ramana Yeruva
the State of the Dolphin - October 2020
MySQL Shell - the best DBA tool ?
MySQL Cluster 8.0 tutorial
Les nouveautés de MySQL 8.0
State of the Dolphin 2020 - 25th Anniversary of MySQL with 8.0.20
MySQL Shell: the best DBA tool !
Pi Day 2022 - from IoT to MySQL HeatWave Database Service
MySQL Database Service Webinar: Installing Drupal in oci with mds
MySQL Shell - The Best MySQL DBA Tool
UAE MySQL Users Group Meet-up : MySQL Shell Document Store & more...
MySQL Day Roma - MySQL Shell and Visual Studio Code Extension
MySQL Database Service Webinar: Upgrading from on-premise MySQL to MDS
Compiling OpenSSL For Windows
Les nouveautés de MySQL 8.0
Deploying Magento on OCI with MDS
State of The Dolphin - May 2021
RivieraJUG - MySQL 8.0 - What's new for developers.pdf
MySQL 8.0 InnoDB Cluster - Easiest Tutorial
DataDrivenMtl 20170906 - SQL Server 2017 on Linux
MySQL docker with demo by Ramana Yeruva
Ad

More from Frederic Descamps (16)

PDF
MySQL Innovation & Cloud Day - Document Store avec MySQL HeatWave Database Se...
PDF
RivieraJUG - MySQL Indexes and Histograms
PDF
MySQL User Group NL - MySQL 8
PDF
Percona Live 2022 - The Evolution of a MySQL Database System
PDF
Open Source 101 2022 - MySQL Indexes and Histograms
PDF
Confoo 2022 - le cycle d'une instance MySQL
PDF
FOSDEM 2022 MySQL Devroom: MySQL 8.0 - Logical Backups, Snapshots and Point-...
PDF
MySQL Router REST API
PDF
From single MySQL instance to High Availability: the journey to MySQL InnoDB ...
PDF
Cloud native - Why to use MySQL 8.0 and how to use it on oci with MDS
PDF
MySQL 8.0 Document Store - Discovery of a New World
PDF
Oracle Developer Live: Deploying MySQL InnoDB Cluster on OCI with Terraform
PDF
MySQL Database Service Webinar - Installing WordPress in OCI with MDS
PDF
MySQL Day Virtual: Best Practices Tips - Upgrading to MySQL 8.0
PDF
MySQL Tech Café #8: MySQL 8.0 for Python Developers
PDF
OpenExpo Virtual Experience 2020: MySQL 8.0 Document Store - Discovery of a n...
MySQL Innovation & Cloud Day - Document Store avec MySQL HeatWave Database Se...
RivieraJUG - MySQL Indexes and Histograms
MySQL User Group NL - MySQL 8
Percona Live 2022 - The Evolution of a MySQL Database System
Open Source 101 2022 - MySQL Indexes and Histograms
Confoo 2022 - le cycle d'une instance MySQL
FOSDEM 2022 MySQL Devroom: MySQL 8.0 - Logical Backups, Snapshots and Point-...
MySQL Router REST API
From single MySQL instance to High Availability: the journey to MySQL InnoDB ...
Cloud native - Why to use MySQL 8.0 and how to use it on oci with MDS
MySQL 8.0 Document Store - Discovery of a New World
Oracle Developer Live: Deploying MySQL InnoDB Cluster on OCI with Terraform
MySQL Database Service Webinar - Installing WordPress in OCI with MDS
MySQL Day Virtual: Best Practices Tips - Upgrading to MySQL 8.0
MySQL Tech Café #8: MySQL 8.0 for Python Developers
OpenExpo Virtual Experience 2020: MySQL 8.0 Document Store - Discovery of a n...

Recently uploaded (20)

PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Encapsulation theory and applications.pdf
PDF
KodekX | Application Modernization Development
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPT
Teaching material agriculture food technology
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
Mobile App Security Testing_ A Comprehensive Guide.pdf
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Network Security Unit 5.pdf for BCA BBA.
20250228 LYD VKU AI Blended-Learning.pptx
Encapsulation theory and applications.pdf
KodekX | Application Modernization Development
Advanced methodologies resolving dimensionality complications for autism neur...
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Per capita expenditure prediction using model stacking based on satellite ima...
Spectral efficient network and resource selection model in 5G networks
Understanding_Digital_Forensics_Presentation.pptx
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Chapter 3 Spatial Domain Image Processing.pdf
Dropbox Q2 2025 Financial Results & Investor Presentation
Encapsulation_ Review paper, used for researhc scholars
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Teaching material agriculture food technology
Building Integrated photovoltaic BIPV_UPV.pdf

Percona Live 2022 - MySQL Shell for Visual Studio Code

  • 1. Frédéric Descamps Community Manager MySQL MySQL Shell for Visual Studio Code a new client for developers and DBAs
  • 2. Who am I ? about.me/lefred Copyright @ 2022 Oracle and/or its affiliates. 2
  • 3. @lefred MySQL Evangelist using MySQL since version 3.20 devops believer likes 🏀 living in h ps://lefred.be Frédéric Descamps Copyright @ 2022 Oracle and/or its affiliates. 3
  • 4. Why Visual Studio Code ? IDE Copyright @ 2022 Oracle and/or its affiliates. 4
  • 5. MySQL Shell for VS Code Copyright @ 2022 Oracle and/or its affiliates. 5
  • 6. Visual Studio Code is the most popular IDE with developers MySQL Shell for VS Code Copyright @ 2022 Oracle and/or its affiliates. 5
  • 7. MySQL Shell for VS Code We want to o er a single interface to the developers and and the operators/DBAs. Copyright @ 2022 Oracle and/or its affiliates. 6
  • 8. MySQL Shell for VS Code We want to o er a single interface to the developers and and the operators/DBAs. A place where MySQL Workbench and MySQL Shell can merge. Copyright @ 2022 Oracle and/or its affiliates. 6
  • 9. Installation Easy to install & secure Copyright @ 2022 Oracle and/or its affiliates. 7
  • 10. MySQL Shell for VS Code - Installation The installation is very simple using Visual Studio Code's Marketplace: Copyright @ 2022 Oracle and/or its affiliates. 8
  • 11. MySQL Shell for VS Code - Installation Or just use CTRL-P in Visual Studio code and paste the following command: ext install Oracle.mysql-shell-for-vs-code Copyright @ 2022 Oracle and/or its affiliates. 9
  • 12. MySQL Shell for VS Code - Requirements The list of requirements is pre y short: Visual Studio Code >= 1.63.0 Windows 64bit or 32bit OR Linux 64 bit OR macOSX 10.11+ (optional) MySQL Shell >= 8.0.28 Copyright @ 2022 Oracle and/or its affiliates. 10
  • 13. MySQL Shell for VS Code - Installation: certi cates The rst time the extension is installed, the setup wizard is started to generate certi cates. Those certi cates are installed on your local user account in order to securely access MySQL Shell. Copyright @ 2022 Oracle and/or its affiliates. 11
  • 14. MySQL Shell for VS Code - Installation: certi cates You need to install them or the extension won't work properly: Copyright @ 2022 Oracle and/or its affiliates. 12
  • 15. MySQL Shell for VS Code - Linux This is a demo on Linux: Copyright @ 2022 Oracle and/or its affiliates. 13
  • 16. MySQL Shell for VS Code - under the hood The certi cates, log le and some data are stored in the ~/.mysqlsh-gui directory: Copyright @ 2022 Oracle and/or its affiliates. 14
  • 17. Features overview Copyright @ 2022 Oracle and/or its affiliates. 15
  • 18. MySQL Shell for VS Code Copyright @ 2022 Oracle and/or its affiliates. 16
  • 19. Activity Bar's Icon & View Container. The view container appears as an icon in the activity bar after you install the MySQL Shell for VS Code extension. MySQL Shell for VS Code Copyright @ 2022 Oracle and/or its affiliates. 17
  • 20. Database Editor Connections View This is where you can create and manage connections to MySQL servers and MySQL HeatWave MySQL Shell for VS Code Copyright @ 2022 Oracle and/or its affiliates. 18
  • 21. OCI and MySQL HeatWave View Con gure the Oracle Cloud Instrastructure pro le and access your resources. MySQL Shell for VS Code Copyright @ 2022 Oracle and/or its affiliates. 19
  • 22. MySQL Shell Sessions View This is the place where you can create and manage MySQL Shell sessions. MySQL Shell for VS Code Copyright @ 2022 Oracle and/or its affiliates. 20
  • 23. MySQL Shell Tasks View Here you can see all ongoing tasks for MySQL Shell. MySQL Shell for VS Code Copyright @ 2022 Oracle and/or its affiliates. 21
  • 24. SQL Notebook SQL Notebook is an embedded, console- type editor, which combines elements of a classic terminal and a visual editor. MySQL Shell for VS Code Copyright @ 2022 Oracle and/or its affiliates. 22
  • 25. MySQL Shell Console MySQL Shell GUI Console provides the full power of the MySQL Shell inside a notebook- interface- styled editor MySQL Shell for VS Code Copyright @ 2022 Oracle and/or its affiliates. 23
  • 26. VScode ouput, debug, terminal... This is the standard panel of VS code with an embedded terminal, the debug console and the output. MySQL Shell and MySQL Shell Tasks have their own output that can be selected. This is very useful when debuging the extension. MySQL Shell for VS Code Copyright @ 2022 Oracle and/or its affiliates. 24
  • 27. This editor supports 3 languages: SQL JavaScript TypeScript 2 protocols are supported: classic MySQL protocol (3306) X Protocol (mysqlx) (33060) MySQL Shell for VS Code - SQL Notebook The SQL Notebook editor is the default editor each time you establish a connection to MySQL (or SQLite). Copyright @ 2022 Oracle and/or its affiliates. 25
  • 28. MySQL Shell for VS Code - SQL Notebook The SQL Notebook editor combines the best of the GUI editors and the command line clients. You can see it like a endless document where each commands (called prompt) is followed by a result area (output) that is linked to it. If you have multiple statements, the output area will contains multiple tabs: Copyright @ 2022 Oracle and/or its affiliates. 26
  • 29. MySQL Shell for VS Code - SQL Notebook The commands can be modi ed ad in nitum: you can croll up and down in the document and change all statements any time. The editor provides command completion: Copyright @ 2022 Oracle and/or its affiliates. 27
  • 30. MySQL Shell for VS Code - SQL Notebook We have also added a graphs capabilities (work in progress) in TypeScript. Currently PieGraph() is available: Copyright @ 2022 Oracle and/or its affiliates. 28
  • 31. MySQL Shell for VS Code - SQL Notebook (cool) MySQL Shell is integrated to VS code also when you edit other les: Copyright @ 2022 Oracle and/or its affiliates. 29
  • 32. You can select any SQL statement in your code and execute it the SQL Notebook MySQL Shell for VS Code - SQL Notebook (cool) Copyright @ 2022 Oracle and/or its affiliates. 30
  • 33. MySQL Shell for VS Code - SQL Notebook (cool) It gets executed in a new block (prompt + output): Copyright @ 2022 Oracle and/or its affiliates. 31
  • 34. MySQL Shell for VS Code - SQL Notebook (cool) You can modify your query and test it. When ready send it back modi ed to the code: Copyright @ 2022 Oracle and/or its affiliates. 32
  • 35. MySQL Shell for VS Code - SQL Notebook (cool) Done ! This is a very cool feature for developers ! Copyright @ 2022 Oracle and/or its affiliates. 33
  • 36. It supports 3 languages: SQL JavaScript Python 2 protocols are supported: classic MySQL protocol (3306) X Protocol (mysqlx) (33060) MySQL Shell for VS Code - MySQL Shell Console The MySQL Shell Consoles view allows you to have dedicated area for working with multiple MySQL Shell sessions. This is exacly like the usual temrinal MySQL Shell but in VS code: Copyright @ 2022 Oracle and/or its affiliates. 34
  • 37. MySQL Shell for VS Code - MySQL Shell Console The AdminAPI is available when using MySQL Shell Console session. Same for the utilities: Copyright @ 2022 Oracle and/or its affiliates. 35
  • 38. You also have the possibility to connect to your MySQL HeatWave instances using the Bastion Service that the extension will deploy and con gure for you ! MySQL Shell for VS Code - OCI If you are using OCI, MySQL Shell for VS Code is your best companion. It uses by default all con guration pro les de ned in ~/.oci/con g le. You have the possibility to see all your MySQL HeatWave instances but also other resources like compute instances. Copyright @ 2022 Oracle and/or its affiliates. 36
  • 39. MySQL Shell for VS Code - OCI If no bastion host is present, a new one will be created: Copyright @ 2022 Oracle and/or its affiliates. 37
  • 40. MySQL Shell for VS Code - OCI Copyright @ 2022 Oracle and/or its affiliates. 38
  • 41. MySQL Shell for VS Code - OCI MySQL Shell Dump & Load utility is integrated and optimized for OCI MySQL HeatWave service: Copyright @ 2022 Oracle and/or its affiliates. 39
  • 42. MySQL Shell for VS Code - OCI Copyright @ 2022 Oracle and/or its affiliates. 40
  • 43. MySQL Shell for VS Code - OCI Copyright @ 2022 Oracle and/or its affiliates. 41
  • 44. MySQL Shell for VS Code - OCI Copyright @ 2022 Oracle and/or its affiliates. 42
  • 45. MySQL Shell for VS Code - se ings You have the possibility to modify some se ings for the extension (numbers of records in paging, capitalize the SQL commands, ...) Copyright @ 2022 Oracle and/or its affiliates. 43
  • 46. Components How does it work Copyright @ 2022 Oracle and/or its affiliates. 44
  • 47. MySQL Shell for VS Code The MySQL Shell for VS Code extension is composed of multiple elements that are interconnected: the VS code extension an embedded MySQL Shell a MySQL Shell GUI plugin starting a webserver using a secure SSL connection via the certi cate created during installation Copyright @ 2022 Oracle and/or its affiliates. 45
  • 48. This is the reason why the extension can be downloaded for di erent Operating Systems and architecture: MySQL Shell for VS Code - embedded Shell The extension contains MySQL Shell, so there is no need to install MySQL Shell to use the extension in VS code.                     On Linux that MySQL Shell is available on ~/.vscode/extensions/oracle.mysql-shell-for-vs-code-1.1.8-linux- x64/shell/bin/mysqlsh If you run it manually it uses your default ~/.mysqlsh directory for con guration, prompt, history,... Copyright @ 2022 Oracle and/or its affiliates. 46
  • 49. MySQL Shell for VS Code - Webserver As soon as you start VS code, if you have the MySQL Shell for VS Code extension installed, the embedded MySQL Shell will start its own webserver: Copyright @ 2022 Oracle and/or its affiliates. 47
  • 50. MySQL Shell for VS Code - Webserver As soon as you start VS code, if you have the MySQL Shell for VS Code extension installed, the embedded MySQL Shell will start its own webserver: For example, the SQL Notebook connects to that webserver. For mysql-blue[My]SQL Shell Console, it's di erent, a new instance of MySQL Shell is used: Copyright @ 2022 Oracle and/or its affiliates. 47
  • 51. MySQL Shell for VS Code - Webserver When started by the extension, MySQL Shell's GUI Webinterface is protected and works only in VS code: Copyright @ 2022 Oracle and/or its affiliates. 48
  • 52. MySQL Shell for VS Code - Webserver Copyright @ 2022 Oracle and/or its affiliates. 49
  • 53. MySQL Shell for VS Code - Webserver If you have a user it will work, if not, you need to create one. Copyright @ 2022 Oracle and/or its affiliates. 50
  • 54. MySQL Shell for VS Code - Webserver And you can then connect using of those users: Copyright @ 2022 Oracle and/or its affiliates. 51
  • 55. How can I help ? Test and report bugs Copyright @ 2022 Oracle and/or its affiliates. 52
  • 56. MySQL Shell for VS Code - helping The best way to help this new extension for Visual Studio Code is to test it actively and to report bugs. Directly from VS code: Copyright @ 2022 Oracle and/or its affiliates. 53
  • 57. MySQL Shell for VS Code - helping Or ling a bug directly on h ps://bugs.mysql.com/ : Copyright @ 2022 Oracle and/or its affiliates. 54
  • 58. More What about my MySQL Shell plugins ? Copyright @ 2022 Oracle and/or its affiliates. 55
  • 59. What about MySQL Shell plugins ? When we released the extension, people started asking about the MySQL Shell plugins they were using with MySQL Shell in Terminal. Can they still be used with MySQL Shell for Visual Studio code ? Copyright @ 2022 Oracle and/or its affiliates. 56
  • 60. What about MySQL Shell plugins ? When we released the extension, people started asking about the MySQL Shell plugins they were using with MySQL Shell in Terminal. Can they still be used with MySQL Shell for Visual Studio code ? YES ! Copyright @ 2022 Oracle and/or its affiliates. 56
  • 61. Plugins in MySQL Shell for VS Code You just need to copy your plugins in the appropriate directory. On Linux: /home/fred/.mysqlsh- gui/plugin_data/gui_plugin/shell_instance_home/plugins On Windows: Copyright @ 2022 Oracle and/or its affiliates. 57
  • 62. Plugins in MySQL Shell for VS Code Once installed you can access them using the MySQL Shell Console. Plugins are not available in SQL Notebook: Copyright @ 2022 Oracle and/or its affiliates. 58
  • 63. Plugins in MySQL Shell for VS Code - example Copyright @ 2022 Oracle and/or its affiliates. 59
  • 64. Plugins in MySQL Shell for VS Code - example Copyright @ 2022 Oracle and/or its affiliates. 60
  • 65. Plugins in MySQL Shell for VS Code - example Copyright @ 2022 Oracle and/or its affiliates. 61
  • 66. Plugins in MySQL Shell for VS Code - example Copyright @ 2022 Oracle and/or its affiliates. 62
  • 67. Plugins in MySQL Shell for VS Code - example Copyright @ 2022 Oracle and/or its affiliates. 63
  • 68. Plugins in MySQL Shell for VS Code - example Copyright @ 2022 Oracle and/or its affiliates. 64
  • 69. Plugins in MySQL Shell for VS Code - modules If you are missing Python modules like this: Copyright @ 2022 Oracle and/or its affiliates. 65
  • 70. Plugins in MySQL Shell for VS Code - modules Pip can be used with MySQL Shell to install the missing module: Copyright @ 2022 Oracle and/or its affiliates. 66
  • 71. Plugins in MySQL Shell for VS Code - modules Copyright @ 2022 Oracle and/or its affiliates. 67
  • 72. Plugins in MySQL Shell for VS Code You can nd many plugins in this GitHub repository: h ps://github.com/lefred/mysqlshell-plugins (*) some layout output can be incompatible Copyright @ 2022 Oracle and/or its affiliates. 68
  • 74. Share your ❤to MySQL #mysql Join our slack channel! bit.ly/mysql-slack Copyright @ 2022 Oracle and/or its affiliates. 70
  • 75. Questions ? Copyright @ 2022 Oracle and/or its affiliates. 71