About the Author |
|
xiii | |
About the Technical Reviewer |
|
xv | |
Acknowledgments |
|
xvii | |
Introduction |
|
xix | |
Chapter 1 Introducing the MySQL Shell |
|
1 | (28) |
|
Getting To Know the MySQL Shell |
|
|
2 | (7) |
|
|
2 | (3) |
|
|
5 | (4) |
|
|
9 | (8) |
|
|
9 | (6) |
|
X Plugin, X Protocol, and X DevAPI |
|
|
15 | (1) |
|
|
16 | (1) |
|
|
17 | (6) |
|
|
18 | (1) |
|
|
19 | (2) |
|
Removed Options, Variables, and Features |
|
|
21 | (2) |
|
Paradigm Shifting Features |
|
|
23 | (3) |
|
|
23 | (1) |
|
|
24 | (1) |
|
|
25 | (1) |
|
|
26 | (3) |
Chapter 2 Installing the MySQL Shell |
|
29 | (46) |
|
Preparing to Install the MySQL Shell |
|
|
29 | (3) |
|
|
29 | (1) |
|
How to Get the MySQL Shell |
|
|
30 | (2) |
|
Installing on Windows with the MySQL Installer |
|
|
32 | (17) |
|
|
49 | (13) |
|
|
51 | (6) |
|
Installing the MySQL Shell |
|
|
57 | (5) |
|
Installing on Linux (Ubuntu) with the APT Repository |
|
|
62 | (11) |
|
Downloading the APT Repository |
|
|
63 | (2) |
|
Installing the APT Repository |
|
|
65 | (1) |
|
|
66 | (4) |
|
|
70 | (3) |
|
|
73 | (2) |
Chapter 3 MySQL Shell Tutorial |
|
75 | (44) |
|
|
75 | (8) |
|
|
76 | (1) |
|
|
77 | (3) |
|
|
80 | (3) |
|
Getting Started with the MySQL Shell |
|
|
83 | (5) |
|
|
85 | (3) |
|
|
88 | (5) |
|
|
88 | (2) |
|
|
90 | (1) |
|
Using Connections in Scripts |
|
|
90 | (1) |
|
|
91 | (2) |
|
Working with the MySQL Shell |
|
|
93 | (25) |
|
Installing the Sample Database |
|
|
93 | (3) |
|
|
96 | (8) |
|
|
104 | (4) |
|
|
108 | (1) |
|
|
109 | (2) |
|
|
111 | (4) |
|
Working with Saved Passwords |
|
|
115 | (1) |
|
|
116 | (2) |
|
|
118 | (1) |
Chapter 4 Using the Shell with SQL Databases |
|
119 | (58) |
|
Revisiting Relational Databases |
|
|
119 | (5) |
|
Working with MySQL Commands and Functions |
|
|
124 | (22) |
|
|
124 | (1) |
|
Creating Users and Granting Access |
|
|
125 | (1) |
|
Creating Databases and Tables |
|
|
126 | (3) |
|
|
129 | (1) |
|
|
130 | (1) |
|
|
131 | (1) |
|
|
132 | (7) |
|
|
139 | (1) |
|
|
140 | (1) |
|
|
141 | (3) |
|
Additional Advanced Concepts |
|
|
144 | (2) |
|
Managing Your Database with Python |
|
|
146 | (29) |
|
|
147 | (7) |
|
CRUD Operations (Relational Data) |
|
|
154 | (16) |
|
Getting Started Writing Python Scripts |
|
|
170 | (5) |
|
|
175 | (2) |
Chapter 5 Example: SQL Database Development |
|
177 | (54) |
|
|
177 | (15) |
|
Sample Application Concept |
|
|
178 | (3) |
|
|
181 | (9) |
|
|
190 | (2) |
|
|
192 | (2) |
|
|
194 | (36) |
|
|
195 | (7) |
|
|
202 | (7) |
|
|
209 | (9) |
|
|
218 | (2) |
|
|
220 | (1) |
|
|
221 | (1) |
|
|
221 | (1) |
|
|
222 | (1) |
|
Testing the Class Modules |
|
|
222 | (8) |
|
|
230 | (1) |
Chapter 6 Using the Shell with a Document Store |
|
231 | (44) |
|
|
231 | (5) |
|
Origins: Key, Value Mechanisms |
|
|
232 | (2) |
|
Application Programming Interface |
|
|
234 | (1) |
|
|
234 | (1) |
|
|
235 | (1) |
|
|
235 | (1) |
|
Introducing JSON Documents in MySQL |
|
|
236 | (1) |
|
|
237 | (2) |
|
|
239 | (33) |
|
Formatting JSON Strings in MySQL |
|
|
240 | (1) |
|
Using JSON Strings in SQL Statements |
|
|
241 | (3) |
|
|
244 | (5) |
|
|
249 | (23) |
|
|
272 | (3) |
Chapter 7 Example: Document Store Development |
|
275 | (62) |
|
|
275 | (17) |
|
Sample Application Concept |
|
|
276 | (5) |
|
|
281 | (10) |
|
|
291 | (1) |
|
|
292 | (18) |
|
Converting Relational Data to a Document Store |
|
|
293 | (15) |
|
Importing Data to a Document Store |
|
|
308 | (2) |
|
|
310 | (24) |
|
|
311 | (8) |
|
|
319 | (9) |
|
Testing the Class Modules |
|
|
328 | (6) |
|
|
334 | (3) |
Chapter 8 Using the Shell with Group Replication |
|
337 | (30) |
|
|
338 | (10) |
|
What is High Availability? |
|
|
338 | (3) |
|
MySQL High Availability Features |
|
|
341 | (1) |
|
What is MySQL Replication? |
|
|
342 | (2) |
|
What is Group Replication? |
|
|
344 | (4) |
|
|
348 | (1) |
|
|
349 | (17) |
|
Initialize the Data Directories |
|
|
350 | (1) |
|
|
351 | (2) |
|
|
353 | (2) |
|
Start the MySQL Instances |
|
|
355 | (2) |
|
Create the Replication User Account |
|
|
357 | (1) |
|
Connect the Slaves to the Master |
|
|
358 | (2) |
|
|
360 | (3) |
|
Verify Replication Status |
|
|
363 | (2) |
|
Shutting Down Replication |
|
|
365 | (1) |
|
|
366 | (1) |
Chapter 9 Example: Group Replication Setup and Administration |
|
367 | (26) |
|
|
367 | (4) |
|
Concepts, Terms, and Lingo |
|
|
368 | (2) |
|
Group Replication Fault Tolerance |
|
|
370 | (1) |
|
|
371 | (1) |
|
|
371 | (17) |
|
Initialize the Data Directories |
|
|
373 | (1) |
|
|
374 | (5) |
|
Start the MySQL Instances |
|
|
379 | (2) |
|
Create the Replication User Account |
|
|
381 | (1) |
|
Start Group Replication on the Primary |
|
|
382 | (1) |
|
Connect the Secondaries to the Primary |
|
|
382 | (1) |
|
Start Group Replication on the Secondaries |
|
|
383 | (1) |
|
Verify Group Replication Status |
|
|
383 | (5) |
|
Shutting Down Group Replication |
|
|
388 | (1) |
|
Demonstration of Failover |
|
|
388 | (3) |
|
|
391 | (2) |
Chapter 10 Using the Shell with InnoDB Cluster |
|
393 | (20) |
|
|
393 | (12) |
|
|
397 | (6) |
|
|
403 | (1) |
|
|
403 | (1) |
|
|
403 | (1) |
|
|
404 | (1) |
|
Using InnoDB with Applications |
|
|
405 | (2) |
|
|
407 | (5) |
|
|
407 | (4) |
|
Overview of Installing InnoDB Cluster |
|
|
411 | (1) |
|
|
412 | (1) |
Chapter 11 Example: InnoDB Cluster Setup and Administration |
|
413 | (38) |
|
|
413 | (8) |
|
|
414 | (5) |
|
|
419 | (2) |
|
|
421 | (24) |
|
Create and Deploy Instances in the Sandbox |
|
|
423 | (3) |
|
|
426 | (2) |
|
Add the Instances to the Cluster |
|
|
428 | (2) |
|
Check the Status of the Cluster |
|
|
430 | (2) |
|
|
432 | (5) |
|
|
437 | (8) |
|
|
445 | (5) |
|
|
446 | (1) |
|
|
447 | (3) |
|
|
450 | (1) |
Chapter 12 Appendix |
|
451 | (42) |
|
|
451 | (7) |
|
|
453 | (1) |
|
|
454 | (1) |
|
Installing Flask-Bootstrap |
|
|
455 | (1) |
|
|
456 | (1) |
|
|
457 | (1) |
|
Installing Connector/Python |
|
|
457 | (1) |
|
|
458 | (22) |
|
|
459 | (2) |
|
Initialization and the Application Instance |
|
|
461 | (9) |
|
|
470 | (7) |
|
|
477 | (2) |
|
|
479 | (1) |
|
|
480 | (1) |
|
Flask Review: Sample Application |
|
|
480 | (13) |
|
|
481 | (2) |
|
Running the Sample Application |
|
|
483 | (6) |
|
How to Use the Application |
|
|
489 | (1) |
|
CRUD Operations in the Application |
|
|
490 | (1) |
|
Shutting Down the Sample Application |
|
|
491 | (2) |
Index |
|
493 | |