SlideShare a Scribd company logo
1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ?
file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell.… 1/53
1 / 53
1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ?
file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell.… 2/53
2 / 532 / 532 / 53
1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ?
file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell.… 3/53
MyMySQLSQL ShellShell:: the best DBA tool ?
How to use theHow to use the MyMySQLSQL ShellShell as a framework for DBAsas a framework for DBAs
 
 
 
 
 
 
Frédéric Descamps - MySQL Community Manager - Oracle
3 / 53
1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ?
file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell.… 4/53
 
Safe Harbor Statement
The following is intended to outline our general product direction. It is intended for
information purpose only, and may not be incorporated into any contract. It is not a
commitment to deliver any material, code, or functionality, and should not be relied up in
making purchasing decisions. The development, release and timing of any features or
functionality described for Oracle´s product remains at the sole discretion of Oracle.
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
4 / 53
1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ?
file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell.… 5/53
about me - http://about.me/lefred
Who am I ?Who am I ?
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
5 / 53
1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ?
file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell.… 6/53
Frédéric Descamps
@lefred
MySQL Evangelist
Hacking MySQL since 3.23
devops believer
living in Belgium 🇧🇪
http://lefred.be
 
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
6 / 53
1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ?
file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell.… 7/53
a new tool
MyMySQLSQL ShellShell
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
7 / 53
1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ?
file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell.… 8/53
MySQL Shell
The MySQL Shell is an interactive Javascript, Python, or SQL interface supporting
development and administration for the MySQL Server and is a component of the MySQL
Server. You can use the MySQL Shell to perform data queries and updates as well as
various administration operations.
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
8 / 53
1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ?
file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell.… 9/53
MySQL Shell (2)
The MySQL Shell provides:
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
9 / 53
1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ?
file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 10/53
MySQL Shell (2)
The MySQL Shell provides:
Both Interactive and Batch operations
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
10 / 53
1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ?
file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 11/53
MySQL Shell (2)
The MySQL Shell provides:
Both Interactive and Batch operations
Document and Relational Models
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
11 / 53
1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ?
file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 12/53
MySQL Shell (2)
The MySQL Shell provides:
Both Interactive and Batch operations
Document and Relational Models
CRUD Document and Relational APIs via scripting
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
12 / 53
1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ?
file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 13/53
MySQL Shell (2)
The MySQL Shell provides:
Both Interactive and Batch operations
Document and Relational Models
CRUD Document and Relational APIs via scripting
Traditional Table, JSON, Tab Separated output results formats
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
13 / 53
1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ?
file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 14/53
MySQL Shell (2)
The MySQL Shell provides:
Both Interactive and Batch operations
Document and Relational Models
CRUD Document and Relational APIs via scripting
Traditional Table, JSON, Tab Separated output results formats
MySQL Standard and X Protocols
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
14 / 53
1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ?
file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 15/53
MySQL Shell (2)
The MySQL Shell provides:
Both Interactive and Batch operations
Document and Relational Models
CRUD Document and Relational APIs via scripting
Traditional Table, JSON, Tab Separated output results formats
MySQL Standard and X Protocols
and more...
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
15 / 53
1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ?
file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 16/53
MySQL Shell and Python
When using the python mode in the Shell, it's possible to use system modules (local).
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
16 / 53
1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ?
file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 17/53
MySQL Shell and Python (2)
Of course this can be any type of modules:
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
17 / 53
1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ?
file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 18/53
MySQL Shell and Python (2)
Of course this can be any type of modules:
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
18 / 53
1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ?
file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 19/53
we want more !
ExtendingExtending MyMySQLSQL ShellShell
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
19 / 53
1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ?
file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 20/53
Extending MySQL Shell
It's then possible to create your own modules to extend MySQL Shell.
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
20 / 53
1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ?
file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 21/53
Extending MySQL Shell
It's then possible to create your own modules to extend MySQL Shell.
For calling some long statements or group of operations or sometimes to replace a
missing functionality.
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
21 / 53
1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ?
file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 22/53
Extending MySQL Shell
It's then possible to create your own modules to extend MySQL Shell.
For calling some long statements or group of operations or sometimes to replace a
missing functionality.
Recently, somebody pointed out that since the new DD it was not anymore possible to
delete all routines for a specific schema.
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
22 / 53
1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ?
file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 23/53
Extending MySQL Shell
It's then possible to create your own modules to extend MySQL Shell.
For calling some long statements or group of operations or sometimes to replace a
missing functionality.
Recently, somebody pointed out that since the new DD it was not anymore possible to
delete all routines for a specific schema.
Jesper explained recently how the MySQL Shell could help here see
https://mysql.wisborg.dk/2018/12/02/mysql-8-drop-several-stored-events-
procedures-or-functions/
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
23 / 53
1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ?
file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 24/53
Extending MySQL Shell
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
24 / 53
1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ?
file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 25/53
Extending MySQL Shell
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
25 / 53
1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ?
file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 26/53
Extending MySQL Shell
Or for example, retrieve the expiration period of passwords (see
https://lefred.be/content/mysql-when-will-the-password-of-my-users-expire/):
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
26 / 53
1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ?
file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 27/53
Extending MySQL Shell
Another example, retrieve the tables potentially fragmented (see
https://lefred.be/content/overview-of-fragmented-mysql-innodb-tables/):
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
27 / 53
1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ?
file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 28/53
Extending MySQL Shell
Recently somebody complained about the complexity of knowing what are the default
values of columns when expressions are used (https://forums.mysql.com/read.php?
101,670682,670682):
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
28 / 53
1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ?
file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 29/53
Contribute to MySQL Shell DBA Toolkit ?
Get the code from https://github.com/lefred/mysql-shell-mydba and Pull Requests are
welcome !
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
29 / 53
1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ?
file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 30/53
we want even more !
InnoInnotoptop
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
30 / 53
1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ?
file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 31/53
Innotop
As maintainer of Innotop, after doing so delayed maintenance, I started a poll on Twitter:
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
31 / 53
1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ?
file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 32/53
Innotop (2)
So Innotop is not dead... but it's very complex to maintain... Perl !
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
32 / 53
1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ?
file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 33/53
Innotop (2)
So Innotop is not dead... but it's very complex to maintain... Perl !
This is maybe the reason there is less and less contributors...
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
33 / 53
1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ?
file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 34/53
Innotop (2)
So Innotop is not dead... but it's very complex to maintain... Perl !
This is maybe the reason there is less and less contributors...
... so and MySQL Shell then ?
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
34 / 53
1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ?
file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 35/53
Innotop in MySQL Shell
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
35 / 53
1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ?
file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 36/53
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
00:05
36 / 53
1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ?
file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 37/53
Innotop in MySQL Shell
How to use it ?How to use it ?
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
37 / 53
1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ?
file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 38/53
How to use this module in MySQL Shell ?
The module is available on github: https://github.com/lefred/mysql-shell-innotop
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
38 / 53
1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ?
file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 39/53
How to use this module in MySQL Shell ?
The module is available on github: https://github.com/lefred/mysql-shell-innotop
$ mysqlsh --py root@localhost
importimport sys
sys.path.append('/home/fred/workspace/mysql-shell-innotop')
importimport innotop
Py> innotop.session_processlist.run()
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
39 / 53
1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ?
file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 40/53
How to use this module in MySQL Shell ?
The module is available on github: https://github.com/lefred/mysql-shell-innotop
$ mysqlsh --py root@localhost
importimport sys
sys.path.append('/home/fred/workspace/mysql-shell-innotop')
importimport innotop
Py> innotop.session_processlist.run()
Add in ~/.mysqlsh/mysqlshrc.py:
importimport sys
sys.path.append('/home/fred/workspace/mysql-shell-innotop')
importimport innotop
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
40 / 53
1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ?
file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 41/53
does it work everywhere ?
LimitationsLimitations
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
41 / 53
1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ?
file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 42/53
Limitations
requires ncurses
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
42 / 53
1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ?
file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 43/53
Limitations
requires ncurses
works almost exclusively on Gnu/Linux
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
43 / 53
1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ?
file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 44/53
I want to contribute !
How to write your own extension ?How to write your own extension ?
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
44 / 53
1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ?
file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 45/53
Creating you own extension
All extensions are a single file located in the modulesmodules folder:
[fred@imac2 mysql-shell-innotop] $ ls modules/*py
modules/common.py
modules/global_by_ le_by_bytes.py
modules/help.py
modules/__init__.py
modules/session_processlist.py
modules/thread_info.py
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
45 / 53
1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ?
file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 46/53
Skeleton of an extension
Every extension starts the same way and requires some mandatory modules:
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
46 / 53
1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ?
file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 47/53
Skeleton of an extension
Every extension starts the same way and requires some mandatory modules:
importimport __builtin__
importimport curses
fromfrom datetime importimport datetime
fromfrom time importimport sleep
importimport innotop
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
47 / 53
1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ?
file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 48/53
Skeleton of an extension
Every extension starts the same way and requires some mandatory modules:
importimport __builtin__
importimport curses
fromfrom datetime importimport datetime
fromfrom time importimport sleep
importimport innotop
Then you need to specify the shortcuts that calls the functions:
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
48 / 53
1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ?
file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 49/53
Skeleton of an extension
Every extension starts the same way and requires some mandatory modules:
importimport __builtin__
importimport curses
fromfrom datetime importimport datetime
fromfrom time importimport sleep
importimport innotop
Then you need to specify the shortcuts that calls the functions:
innotop.shortcut['h']={'return': 'help', 'stdscr': FalseFalse}
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
49 / 53
1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ?
file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 50/53
Skeleton of an extension
Every extension starts the same way and requires some mandatory modules:
importimport __builtin__
importimport curses
fromfrom datetime importimport datetime
fromfrom time importimport sleep
importimport innotop
Then you need to specify the shortcuts that calls the functions:
innotop.shortcut['h']={'return': 'help', 'stdscr': FalseFalse}
return:return: name of the module (help.py)
stdscr:stdscr: use the same screen (and pass it to the function)
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
50 / 53
1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ?
file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 51/53
Skeleton of an extension - run()
defdef runrun(session, delay=1, back=False):
stdscr, info = innotop.common.setup(curses, session)
keep_running = TrueTrue
whilewhile keep_running:
time = datetime.now()
y,x = innotop.common.topbar(curses, stdscr, info)
<your code>
# Wait until delay seconds have passed while listening for the q key
whilewhile (datetime.now() - time).total_seconds() < delay:
c = stdscr.getch()
ifif c == ord("q"):
keep_running = FalseFalse
breakbreak
ifif notnot back:
# Reset the cures behavior and nish
curses.nocbreak()
stdscr.keypad(FalseFalse)
curses.echo()
curses.endwin
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
51 / 53
1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ?
file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 52/53
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
52 / 53
1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ?
file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 53/53
Thank you !
Any Questions ?
share your 💕 for MySQL on social media using @mysql #MySQL8isGreat
#MySQLDay #MySQLShell
Copyright @ 2019 Oracle and/or its affiliates. All rights reserved.
53 / 53
Ad

More Related Content

What's hot (20)

DataOpsbarcelona 2019: Deep dive into MySQL Group Replication... the magic e...
DataOpsbarcelona 2019:  Deep dive into MySQL Group Replication... the magic e...DataOpsbarcelona 2019:  Deep dive into MySQL Group Replication... the magic e...
DataOpsbarcelona 2019: Deep dive into MySQL Group Replication... the magic e...
Frederic Descamps
 
MySQL Shell: the best DBA tool ?
MySQL Shell: the best DBA tool ?MySQL Shell: the best DBA tool ?
MySQL Shell: the best DBA tool ?
Frederic Descamps
 
How to operate MySQL InnoDB Cluster with MySQL Shell
How to operate MySQL InnoDB Cluster with MySQL ShellHow to operate MySQL InnoDB Cluster with MySQL Shell
How to operate MySQL InnoDB Cluster with MySQL Shell
Frederic Descamps
 
MySQL InnoDB Cluster and Group Replication in a nutshell hands-on tutorial
MySQL InnoDB Cluster and Group Replication in a nutshell  hands-on tutorialMySQL InnoDB Cluster and Group Replication in a nutshell  hands-on tutorial
MySQL InnoDB Cluster and Group Replication in a nutshell hands-on tutorial
Frederic Descamps
 
MySQL InnoDB Cluster - Advanced Configuration & Operations
MySQL InnoDB Cluster - Advanced Configuration & OperationsMySQL InnoDB Cluster - Advanced Configuration & Operations
MySQL InnoDB Cluster - Advanced Configuration & Operations
Frederic Descamps
 
MySQL Shell - the best DBA tool ?
MySQL Shell - the best DBA tool ? MySQL Shell - the best DBA tool ?
MySQL Shell - the best DBA tool ?
Frederic Descamps
 
MySQL Shell - A DevOps-engineer day with MySQL’s development and administrati...
MySQL Shell - A DevOps-engineer day with MySQL’s development and administrati...MySQL Shell - A DevOps-engineer day with MySQL’s development and administrati...
MySQL Shell - A DevOps-engineer day with MySQL’s development and administrati...
Miguel Araújo
 
OpenExpo Virtual Experience 2020: MySQL 8.0 Document Store - Discovery of a n...
OpenExpo Virtual Experience 2020: MySQL 8.0 Document Store - Discovery of a n...OpenExpo Virtual Experience 2020: MySQL 8.0 Document Store - Discovery of a n...
OpenExpo Virtual Experience 2020: MySQL 8.0 Document Store - Discovery of a n...
Frederic Descamps
 
Python and MySQL 8.0 Document Store
Python and MySQL 8.0 Document StorePython and MySQL 8.0 Document Store
Python and MySQL 8.0 Document Store
Frederic Descamps
 
Oracle Open World 2018 / Code One : MySQL 8.0 Document Store
Oracle Open World 2018 /  Code One : MySQL 8.0 Document StoreOracle Open World 2018 /  Code One : MySQL 8.0 Document Store
Oracle Open World 2018 / Code One : MySQL 8.0 Document Store
Frederic Descamps
 
State of the Dolphin 2020 - 25th Anniversary of MySQL with 8.0.20
State of the Dolphin 2020 - 25th Anniversary of MySQL with 8.0.20State of the Dolphin 2020 - 25th Anniversary of MySQL with 8.0.20
State of the Dolphin 2020 - 25th Anniversary of MySQL with 8.0.20
Frederic Descamps
 
MySQL Group Replication: Handling Network Glitches - Best Practices
MySQL Group Replication: Handling Network Glitches - Best PracticesMySQL Group Replication: Handling Network Glitches - Best Practices
MySQL Group Replication: Handling Network Glitches - Best Practices
Frederic Descamps
 
UAE MySQL Users Group Meet-up : MySQL Shell Document Store & more...
UAE MySQL Users Group Meet-up : MySQL Shell Document Store & more...UAE MySQL Users Group Meet-up : MySQL Shell Document Store & more...
UAE MySQL Users Group Meet-up : MySQL Shell Document Store & more...
Frederic Descamps
 
MySQL Database Service Webinar - Installing WordPress in OCI with MDS
MySQL Database Service Webinar - Installing WordPress in OCI with MDSMySQL Database Service Webinar - Installing WordPress in OCI with MDS
MySQL Database Service Webinar - Installing WordPress in OCI with MDS
Frederic Descamps
 
MySQL Innovation Day Chicago - MySQL HA So Easy : That's insane !!
MySQL Innovation Day Chicago  - MySQL HA So Easy : That's insane !!MySQL Innovation Day Chicago  - MySQL HA So Easy : That's insane !!
MySQL Innovation Day Chicago - MySQL HA So Easy : That's insane !!
Frederic Descamps
 
Oracle Open World Middle East - MySQL 8 a Giant Leap for SQL
Oracle Open World Middle East - MySQL 8 a Giant Leap for SQLOracle Open World Middle East - MySQL 8 a Giant Leap for SQL
Oracle Open World Middle East - MySQL 8 a Giant Leap for SQL
Frederic Descamps
 
Oracle Open World 2018 / Code One : MySQL 8.0 High Availability with MySQL I...
Oracle Open World 2018 / Code One  : MySQL 8.0 High Availability with MySQL I...Oracle Open World 2018 / Code One  : MySQL 8.0 High Availability with MySQL I...
Oracle Open World 2018 / Code One : MySQL 8.0 High Availability with MySQL I...
Frederic Descamps
 
MySQL 8.0 InnoDB Cluster - Easiest Tutorial
MySQL 8.0 InnoDB Cluster - Easiest TutorialMySQL 8.0 InnoDB Cluster - Easiest Tutorial
MySQL 8.0 InnoDB Cluster - Easiest Tutorial
Frederic Descamps
 
MySQL 8.0 : High Availability Solution for Everybody
MySQL 8.0 : High Availability Solution for EverybodyMySQL 8.0 : High Availability Solution for Everybody
MySQL 8.0 : High Availability Solution for Everybody
Frederic Descamps
 
MySQL InnoDB Cluster in a Nutshell - Hands-on Lab
MySQL InnoDB Cluster in a Nutshell - Hands-on LabMySQL InnoDB Cluster in a Nutshell - Hands-on Lab
MySQL InnoDB Cluster in a Nutshell - Hands-on Lab
Frederic Descamps
 
DataOpsbarcelona 2019: Deep dive into MySQL Group Replication... the magic e...
DataOpsbarcelona 2019:  Deep dive into MySQL Group Replication... the magic e...DataOpsbarcelona 2019:  Deep dive into MySQL Group Replication... the magic e...
DataOpsbarcelona 2019: Deep dive into MySQL Group Replication... the magic e...
Frederic Descamps
 
MySQL Shell: the best DBA tool ?
MySQL Shell: the best DBA tool ?MySQL Shell: the best DBA tool ?
MySQL Shell: the best DBA tool ?
Frederic Descamps
 
How to operate MySQL InnoDB Cluster with MySQL Shell
How to operate MySQL InnoDB Cluster with MySQL ShellHow to operate MySQL InnoDB Cluster with MySQL Shell
How to operate MySQL InnoDB Cluster with MySQL Shell
Frederic Descamps
 
MySQL InnoDB Cluster and Group Replication in a nutshell hands-on tutorial
MySQL InnoDB Cluster and Group Replication in a nutshell  hands-on tutorialMySQL InnoDB Cluster and Group Replication in a nutshell  hands-on tutorial
MySQL InnoDB Cluster and Group Replication in a nutshell hands-on tutorial
Frederic Descamps
 
MySQL InnoDB Cluster - Advanced Configuration & Operations
MySQL InnoDB Cluster - Advanced Configuration & OperationsMySQL InnoDB Cluster - Advanced Configuration & Operations
MySQL InnoDB Cluster - Advanced Configuration & Operations
Frederic Descamps
 
MySQL Shell - the best DBA tool ?
MySQL Shell - the best DBA tool ? MySQL Shell - the best DBA tool ?
MySQL Shell - the best DBA tool ?
Frederic Descamps
 
MySQL Shell - A DevOps-engineer day with MySQL’s development and administrati...
MySQL Shell - A DevOps-engineer day with MySQL’s development and administrati...MySQL Shell - A DevOps-engineer day with MySQL’s development and administrati...
MySQL Shell - A DevOps-engineer day with MySQL’s development and administrati...
Miguel Araújo
 
OpenExpo Virtual Experience 2020: MySQL 8.0 Document Store - Discovery of a n...
OpenExpo Virtual Experience 2020: MySQL 8.0 Document Store - Discovery of a n...OpenExpo Virtual Experience 2020: MySQL 8.0 Document Store - Discovery of a n...
OpenExpo Virtual Experience 2020: MySQL 8.0 Document Store - Discovery of a n...
Frederic Descamps
 
Python and MySQL 8.0 Document Store
Python and MySQL 8.0 Document StorePython and MySQL 8.0 Document Store
Python and MySQL 8.0 Document Store
Frederic Descamps
 
Oracle Open World 2018 / Code One : MySQL 8.0 Document Store
Oracle Open World 2018 /  Code One : MySQL 8.0 Document StoreOracle Open World 2018 /  Code One : MySQL 8.0 Document Store
Oracle Open World 2018 / Code One : MySQL 8.0 Document Store
Frederic Descamps
 
State of the Dolphin 2020 - 25th Anniversary of MySQL with 8.0.20
State of the Dolphin 2020 - 25th Anniversary of MySQL with 8.0.20State of the Dolphin 2020 - 25th Anniversary of MySQL with 8.0.20
State of the Dolphin 2020 - 25th Anniversary of MySQL with 8.0.20
Frederic Descamps
 
MySQL Group Replication: Handling Network Glitches - Best Practices
MySQL Group Replication: Handling Network Glitches - Best PracticesMySQL Group Replication: Handling Network Glitches - Best Practices
MySQL Group Replication: Handling Network Glitches - Best Practices
Frederic Descamps
 
UAE MySQL Users Group Meet-up : MySQL Shell Document Store & more...
UAE MySQL Users Group Meet-up : MySQL Shell Document Store & more...UAE MySQL Users Group Meet-up : MySQL Shell Document Store & more...
UAE MySQL Users Group Meet-up : MySQL Shell Document Store & more...
Frederic Descamps
 
MySQL Database Service Webinar - Installing WordPress in OCI with MDS
MySQL Database Service Webinar - Installing WordPress in OCI with MDSMySQL Database Service Webinar - Installing WordPress in OCI with MDS
MySQL Database Service Webinar - Installing WordPress in OCI with MDS
Frederic Descamps
 
MySQL Innovation Day Chicago - MySQL HA So Easy : That's insane !!
MySQL Innovation Day Chicago  - MySQL HA So Easy : That's insane !!MySQL Innovation Day Chicago  - MySQL HA So Easy : That's insane !!
MySQL Innovation Day Chicago - MySQL HA So Easy : That's insane !!
Frederic Descamps
 
Oracle Open World Middle East - MySQL 8 a Giant Leap for SQL
Oracle Open World Middle East - MySQL 8 a Giant Leap for SQLOracle Open World Middle East - MySQL 8 a Giant Leap for SQL
Oracle Open World Middle East - MySQL 8 a Giant Leap for SQL
Frederic Descamps
 
Oracle Open World 2018 / Code One : MySQL 8.0 High Availability with MySQL I...
Oracle Open World 2018 / Code One  : MySQL 8.0 High Availability with MySQL I...Oracle Open World 2018 / Code One  : MySQL 8.0 High Availability with MySQL I...
Oracle Open World 2018 / Code One : MySQL 8.0 High Availability with MySQL I...
Frederic Descamps
 
MySQL 8.0 InnoDB Cluster - Easiest Tutorial
MySQL 8.0 InnoDB Cluster - Easiest TutorialMySQL 8.0 InnoDB Cluster - Easiest Tutorial
MySQL 8.0 InnoDB Cluster - Easiest Tutorial
Frederic Descamps
 
MySQL 8.0 : High Availability Solution for Everybody
MySQL 8.0 : High Availability Solution for EverybodyMySQL 8.0 : High Availability Solution for Everybody
MySQL 8.0 : High Availability Solution for Everybody
Frederic Descamps
 
MySQL InnoDB Cluster in a Nutshell - Hands-on Lab
MySQL InnoDB Cluster in a Nutshell - Hands-on LabMySQL InnoDB Cluster in a Nutshell - Hands-on Lab
MySQL InnoDB Cluster in a Nutshell - Hands-on Lab
Frederic Descamps
 

Similar to MySQL Shell : the best DBA tool ? (20)

MySQL Shell: the best DBA tool !
MySQL Shell: the best DBA tool !MySQL Shell: the best DBA tool !
MySQL Shell: the best DBA tool !
Frederic Descamps
 
MySQL Shell - the best DBA tool !
MySQL Shell - the best DBA tool !MySQL Shell - the best DBA tool !
MySQL Shell - the best DBA tool !
Frederic Descamps
 
Sunshine php my sql 8.0 v2
Sunshine php my sql 8.0 v2Sunshine php my sql 8.0 v2
Sunshine php my sql 8.0 v2
Kathy Forte (Hassard)
 
the State of the Dolphin - October 2020
the State of the Dolphin - October 2020the State of the Dolphin - October 2020
the State of the Dolphin - October 2020
Frederic Descamps
 
MySQL InnoDB Cluster and Group Replication in a Nutshell
MySQL InnoDB Cluster and Group Replication in a NutshellMySQL InnoDB Cluster and Group Replication in a Nutshell
MySQL InnoDB Cluster and Group Replication in a Nutshell
Frederic Descamps
 
MySQL Database Architectures - MySQL InnoDB ClusterSet 2021-11
MySQL Database Architectures - MySQL InnoDB ClusterSet 2021-11MySQL Database Architectures - MySQL InnoDB ClusterSet 2021-11
MySQL Database Architectures - MySQL InnoDB ClusterSet 2021-11
Kenny Gryp
 
20200613 my sql-ha-deployment
20200613 my sql-ha-deployment20200613 my sql-ha-deployment
20200613 my sql-ha-deployment
Ivan Ma
 
MySQL For Oracle DBA's and Developers
MySQL For Oracle DBA's and DevelopersMySQL For Oracle DBA's and Developers
MySQL For Oracle DBA's and Developers
Ronald Bradford
 
MySQL Group Replicatio in a nutshell - MySQL InnoDB Cluster
MySQL Group Replicatio  in a nutshell - MySQL InnoDB ClusterMySQL Group Replicatio  in a nutshell - MySQL InnoDB Cluster
MySQL Group Replicatio in a nutshell - MySQL InnoDB Cluster
Frederic Descamps
 
Docker Compose Setup for MySQL InnoDB Cluster
Docker Compose Setup for MySQL InnoDB ClusterDocker Compose Setup for MySQL InnoDB Cluster
Docker Compose Setup for MySQL InnoDB Cluster
Balasubramanian Kandasamy
 
Another MySQL HA Solution for ProxySQL Users, Easy and All Integrated: MySQL ...
Another MySQL HA Solution for ProxySQL Users, Easy and All Integrated: MySQL ...Another MySQL HA Solution for ProxySQL Users, Easy and All Integrated: MySQL ...
Another MySQL HA Solution for ProxySQL Users, Easy and All Integrated: MySQL ...
Frederic Descamps
 
DataOps Barcelona - MySQL HA so easy... that's insane !
DataOps Barcelona - MySQL HA so easy... that's insane !DataOps Barcelona - MySQL HA so easy... that's insane !
DataOps Barcelona - MySQL HA so easy... that's insane !
Frederic Descamps
 
MySQL High Availability: Managing Farms of Distributed Servers (MySQL Fabric)
MySQL High Availability: Managing Farms of Distributed Servers (MySQL Fabric)MySQL High Availability: Managing Farms of Distributed Servers (MySQL Fabric)
MySQL High Availability: Managing Farms of Distributed Servers (MySQL Fabric)
Alfranio Júnior
 
20190915_MySQL開発最新動向
20190915_MySQL開発最新動向20190915_MySQL開発最新動向
20190915_MySQL開発最新動向
Machiko Ikoma
 
MySQL Database Architectures - 2022-08
MySQL Database Architectures - 2022-08MySQL Database Architectures - 2022-08
MySQL Database Architectures - 2022-08
Kenny Gryp
 
MySQL Database Architectures - 2020-10
MySQL Database Architectures -  2020-10MySQL Database Architectures -  2020-10
MySQL Database Architectures - 2020-10
Kenny Gryp
 
Introduction to MySQL InnoDB Cluster
Introduction to MySQL InnoDB ClusterIntroduction to MySQL InnoDB Cluster
Introduction to MySQL InnoDB Cluster
Frederic Descamps
 
MySQL For Oracle Developers
MySQL For Oracle DevelopersMySQL For Oracle Developers
MySQL For Oracle Developers
Ronald Bradford
 
Introduction to MySQL InnoDB Cluster
Introduction to MySQL InnoDB ClusterIntroduction to MySQL InnoDB Cluster
Introduction to MySQL InnoDB Cluster
Frederic Descamps
 
MySQL 8 High Availability with InnoDB Clusters
MySQL 8 High Availability with InnoDB ClustersMySQL 8 High Availability with InnoDB Clusters
MySQL 8 High Availability with InnoDB Clusters
Miguel Araújo
 
MySQL Shell: the best DBA tool !
MySQL Shell: the best DBA tool !MySQL Shell: the best DBA tool !
MySQL Shell: the best DBA tool !
Frederic Descamps
 
MySQL Shell - the best DBA tool !
MySQL Shell - the best DBA tool !MySQL Shell - the best DBA tool !
MySQL Shell - the best DBA tool !
Frederic Descamps
 
the State of the Dolphin - October 2020
the State of the Dolphin - October 2020the State of the Dolphin - October 2020
the State of the Dolphin - October 2020
Frederic Descamps
 
MySQL InnoDB Cluster and Group Replication in a Nutshell
MySQL InnoDB Cluster and Group Replication in a NutshellMySQL InnoDB Cluster and Group Replication in a Nutshell
MySQL InnoDB Cluster and Group Replication in a Nutshell
Frederic Descamps
 
MySQL Database Architectures - MySQL InnoDB ClusterSet 2021-11
MySQL Database Architectures - MySQL InnoDB ClusterSet 2021-11MySQL Database Architectures - MySQL InnoDB ClusterSet 2021-11
MySQL Database Architectures - MySQL InnoDB ClusterSet 2021-11
Kenny Gryp
 
20200613 my sql-ha-deployment
20200613 my sql-ha-deployment20200613 my sql-ha-deployment
20200613 my sql-ha-deployment
Ivan Ma
 
MySQL For Oracle DBA's and Developers
MySQL For Oracle DBA's and DevelopersMySQL For Oracle DBA's and Developers
MySQL For Oracle DBA's and Developers
Ronald Bradford
 
MySQL Group Replicatio in a nutshell - MySQL InnoDB Cluster
MySQL Group Replicatio  in a nutshell - MySQL InnoDB ClusterMySQL Group Replicatio  in a nutshell - MySQL InnoDB Cluster
MySQL Group Replicatio in a nutshell - MySQL InnoDB Cluster
Frederic Descamps
 
Docker Compose Setup for MySQL InnoDB Cluster
Docker Compose Setup for MySQL InnoDB ClusterDocker Compose Setup for MySQL InnoDB Cluster
Docker Compose Setup for MySQL InnoDB Cluster
Balasubramanian Kandasamy
 
Another MySQL HA Solution for ProxySQL Users, Easy and All Integrated: MySQL ...
Another MySQL HA Solution for ProxySQL Users, Easy and All Integrated: MySQL ...Another MySQL HA Solution for ProxySQL Users, Easy and All Integrated: MySQL ...
Another MySQL HA Solution for ProxySQL Users, Easy and All Integrated: MySQL ...
Frederic Descamps
 
DataOps Barcelona - MySQL HA so easy... that's insane !
DataOps Barcelona - MySQL HA so easy... that's insane !DataOps Barcelona - MySQL HA so easy... that's insane !
DataOps Barcelona - MySQL HA so easy... that's insane !
Frederic Descamps
 
MySQL High Availability: Managing Farms of Distributed Servers (MySQL Fabric)
MySQL High Availability: Managing Farms of Distributed Servers (MySQL Fabric)MySQL High Availability: Managing Farms of Distributed Servers (MySQL Fabric)
MySQL High Availability: Managing Farms of Distributed Servers (MySQL Fabric)
Alfranio Júnior
 
20190915_MySQL開発最新動向
20190915_MySQL開発最新動向20190915_MySQL開発最新動向
20190915_MySQL開発最新動向
Machiko Ikoma
 
MySQL Database Architectures - 2022-08
MySQL Database Architectures - 2022-08MySQL Database Architectures - 2022-08
MySQL Database Architectures - 2022-08
Kenny Gryp
 
MySQL Database Architectures - 2020-10
MySQL Database Architectures -  2020-10MySQL Database Architectures -  2020-10
MySQL Database Architectures - 2020-10
Kenny Gryp
 
Introduction to MySQL InnoDB Cluster
Introduction to MySQL InnoDB ClusterIntroduction to MySQL InnoDB Cluster
Introduction to MySQL InnoDB Cluster
Frederic Descamps
 
MySQL For Oracle Developers
MySQL For Oracle DevelopersMySQL For Oracle Developers
MySQL For Oracle Developers
Ronald Bradford
 
Introduction to MySQL InnoDB Cluster
Introduction to MySQL InnoDB ClusterIntroduction to MySQL InnoDB Cluster
Introduction to MySQL InnoDB Cluster
Frederic Descamps
 
MySQL 8 High Availability with InnoDB Clusters
MySQL 8 High Availability with InnoDB ClustersMySQL 8 High Availability with InnoDB Clusters
MySQL 8 High Availability with InnoDB Clusters
Miguel Araújo
 
Ad

More from Frederic Descamps (20)

MySQL Innovation & Cloud Day - Document Store avec MySQL HeatWave Database Se...
MySQL Innovation & Cloud Day - Document Store avec MySQL HeatWave Database Se...MySQL Innovation & Cloud Day - Document Store avec MySQL HeatWave Database Se...
MySQL Innovation & Cloud Day - Document Store avec MySQL HeatWave Database Se...
Frederic Descamps
 
MySQL Day Roma - MySQL Shell and Visual Studio Code Extension
MySQL Day Roma - MySQL Shell and Visual Studio Code ExtensionMySQL Day Roma - MySQL Shell and Visual Studio Code Extension
MySQL Day Roma - MySQL Shell and Visual Studio Code Extension
Frederic Descamps
 
RivieraJUG - MySQL Indexes and Histograms
RivieraJUG - MySQL Indexes and HistogramsRivieraJUG - MySQL Indexes and Histograms
RivieraJUG - MySQL Indexes and Histograms
Frederic Descamps
 
RivieraJUG - MySQL 8.0 - What's new for developers.pdf
RivieraJUG - MySQL 8.0 - What's new for developers.pdfRivieraJUG - MySQL 8.0 - What's new for developers.pdf
RivieraJUG - MySQL 8.0 - What's new for developers.pdf
Frederic Descamps
 
MySQL User Group NL - MySQL 8
MySQL User Group NL - MySQL 8MySQL User Group NL - MySQL 8
MySQL User Group NL - MySQL 8
Frederic Descamps
 
State of the Dolphin - May 2022
State of the Dolphin - May 2022State of the Dolphin - May 2022
State of the Dolphin - May 2022
Frederic Descamps
 
Percona Live 2022 - MySQL Shell for Visual Studio Code
Percona Live 2022 - MySQL Shell for Visual Studio CodePercona Live 2022 - MySQL Shell for Visual Studio Code
Percona Live 2022 - MySQL Shell for Visual Studio Code
Frederic Descamps
 
Percona Live 2022 - The Evolution of a MySQL Database System
Percona Live 2022 - The Evolution of a MySQL Database SystemPercona Live 2022 - The Evolution of a MySQL Database System
Percona Live 2022 - The Evolution of a MySQL Database System
Frederic Descamps
 
Percona Live 2022 - MySQL Architectures
Percona Live 2022 - MySQL ArchitecturesPercona Live 2022 - MySQL Architectures
Percona Live 2022 - MySQL Architectures
Frederic Descamps
 
LinuxFest Northwest 2022 - The Evolution of a MySQL Database System
LinuxFest Northwest 2022 - The Evolution of a MySQL Database SystemLinuxFest Northwest 2022 - The Evolution of a MySQL Database System
LinuxFest Northwest 2022 - The Evolution of a MySQL Database System
Frederic Descamps
 
Open Source 101 2022 - MySQL Indexes and Histograms
Open Source 101 2022 - MySQL Indexes and HistogramsOpen Source 101 2022 - MySQL Indexes and Histograms
Open Source 101 2022 - MySQL Indexes and Histograms
Frederic Descamps
 
Pi Day 2022 - from IoT to MySQL HeatWave Database Service
Pi Day 2022 -  from IoT to MySQL HeatWave Database ServicePi Day 2022 -  from IoT to MySQL HeatWave Database Service
Pi Day 2022 - from IoT to MySQL HeatWave Database Service
Frederic Descamps
 
Confoo 2022 - le cycle d'une instance MySQL
Confoo 2022  - le cycle d'une instance MySQLConfoo 2022  - le cycle d'une instance MySQL
Confoo 2022 - le cycle d'une instance MySQL
Frederic Descamps
 
FOSDEM 2022 MySQL Devroom: MySQL 8.0 - Logical Backups, Snapshots and Point-...
FOSDEM 2022 MySQL Devroom:  MySQL 8.0 - Logical Backups, Snapshots and Point-...FOSDEM 2022 MySQL Devroom:  MySQL 8.0 - Logical Backups, Snapshots and Point-...
FOSDEM 2022 MySQL Devroom: MySQL 8.0 - Logical Backups, Snapshots and Point-...
Frederic Descamps
 
Les nouveautés de MySQL 8.0
Les nouveautés de MySQL 8.0Les nouveautés de MySQL 8.0
Les nouveautés de MySQL 8.0
Frederic Descamps
 
Les nouveautés de MySQL 8.0
Les nouveautés de MySQL 8.0Les nouveautés de MySQL 8.0
Les nouveautés de MySQL 8.0
Frederic Descamps
 
State of The Dolphin - May 2021
State of The Dolphin - May 2021State of The Dolphin - May 2021
State of The Dolphin - May 2021
Frederic Descamps
 
MySQL Shell for DBAs
MySQL Shell for DBAsMySQL Shell for DBAs
MySQL Shell for DBAs
Frederic Descamps
 
Deploying Magento on OCI with MDS
Deploying Magento on OCI with MDSDeploying Magento on OCI with MDS
Deploying Magento on OCI with MDS
Frederic Descamps
 
MySQL Router REST API
MySQL Router REST APIMySQL Router REST API
MySQL Router REST API
Frederic Descamps
 
MySQL Innovation & Cloud Day - Document Store avec MySQL HeatWave Database Se...
MySQL Innovation & Cloud Day - Document Store avec MySQL HeatWave Database Se...MySQL Innovation & Cloud Day - Document Store avec MySQL HeatWave Database Se...
MySQL Innovation & Cloud Day - Document Store avec MySQL HeatWave Database Se...
Frederic Descamps
 
MySQL Day Roma - MySQL Shell and Visual Studio Code Extension
MySQL Day Roma - MySQL Shell and Visual Studio Code ExtensionMySQL Day Roma - MySQL Shell and Visual Studio Code Extension
MySQL Day Roma - MySQL Shell and Visual Studio Code Extension
Frederic Descamps
 
RivieraJUG - MySQL Indexes and Histograms
RivieraJUG - MySQL Indexes and HistogramsRivieraJUG - MySQL Indexes and Histograms
RivieraJUG - MySQL Indexes and Histograms
Frederic Descamps
 
RivieraJUG - MySQL 8.0 - What's new for developers.pdf
RivieraJUG - MySQL 8.0 - What's new for developers.pdfRivieraJUG - MySQL 8.0 - What's new for developers.pdf
RivieraJUG - MySQL 8.0 - What's new for developers.pdf
Frederic Descamps
 
MySQL User Group NL - MySQL 8
MySQL User Group NL - MySQL 8MySQL User Group NL - MySQL 8
MySQL User Group NL - MySQL 8
Frederic Descamps
 
State of the Dolphin - May 2022
State of the Dolphin - May 2022State of the Dolphin - May 2022
State of the Dolphin - May 2022
Frederic Descamps
 
Percona Live 2022 - MySQL Shell for Visual Studio Code
Percona Live 2022 - MySQL Shell for Visual Studio CodePercona Live 2022 - MySQL Shell for Visual Studio Code
Percona Live 2022 - MySQL Shell for Visual Studio Code
Frederic Descamps
 
Percona Live 2022 - The Evolution of a MySQL Database System
Percona Live 2022 - The Evolution of a MySQL Database SystemPercona Live 2022 - The Evolution of a MySQL Database System
Percona Live 2022 - The Evolution of a MySQL Database System
Frederic Descamps
 
Percona Live 2022 - MySQL Architectures
Percona Live 2022 - MySQL ArchitecturesPercona Live 2022 - MySQL Architectures
Percona Live 2022 - MySQL Architectures
Frederic Descamps
 
LinuxFest Northwest 2022 - The Evolution of a MySQL Database System
LinuxFest Northwest 2022 - The Evolution of a MySQL Database SystemLinuxFest Northwest 2022 - The Evolution of a MySQL Database System
LinuxFest Northwest 2022 - The Evolution of a MySQL Database System
Frederic Descamps
 
Open Source 101 2022 - MySQL Indexes and Histograms
Open Source 101 2022 - MySQL Indexes and HistogramsOpen Source 101 2022 - MySQL Indexes and Histograms
Open Source 101 2022 - MySQL Indexes and Histograms
Frederic Descamps
 
Pi Day 2022 - from IoT to MySQL HeatWave Database Service
Pi Day 2022 -  from IoT to MySQL HeatWave Database ServicePi Day 2022 -  from IoT to MySQL HeatWave Database Service
Pi Day 2022 - from IoT to MySQL HeatWave Database Service
Frederic Descamps
 
Confoo 2022 - le cycle d'une instance MySQL
Confoo 2022  - le cycle d'une instance MySQLConfoo 2022  - le cycle d'une instance MySQL
Confoo 2022 - le cycle d'une instance MySQL
Frederic Descamps
 
FOSDEM 2022 MySQL Devroom: MySQL 8.0 - Logical Backups, Snapshots and Point-...
FOSDEM 2022 MySQL Devroom:  MySQL 8.0 - Logical Backups, Snapshots and Point-...FOSDEM 2022 MySQL Devroom:  MySQL 8.0 - Logical Backups, Snapshots and Point-...
FOSDEM 2022 MySQL Devroom: MySQL 8.0 - Logical Backups, Snapshots and Point-...
Frederic Descamps
 
Les nouveautés de MySQL 8.0
Les nouveautés de MySQL 8.0Les nouveautés de MySQL 8.0
Les nouveautés de MySQL 8.0
Frederic Descamps
 
Les nouveautés de MySQL 8.0
Les nouveautés de MySQL 8.0Les nouveautés de MySQL 8.0
Les nouveautés de MySQL 8.0
Frederic Descamps
 
State of The Dolphin - May 2021
State of The Dolphin - May 2021State of The Dolphin - May 2021
State of The Dolphin - May 2021
Frederic Descamps
 
Deploying Magento on OCI with MDS
Deploying Magento on OCI with MDSDeploying Magento on OCI with MDS
Deploying Magento on OCI with MDS
Frederic Descamps
 
Ad

Recently uploaded (20)

Bidding World Conference 2027 - NSGF Mexico.pdf
Bidding World Conference 2027 - NSGF Mexico.pdfBidding World Conference 2027 - NSGF Mexico.pdf
Bidding World Conference 2027 - NSGF Mexico.pdf
ISGF - International Scout and Guide Fellowship
 
Bidding World Conference 2027 - Ghana.pptx
Bidding World Conference 2027 - Ghana.pptxBidding World Conference 2027 - Ghana.pptx
Bidding World Conference 2027 - Ghana.pptx
ISGF - International Scout and Guide Fellowship
 
A Bot Identification Model and Tool Based on GitHub Activity Sequences
A Bot Identification Model and Tool Based on GitHub Activity SequencesA Bot Identification Model and Tool Based on GitHub Activity Sequences
A Bot Identification Model and Tool Based on GitHub Activity Sequences
natarajan8993
 
Approach to diabetes Mellitus, diagnosis
Approach to diabetes Mellitus,  diagnosisApproach to diabetes Mellitus,  diagnosis
Approach to diabetes Mellitus, diagnosis
Mohammed Ahmed Bamashmos
 
Besu Shibpur Enquesta 2012 Intra College General Quiz Finals.pptx
Besu Shibpur Enquesta 2012 Intra College General Quiz Finals.pptxBesu Shibpur Enquesta 2012 Intra College General Quiz Finals.pptx
Besu Shibpur Enquesta 2012 Intra College General Quiz Finals.pptx
Rajdeep Chakraborty
 
cardiovascular outcome in trial of new antidiabetic drugs
cardiovascular outcome in trial of new antidiabetic drugscardiovascular outcome in trial of new antidiabetic drugs
cardiovascular outcome in trial of new antidiabetic drugs
Mohammed Ahmed Bamashmos
 
Basic.pptxsksdjsdjdvkfvfvfvfvfvfvfvfvfvvvv
Basic.pptxsksdjsdjdvkfvfvfvfvfvfvfvfvfvvvvBasic.pptxsksdjsdjdvkfvfvfvfvfvfvfvfvfvvvv
Basic.pptxsksdjsdjdvkfvfvfvfvfvfvfvfvfvvvv
hkthmrz42n
 
Speech 2-Unity in Diversity, Strength in Solidarity
Speech 2-Unity in Diversity, Strength in SolidaritySpeech 2-Unity in Diversity, Strength in Solidarity
Speech 2-Unity in Diversity, Strength in Solidarity
Noraini Yunus
 
Setup & Implementation of OutSystems Cloud Connector ODC
Setup & Implementation of OutSystems Cloud Connector ODCSetup & Implementation of OutSystems Cloud Connector ODC
Setup & Implementation of OutSystems Cloud Connector ODC
outsystemspuneusergr
 
2025-05-04 A New Day Dawns 03 (shared slides).pptx
2025-05-04 A New Day Dawns 03 (shared slides).pptx2025-05-04 A New Day Dawns 03 (shared slides).pptx
2025-05-04 A New Day Dawns 03 (shared slides).pptx
Dale Wells
 
Updated treatment of hypothyroidism, causes and symptoms
Updated treatment of hypothyroidism,  causes and symptomsUpdated treatment of hypothyroidism,  causes and symptoms
Updated treatment of hypothyroidism, causes and symptoms
Mohammed Ahmed Bamashmos
 
Reflections on an ngo peace conference in zimbabwe
Reflections on an ngo peace conference in zimbabweReflections on an ngo peace conference in zimbabwe
Reflections on an ngo peace conference in zimbabwe
jujuaw05
 
THE SEXUAL HARASSMENT OF WOMAN AT WORKPLACE (PREVENTION, PROHIBITION & REDRES...
THE SEXUAL HARASSMENT OF WOMAN AT WORKPLACE (PREVENTION, PROHIBITION & REDRES...THE SEXUAL HARASSMENT OF WOMAN AT WORKPLACE (PREVENTION, PROHIBITION & REDRES...
THE SEXUAL HARASSMENT OF WOMAN AT WORKPLACE (PREVENTION, PROHIBITION & REDRES...
ASHISHKUMAR504404
 
Lec 3 - Chapter 2 Carl Jung’s Theory of Personality.pptx
Lec 3 - Chapter 2 Carl Jung’s Theory of Personality.pptxLec 3 - Chapter 2 Carl Jung’s Theory of Personality.pptx
Lec 3 - Chapter 2 Carl Jung’s Theory of Personality.pptx
TayyabaSiddiqui12
 
kurtlewin theory of motivation -181226082203.pptx
kurtlewin theory of motivation -181226082203.pptxkurtlewin theory of motivation -181226082203.pptx
kurtlewin theory of motivation -181226082203.pptx
TayyabaSiddiqui12
 
Bidding World Conference 2027-NSGF Senegal.pdf
Bidding World Conference 2027-NSGF Senegal.pdfBidding World Conference 2027-NSGF Senegal.pdf
Bidding World Conference 2027-NSGF Senegal.pdf
ISGF - International Scout and Guide Fellowship
 
Besu Shibpur Enquesta 2012 Intra College General Quiz Prelims.pptx
Besu Shibpur Enquesta 2012 Intra College General Quiz Prelims.pptxBesu Shibpur Enquesta 2012 Intra College General Quiz Prelims.pptx
Besu Shibpur Enquesta 2012 Intra College General Quiz Prelims.pptx
Rajdeep Chakraborty
 
Bloom Where You Are Planted 05.04.2025.pptx
Bloom Where You Are Planted 05.04.2025.pptxBloom Where You Are Planted 05.04.2025.pptx
Bloom Where You Are Planted 05.04.2025.pptx
FamilyWorshipCenterD
 
ICONX - Presentation - Mining RACE - english - international
ICONX - Presentation - Mining RACE - english - internationalICONX - Presentation - Mining RACE - english - international
ICONX - Presentation - Mining RACE - english - international
Bitcoin Mining RACE
 
Speech 3-A Vision for Tomorrow for GE2025
Speech 3-A Vision for Tomorrow for GE2025Speech 3-A Vision for Tomorrow for GE2025
Speech 3-A Vision for Tomorrow for GE2025
Noraini Yunus
 
A Bot Identification Model and Tool Based on GitHub Activity Sequences
A Bot Identification Model and Tool Based on GitHub Activity SequencesA Bot Identification Model and Tool Based on GitHub Activity Sequences
A Bot Identification Model and Tool Based on GitHub Activity Sequences
natarajan8993
 
Besu Shibpur Enquesta 2012 Intra College General Quiz Finals.pptx
Besu Shibpur Enquesta 2012 Intra College General Quiz Finals.pptxBesu Shibpur Enquesta 2012 Intra College General Quiz Finals.pptx
Besu Shibpur Enquesta 2012 Intra College General Quiz Finals.pptx
Rajdeep Chakraborty
 
cardiovascular outcome in trial of new antidiabetic drugs
cardiovascular outcome in trial of new antidiabetic drugscardiovascular outcome in trial of new antidiabetic drugs
cardiovascular outcome in trial of new antidiabetic drugs
Mohammed Ahmed Bamashmos
 
Basic.pptxsksdjsdjdvkfvfvfvfvfvfvfvfvfvvvv
Basic.pptxsksdjsdjdvkfvfvfvfvfvfvfvfvfvvvvBasic.pptxsksdjsdjdvkfvfvfvfvfvfvfvfvfvvvv
Basic.pptxsksdjsdjdvkfvfvfvfvfvfvfvfvfvvvv
hkthmrz42n
 
Speech 2-Unity in Diversity, Strength in Solidarity
Speech 2-Unity in Diversity, Strength in SolidaritySpeech 2-Unity in Diversity, Strength in Solidarity
Speech 2-Unity in Diversity, Strength in Solidarity
Noraini Yunus
 
Setup & Implementation of OutSystems Cloud Connector ODC
Setup & Implementation of OutSystems Cloud Connector ODCSetup & Implementation of OutSystems Cloud Connector ODC
Setup & Implementation of OutSystems Cloud Connector ODC
outsystemspuneusergr
 
2025-05-04 A New Day Dawns 03 (shared slides).pptx
2025-05-04 A New Day Dawns 03 (shared slides).pptx2025-05-04 A New Day Dawns 03 (shared slides).pptx
2025-05-04 A New Day Dawns 03 (shared slides).pptx
Dale Wells
 
Updated treatment of hypothyroidism, causes and symptoms
Updated treatment of hypothyroidism,  causes and symptomsUpdated treatment of hypothyroidism,  causes and symptoms
Updated treatment of hypothyroidism, causes and symptoms
Mohammed Ahmed Bamashmos
 
Reflections on an ngo peace conference in zimbabwe
Reflections on an ngo peace conference in zimbabweReflections on an ngo peace conference in zimbabwe
Reflections on an ngo peace conference in zimbabwe
jujuaw05
 
THE SEXUAL HARASSMENT OF WOMAN AT WORKPLACE (PREVENTION, PROHIBITION & REDRES...
THE SEXUAL HARASSMENT OF WOMAN AT WORKPLACE (PREVENTION, PROHIBITION & REDRES...THE SEXUAL HARASSMENT OF WOMAN AT WORKPLACE (PREVENTION, PROHIBITION & REDRES...
THE SEXUAL HARASSMENT OF WOMAN AT WORKPLACE (PREVENTION, PROHIBITION & REDRES...
ASHISHKUMAR504404
 
Lec 3 - Chapter 2 Carl Jung’s Theory of Personality.pptx
Lec 3 - Chapter 2 Carl Jung’s Theory of Personality.pptxLec 3 - Chapter 2 Carl Jung’s Theory of Personality.pptx
Lec 3 - Chapter 2 Carl Jung’s Theory of Personality.pptx
TayyabaSiddiqui12
 
kurtlewin theory of motivation -181226082203.pptx
kurtlewin theory of motivation -181226082203.pptxkurtlewin theory of motivation -181226082203.pptx
kurtlewin theory of motivation -181226082203.pptx
TayyabaSiddiqui12
 
Besu Shibpur Enquesta 2012 Intra College General Quiz Prelims.pptx
Besu Shibpur Enquesta 2012 Intra College General Quiz Prelims.pptxBesu Shibpur Enquesta 2012 Intra College General Quiz Prelims.pptx
Besu Shibpur Enquesta 2012 Intra College General Quiz Prelims.pptx
Rajdeep Chakraborty
 
Bloom Where You Are Planted 05.04.2025.pptx
Bloom Where You Are Planted 05.04.2025.pptxBloom Where You Are Planted 05.04.2025.pptx
Bloom Where You Are Planted 05.04.2025.pptx
FamilyWorshipCenterD
 
ICONX - Presentation - Mining RACE - english - international
ICONX - Presentation - Mining RACE - english - internationalICONX - Presentation - Mining RACE - english - international
ICONX - Presentation - Mining RACE - english - international
Bitcoin Mining RACE
 
Speech 3-A Vision for Tomorrow for GE2025
Speech 3-A Vision for Tomorrow for GE2025Speech 3-A Vision for Tomorrow for GE2025
Speech 3-A Vision for Tomorrow for GE2025
Noraini Yunus
 

MySQL Shell : the best DBA tool ?

  • 1. 1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ? file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell.… 1/53 1 / 53
  • 2. 1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ? file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell.… 2/53 2 / 532 / 532 / 53
  • 3. 1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ? file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell.… 3/53 MyMySQLSQL ShellShell:: the best DBA tool ? How to use theHow to use the MyMySQLSQL ShellShell as a framework for DBAsas a framework for DBAs             Frédéric Descamps - MySQL Community Manager - Oracle 3 / 53
  • 4. 1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ? file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell.… 4/53   Safe Harbor Statement The following is intended to outline our general product direction. It is intended for information purpose only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied up in making purchasing decisions. The development, release and timing of any features or functionality described for Oracle´s product remains at the sole discretion of Oracle. Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 4 / 53
  • 5. 1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ? file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell.… 5/53 about me - http://about.me/lefred Who am I ?Who am I ? Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 5 / 53
  • 6. 1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ? file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell.… 6/53 Frédéric Descamps @lefred MySQL Evangelist Hacking MySQL since 3.23 devops believer living in Belgium 🇧🇪 http://lefred.be   Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 6 / 53
  • 7. 1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ? file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell.… 7/53 a new tool MyMySQLSQL ShellShell Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 7 / 53
  • 8. 1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ? file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell.… 8/53 MySQL Shell The MySQL Shell is an interactive Javascript, Python, or SQL interface supporting development and administration for the MySQL Server and is a component of the MySQL Server. You can use the MySQL Shell to perform data queries and updates as well as various administration operations. Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 8 / 53
  • 9. 1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ? file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell.… 9/53 MySQL Shell (2) The MySQL Shell provides: Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 9 / 53
  • 10. 1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ? file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 10/53 MySQL Shell (2) The MySQL Shell provides: Both Interactive and Batch operations Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 10 / 53
  • 11. 1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ? file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 11/53 MySQL Shell (2) The MySQL Shell provides: Both Interactive and Batch operations Document and Relational Models Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 11 / 53
  • 12. 1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ? file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 12/53 MySQL Shell (2) The MySQL Shell provides: Both Interactive and Batch operations Document and Relational Models CRUD Document and Relational APIs via scripting Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 12 / 53
  • 13. 1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ? file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 13/53 MySQL Shell (2) The MySQL Shell provides: Both Interactive and Batch operations Document and Relational Models CRUD Document and Relational APIs via scripting Traditional Table, JSON, Tab Separated output results formats Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 13 / 53
  • 14. 1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ? file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 14/53 MySQL Shell (2) The MySQL Shell provides: Both Interactive and Batch operations Document and Relational Models CRUD Document and Relational APIs via scripting Traditional Table, JSON, Tab Separated output results formats MySQL Standard and X Protocols Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 14 / 53
  • 15. 1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ? file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 15/53 MySQL Shell (2) The MySQL Shell provides: Both Interactive and Batch operations Document and Relational Models CRUD Document and Relational APIs via scripting Traditional Table, JSON, Tab Separated output results formats MySQL Standard and X Protocols and more... Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 15 / 53
  • 16. 1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ? file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 16/53 MySQL Shell and Python When using the python mode in the Shell, it's possible to use system modules (local). Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 16 / 53
  • 17. 1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ? file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 17/53 MySQL Shell and Python (2) Of course this can be any type of modules: Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 17 / 53
  • 18. 1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ? file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 18/53 MySQL Shell and Python (2) Of course this can be any type of modules: Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 18 / 53
  • 19. 1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ? file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 19/53 we want more ! ExtendingExtending MyMySQLSQL ShellShell Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 19 / 53
  • 20. 1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ? file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 20/53 Extending MySQL Shell It's then possible to create your own modules to extend MySQL Shell. Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 20 / 53
  • 21. 1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ? file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 21/53 Extending MySQL Shell It's then possible to create your own modules to extend MySQL Shell. For calling some long statements or group of operations or sometimes to replace a missing functionality. Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 21 / 53
  • 22. 1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ? file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 22/53 Extending MySQL Shell It's then possible to create your own modules to extend MySQL Shell. For calling some long statements or group of operations or sometimes to replace a missing functionality. Recently, somebody pointed out that since the new DD it was not anymore possible to delete all routines for a specific schema. Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 22 / 53
  • 23. 1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ? file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 23/53 Extending MySQL Shell It's then possible to create your own modules to extend MySQL Shell. For calling some long statements or group of operations or sometimes to replace a missing functionality. Recently, somebody pointed out that since the new DD it was not anymore possible to delete all routines for a specific schema. Jesper explained recently how the MySQL Shell could help here see https://mysql.wisborg.dk/2018/12/02/mysql-8-drop-several-stored-events- procedures-or-functions/ Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 23 / 53
  • 24. 1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ? file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 24/53 Extending MySQL Shell Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 24 / 53
  • 25. 1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ? file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 25/53 Extending MySQL Shell Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 25 / 53
  • 26. 1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ? file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 26/53 Extending MySQL Shell Or for example, retrieve the expiration period of passwords (see https://lefred.be/content/mysql-when-will-the-password-of-my-users-expire/): Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 26 / 53
  • 27. 1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ? file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 27/53 Extending MySQL Shell Another example, retrieve the tables potentially fragmented (see https://lefred.be/content/overview-of-fragmented-mysql-innodb-tables/): Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 27 / 53
  • 28. 1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ? file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 28/53 Extending MySQL Shell Recently somebody complained about the complexity of knowing what are the default values of columns when expressions are used (https://forums.mysql.com/read.php? 101,670682,670682): Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 28 / 53
  • 29. 1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ? file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 29/53 Contribute to MySQL Shell DBA Toolkit ? Get the code from https://github.com/lefred/mysql-shell-mydba and Pull Requests are welcome ! Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 29 / 53
  • 30. 1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ? file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 30/53 we want even more ! InnoInnotoptop Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 30 / 53
  • 31. 1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ? file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 31/53 Innotop As maintainer of Innotop, after doing so delayed maintenance, I started a poll on Twitter: Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 31 / 53
  • 32. 1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ? file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 32/53 Innotop (2) So Innotop is not dead... but it's very complex to maintain... Perl ! Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 32 / 53
  • 33. 1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ? file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 33/53 Innotop (2) So Innotop is not dead... but it's very complex to maintain... Perl ! This is maybe the reason there is less and less contributors... Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 33 / 53
  • 34. 1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ? file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 34/53 Innotop (2) So Innotop is not dead... but it's very complex to maintain... Perl ! This is maybe the reason there is less and less contributors... ... so and MySQL Shell then ? Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 34 / 53
  • 35. 1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ? file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 35/53 Innotop in MySQL Shell Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 35 / 53
  • 36. 1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ? file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 36/53 Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 00:05 36 / 53
  • 37. 1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ? file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 37/53 Innotop in MySQL Shell How to use it ?How to use it ? Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 37 / 53
  • 38. 1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ? file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 38/53 How to use this module in MySQL Shell ? The module is available on github: https://github.com/lefred/mysql-shell-innotop Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 38 / 53
  • 39. 1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ? file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 39/53 How to use this module in MySQL Shell ? The module is available on github: https://github.com/lefred/mysql-shell-innotop $ mysqlsh --py root@localhost importimport sys sys.path.append('/home/fred/workspace/mysql-shell-innotop') importimport innotop Py> innotop.session_processlist.run() Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 39 / 53
  • 40. 1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ? file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 40/53 How to use this module in MySQL Shell ? The module is available on github: https://github.com/lefred/mysql-shell-innotop $ mysqlsh --py root@localhost importimport sys sys.path.append('/home/fred/workspace/mysql-shell-innotop') importimport innotop Py> innotop.session_processlist.run() Add in ~/.mysqlsh/mysqlshrc.py: importimport sys sys.path.append('/home/fred/workspace/mysql-shell-innotop') importimport innotop Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 40 / 53
  • 41. 1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ? file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 41/53 does it work everywhere ? LimitationsLimitations Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 41 / 53
  • 42. 1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ? file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 42/53 Limitations requires ncurses Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 42 / 53
  • 43. 1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ? file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 43/53 Limitations requires ncurses works almost exclusively on Gnu/Linux Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 43 / 53
  • 44. 1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ? file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 44/53 I want to contribute ! How to write your own extension ?How to write your own extension ? Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 44 / 53
  • 45. 1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ? file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 45/53 Creating you own extension All extensions are a single file located in the modulesmodules folder: [fred@imac2 mysql-shell-innotop] $ ls modules/*py modules/common.py modules/global_by_ le_by_bytes.py modules/help.py modules/__init__.py modules/session_processlist.py modules/thread_info.py Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 45 / 53
  • 46. 1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ? file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 46/53 Skeleton of an extension Every extension starts the same way and requires some mandatory modules: Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 46 / 53
  • 47. 1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ? file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 47/53 Skeleton of an extension Every extension starts the same way and requires some mandatory modules: importimport __builtin__ importimport curses fromfrom datetime importimport datetime fromfrom time importimport sleep importimport innotop Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 47 / 53
  • 48. 1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ? file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 48/53 Skeleton of an extension Every extension starts the same way and requires some mandatory modules: importimport __builtin__ importimport curses fromfrom datetime importimport datetime fromfrom time importimport sleep importimport innotop Then you need to specify the shortcuts that calls the functions: Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 48 / 53
  • 49. 1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ? file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 49/53 Skeleton of an extension Every extension starts the same way and requires some mandatory modules: importimport __builtin__ importimport curses fromfrom datetime importimport datetime fromfrom time importimport sleep importimport innotop Then you need to specify the shortcuts that calls the functions: innotop.shortcut['h']={'return': 'help', 'stdscr': FalseFalse} Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 49 / 53
  • 50. 1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ? file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 50/53 Skeleton of an extension Every extension starts the same way and requires some mandatory modules: importimport __builtin__ importimport curses fromfrom datetime importimport datetime fromfrom time importimport sleep importimport innotop Then you need to specify the shortcuts that calls the functions: innotop.shortcut['h']={'return': 'help', 'stdscr': FalseFalse} return:return: name of the module (help.py) stdscr:stdscr: use the same screen (and pass it to the function) Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 50 / 53
  • 51. 1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ? file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 51/53 Skeleton of an extension - run() defdef runrun(session, delay=1, back=False): stdscr, info = innotop.common.setup(curses, session) keep_running = TrueTrue whilewhile keep_running: time = datetime.now() y,x = innotop.common.topbar(curses, stdscr, info) <your code> # Wait until delay seconds have passed while listening for the q key whilewhile (datetime.now() - time).total_seconds() < delay: c = stdscr.getch() ifif c == ord("q"): keep_running = FalseFalse breakbreak ifif notnot back: # Reset the cures behavior and nish curses.nocbreak() stdscr.keypad(FalseFalse) curses.echo() curses.endwin Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 51 / 53
  • 52. 1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ? file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 52/53 Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 52 / 53
  • 53. 1/18/2019 pre FOSDEM MySQL Day - MySQL Shell : the best DBA tool ? file:///home/fred/ownCloud/Presentations/ORACLE/FOSDEM2019/MySQL%20Day%20-%20MySQL%20Shell/MySQL%20Day%20-%20MySQL%20Shell… 53/53 Thank you ! Any Questions ? share your 💕 for MySQL on social media using @mysql #MySQL8isGreat #MySQLDay #MySQLShell Copyright @ 2019 Oracle and/or its affiliates. All rights reserved. 53 / 53