(Go: >> BACK << -|- >> HOME <<)

SlideShare a Scribd company logo
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
MySQL High Availability
InnoDB Cluster
Keith Hollman
MySQL Principal Solution Architect
keith.hollman@oracle.com
DEMO
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Safe Harbor Statement
The following is intended to outline our general product direction. It is intended for
information purposes 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 upon
in making purchasing decisions. The development, release, and timing of any features or
functionality described for Oracle’s products remains at the sole discretion of Oracle.
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Install MySQL 8.0
• We have previously downloaded the latest comercial rpm bundles from
https://edelivery.oracle.com.
$ sudo yum install -y python numactl
$ sudo yum install -y mysql-commercial-*8.0.12*rpm mysql-router-commercial-
8.0.12-1.1.el7.x86_64.rpm mysql-shell-commercial-8.0.12-1.1.el7.x86_64.rpm
$ sudo systemctl start mysqld.service
$ sudo systemctl enable mysqld.service
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Post-Install
• Change the root password:
$ sudo grep 'A temporary password is generated for root@localhost' /var/log/mysqld.log
|tail -1
$ mysql -uroot -p
SET sql_log_bin = OFF;
alter user 'root'@'localhost' identified by 'Oracle20!8';
create user 'ic'@'%' identified by 'Oracle20!8';
grant all on *.* to 'ic'@'%' with grant option;
flush privileges;
SET sql_log_bin = ON;
exit
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
MySQL Shell CLI
• Just so that we understand what this means:
$ mysqlsh --uri root@localhost:3306
Please provide the password for 'root@localhost:3306': **********
Save password for 'root@localhost:3306'? [Y]es/[N]o/Ne[v]er (default No): y
• Making things simple, i.e. password is cached for our o.s. session.
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Preparing the instances
• Check that the instances are a good candidates for joing the cluster: (Run
commands below for all three instances)
dba.checkInstanceConfiguration('ic@ic1:3306');
• If check instance spots any issues, solve these by running:
dba.configureInstance('ic@ic1:3306');
• All parameters that need
changing will be changed in the
my.cnf if we accept the
interactive questions:
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Preparing the instances (cont)
• Configuration options added by configureInstance ("SET PERSIST") can be
found in file: mysqldata/mysqld-auto.cnf You can also view these changes
in MySQL by running:
c root@localhost:3306
sql
select * from performance_schema.persisted_variables;
• To see all variables and their source run:
mysql -uroot -e "SELECT * FROM performance_schema.variables_info WHERE
variable_source != 'COMPILED';"
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Create Cluster
• On just one instance, start shell and run:
connect ic@ic1:3306
cluster=dba.createCluster("mycluster");
cluster.status();
cluster.addInstance("ic@ic2:3306");
cluster.addInstance("ic@ic3:3306");
cluster.status();
• You can connect from any host, eg. ic2, using mysqlsh to any other
instance, eg. c ic@ic1:3306 and follow the same steps, consecutively, on
the same instance.
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Checking InnoDB Cluster status
• Connect IDc to a specific MySQL instance using shell:
mysqlsh -uic -hic2 -P3306
• And run:
cluster = dba.getCluster();
cluster.status();
• From performance_schema:
sql
SELECT * FROM performance_schema.replication_group_membersG
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
• We will run the MySQL Router process on
ic2:
$ sudo -i
$ mkdir -p /opt/mysql/myrouter
$ chown -R mysql:mysql /opt/mysql/myrouter
$ cd /opt/mysql
$ mysqlrouter --bootstrap ic@ic2:3306 -d
/opt/mysql/myrouter -u mysql
Please enter MySQL password for ic:
Bootstrapping MySQL Router instance at
'/opt/mysql/myrouter'...
Executing statements failed with: 'Error executing MySQL
query: The MySQL server is running with the --super-read-only
option so it cannot execute this statement (1290)' (1290),
trying to connect to another node
Fetching Group Replication Members
disconnecting from mysql-server
trying to connecting to mysql-server at ic1:3306
Checking for old Router accounts
Creating account mysql_router3_53c1tbork49d@'%'
MySQL Router has now been configured for the InnoDB cluster
'mycluster'.
The following connection information can be used to connect
to the cluster.
Classic MySQL protocol connections to cluster 'mycluster':
- Read/Write Connections: localhost:6446
- Read/Only Connections: localhost:6447
X protocol connections to cluster 'mycluster':
- Read/Write Connections: localhost:64460
- Read/Only Connections: localhost:64470
• As the master was ic1, and we ran the
bootstrap from ic2, super-read-only
mode was detected and hence the
master, ic1, was used.
• Now to start the Router process:
$ ./myrouter/start.sh
MySQL Router
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
• On ic1, test the connection to both the RW
port, 6446, and the RO port, 6447 of
Router, that, remember, is running on ic2:
$ mysql -uic -p -P6446 -hic2 -e "select @@hostname"
$ mysql -uic -p -P6446 -hic2 -e "select @@hostname"
$ mysql -uic -p -P6446 -hic2 -e "select @@hostname"
$ mysql -uic -p -P6447 -hic2 -e "select @@hostname"
$ mysql -uic -p -P6447 -hic2 -e "select @@hostname"
$ mysql -uic -p -P6447 -hic2 -e "select @@hostname"
• The same on ic3:
$ mysql -uic -p -P6446 -hic2 -e "select @@hostname"
$ mysql -uic -p -P6446 -hic2 -e "select @@hostname"
$ mysql -uic -p -P6446 -hic2 -e "select @@hostname"
$ mysql -uic -p -P6447 -hic2 -e "select @@hostname"
$ mysql -uic -p -P6447 -hic2 -e "select @@hostname"
$ mysql -uic -p -P6447 -hic2 -e "select @@hostname"
• You should see all RW connections show
ic1, as well as all RO connections use
round-robin between the RO slaves, i.e.
ic2 & ic3.
MySQL Router: testing
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
More examples & Information
• https://mysqlserverteam.com/mysql-innodb-cluster-8-0-a-hands-on-
tutorial/
• https://github.com/wwwted/MySQL-InnoDB-Cluster-3VM-Setup
• https://mysqlmed.wordpress.com/2017/11/09/innodb-cluster-setting-up-
production-for-disaster-1-2/ (MySQL 5.7)
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Preguntas?
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
MySQL 8.0 InnoDB Cluster demo

More Related Content

What's hot

MySQL 5.7: Focus on InnoDB
MySQL 5.7: Focus on InnoDBMySQL 5.7: Focus on InnoDB
MySQL 5.7: Focus on InnoDB
Mario Beck
 
What's New in MySQL 8.0 @ HKOSC 2017
What's New in MySQL 8.0 @ HKOSC 2017What's New in MySQL 8.0 @ HKOSC 2017
What's New in MySQL 8.0 @ HKOSC 2017
Ivan Ma
 
MySQL 5.7: What's New, Nov. 2015
MySQL 5.7: What's New, Nov. 2015MySQL 5.7: What's New, Nov. 2015
MySQL 5.7: What's New, Nov. 2015
Mario Beck
 
MySQL Shell - The Best MySQL DBA Tool
MySQL Shell - The Best MySQL DBA ToolMySQL Shell - The Best MySQL DBA Tool
MySQL Shell - The Best MySQL DBA Tool
Miguel Araújo
 
MySQL 5.7 -- SCaLE Feb 2014
MySQL 5.7 -- SCaLE Feb 2014MySQL 5.7 -- SCaLE Feb 2014
MySQL 5.7 -- SCaLE Feb 2014
Dave Stokes
 
My sql 5.6&MySQL Cluster 7.3
My sql 5.6&MySQL Cluster 7.3My sql 5.6&MySQL Cluster 7.3
My sql 5.6&MySQL Cluster 7.3
Oleksii(Alexey) Porytskyi
 
Unlocking Big Data Insights with MySQL
Unlocking Big Data Insights with MySQLUnlocking Big Data Insights with MySQL
Unlocking Big Data Insights with MySQL
Matt Lord
 
What's new in my sql smug
What's new in my sql smugWhat's new in my sql smug
What's new in my sql smug
Ted Wennmark
 
MySQL InnoDB Cluster - A complete High Availability solution for MySQL
MySQL InnoDB Cluster - A complete High Availability solution for MySQLMySQL InnoDB Cluster - A complete High Availability solution for MySQL
MySQL InnoDB Cluster - A complete High Availability solution for MySQL
Olivier DASINI
 
MySQL :What's New #GIDS16
MySQL :What's New #GIDS16MySQL :What's New #GIDS16
MySQL :What's New #GIDS16
Sanjay Manwani
 
Introduction to MySQL
Introduction to MySQLIntroduction to MySQL
Introduction to MySQL
Ted Wennmark
 
MySQL for Software-as-a-Service (SaaS)
MySQL for Software-as-a-Service (SaaS)MySQL for Software-as-a-Service (SaaS)
MySQL for Software-as-a-Service (SaaS)
Mario Beck
 
MySQL Document Store for Modern Applications
MySQL Document Store for Modern ApplicationsMySQL Document Store for Modern Applications
MySQL Document Store for Modern Applications
Olivier DASINI
 
Conference slides: MySQL Cluster Performance Tuning
Conference slides: MySQL Cluster Performance TuningConference slides: MySQL Cluster Performance Tuning
Conference slides: MySQL Cluster Performance Tuning
Severalnines
 
MySQL 5.6 Updates
MySQL 5.6 UpdatesMySQL 5.6 Updates
MySQL 5.6 Updates
Dave Stokes
 
MySQL High Availability and Disaster Recovery with Continuent, a VMware company
MySQL High Availability and Disaster Recovery with Continuent, a VMware companyMySQL High Availability and Disaster Recovery with Continuent, a VMware company
MySQL High Availability and Disaster Recovery with Continuent, a VMware company
Continuent
 
My sql5.7 whatsnew_presentedatgids2015
My sql5.7 whatsnew_presentedatgids2015My sql5.7 whatsnew_presentedatgids2015
My sql5.7 whatsnew_presentedatgids2015
Sanjay Manwani
 
MySQL Enterprise Backup apr 2016
MySQL Enterprise Backup apr 2016MySQL Enterprise Backup apr 2016
MySQL Enterprise Backup apr 2016
Ted Wennmark
 
MySQL High Availibility Solutions
MySQL High Availibility SolutionsMySQL High Availibility Solutions
MySQL High Availibility Solutions
Mark Swarbrick
 
NoSQL and MySQL: News about JSON
NoSQL and MySQL: News about JSONNoSQL and MySQL: News about JSON
NoSQL and MySQL: News about JSON
Mario Beck
 

What's hot (20)

MySQL 5.7: Focus on InnoDB
MySQL 5.7: Focus on InnoDBMySQL 5.7: Focus on InnoDB
MySQL 5.7: Focus on InnoDB
 
What's New in MySQL 8.0 @ HKOSC 2017
What's New in MySQL 8.0 @ HKOSC 2017What's New in MySQL 8.0 @ HKOSC 2017
What's New in MySQL 8.0 @ HKOSC 2017
 
MySQL 5.7: What's New, Nov. 2015
MySQL 5.7: What's New, Nov. 2015MySQL 5.7: What's New, Nov. 2015
MySQL 5.7: What's New, Nov. 2015
 
MySQL Shell - The Best MySQL DBA Tool
MySQL Shell - The Best MySQL DBA ToolMySQL Shell - The Best MySQL DBA Tool
MySQL Shell - The Best MySQL DBA Tool
 
MySQL 5.7 -- SCaLE Feb 2014
MySQL 5.7 -- SCaLE Feb 2014MySQL 5.7 -- SCaLE Feb 2014
MySQL 5.7 -- SCaLE Feb 2014
 
My sql 5.6&MySQL Cluster 7.3
My sql 5.6&MySQL Cluster 7.3My sql 5.6&MySQL Cluster 7.3
My sql 5.6&MySQL Cluster 7.3
 
Unlocking Big Data Insights with MySQL
Unlocking Big Data Insights with MySQLUnlocking Big Data Insights with MySQL
Unlocking Big Data Insights with MySQL
 
What's new in my sql smug
What's new in my sql smugWhat's new in my sql smug
What's new in my sql smug
 
MySQL InnoDB Cluster - A complete High Availability solution for MySQL
MySQL InnoDB Cluster - A complete High Availability solution for MySQLMySQL InnoDB Cluster - A complete High Availability solution for MySQL
MySQL InnoDB Cluster - A complete High Availability solution for MySQL
 
MySQL :What's New #GIDS16
MySQL :What's New #GIDS16MySQL :What's New #GIDS16
MySQL :What's New #GIDS16
 
Introduction to MySQL
Introduction to MySQLIntroduction to MySQL
Introduction to MySQL
 
MySQL for Software-as-a-Service (SaaS)
MySQL for Software-as-a-Service (SaaS)MySQL for Software-as-a-Service (SaaS)
MySQL for Software-as-a-Service (SaaS)
 
MySQL Document Store for Modern Applications
MySQL Document Store for Modern ApplicationsMySQL Document Store for Modern Applications
MySQL Document Store for Modern Applications
 
Conference slides: MySQL Cluster Performance Tuning
Conference slides: MySQL Cluster Performance TuningConference slides: MySQL Cluster Performance Tuning
Conference slides: MySQL Cluster Performance Tuning
 
MySQL 5.6 Updates
MySQL 5.6 UpdatesMySQL 5.6 Updates
MySQL 5.6 Updates
 
MySQL High Availability and Disaster Recovery with Continuent, a VMware company
MySQL High Availability and Disaster Recovery with Continuent, a VMware companyMySQL High Availability and Disaster Recovery with Continuent, a VMware company
MySQL High Availability and Disaster Recovery with Continuent, a VMware company
 
My sql5.7 whatsnew_presentedatgids2015
My sql5.7 whatsnew_presentedatgids2015My sql5.7 whatsnew_presentedatgids2015
My sql5.7 whatsnew_presentedatgids2015
 
MySQL Enterprise Backup apr 2016
MySQL Enterprise Backup apr 2016MySQL Enterprise Backup apr 2016
MySQL Enterprise Backup apr 2016
 
MySQL High Availibility Solutions
MySQL High Availibility SolutionsMySQL High Availibility Solutions
MySQL High Availibility Solutions
 
NoSQL and MySQL: News about JSON
NoSQL and MySQL: News about JSONNoSQL and MySQL: News about JSON
NoSQL and MySQL: News about JSON
 

Similar to MySQL 8.0 InnoDB Cluster demo

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 NoSQL APIs
MySQL NoSQL APIsMySQL NoSQL APIs
MySQL NoSQL APIs
Morgan Tocker
 
The State of the Dolphin, MySQL Keynote at Percona Live Europe 2019, Amsterda...
The State of the Dolphin, MySQL Keynote at Percona Live Europe 2019, Amsterda...The State of the Dolphin, MySQL Keynote at Percona Live Europe 2019, Amsterda...
The State of the Dolphin, MySQL Keynote at Percona Live Europe 2019, Amsterda...
Geir Høydalsvik
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Miguel Araújo
 
MySQL NoSQL JSON JS Python "Document Store" demo
MySQL NoSQL JSON JS Python "Document Store" demoMySQL NoSQL JSON JS Python "Document Store" demo
MySQL NoSQL JSON JS Python "Document Store" demo
Keith Hollman
 
MySQL Shell/AdminAPI - MySQL Architectures Made Easy For All!
MySQL Shell/AdminAPI - MySQL Architectures Made Easy For All!MySQL Shell/AdminAPI - MySQL Architectures Made Easy For All!
MySQL Shell/AdminAPI - MySQL Architectures Made Easy For All!
Miguel Araújo
 
Oracle 11g R2 RAC setup on rhel 5.0
Oracle 11g R2 RAC setup on rhel 5.0Oracle 11g R2 RAC setup on rhel 5.0
Oracle 11g R2 RAC setup on rhel 5.0
Santosh Kangane
 
Curso de MySQL 5.7
Curso de MySQL 5.7Curso de MySQL 5.7
Curso de MySQL 5.7
Eduardo Legatti
 
2019 indit blackhat_honeypot your database server
2019 indit blackhat_honeypot your database server2019 indit blackhat_honeypot your database server
2019 indit blackhat_honeypot your database server
Georgi Kodinov
 
MySQL Manchester TT - Performance Tuning
MySQL Manchester TT  - Performance TuningMySQL Manchester TT  - Performance Tuning
MySQL Manchester TT - Performance Tuning
Mark Swarbrick
 
20200613 my sql-ha-deployment
20200613 my sql-ha-deployment20200613 my sql-ha-deployment
20200613 my sql-ha-deployment
Ivan Ma
 
Solving Performance Problems Using MySQL Enterprise Monitor
Solving Performance Problems Using MySQL Enterprise MonitorSolving Performance Problems Using MySQL Enterprise Monitor
Solving Performance Problems Using MySQL Enterprise Monitor
OracleMySQL
 
My sql8 innodb_cluster
My sql8 innodb_clusterMy sql8 innodb_cluster
My sql8 innodb_cluster
Mysql User Camp
 
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
 
MySQL Security and Standardization at PayPal - Percona Live 2019
MySQL Security and Standardization at PayPal - Percona Live 2019MySQL Security and Standardization at PayPal - Percona Live 2019
MySQL Security and Standardization at PayPal - Percona Live 2019
Yashada Jadhav
 
MySQL Replication
MySQL ReplicationMySQL Replication
MySQL Replication
Mark Swarbrick
 
MySQL on Docker and Kubernetes
MySQL on Docker and KubernetesMySQL on Docker and Kubernetes
MySQL on Docker and Kubernetes
Balasubramanian Kandasamy
 
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 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
 
20160821 coscup-my sql57docstorelab01
20160821 coscup-my sql57docstorelab0120160821 coscup-my sql57docstorelab01
20160821 coscup-my sql57docstorelab01
Ivan Ma
 

Similar to MySQL 8.0 InnoDB Cluster demo (20)

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
 
MySQL NoSQL APIs
MySQL NoSQL APIsMySQL NoSQL APIs
MySQL NoSQL APIs
 
The State of the Dolphin, MySQL Keynote at Percona Live Europe 2019, Amsterda...
The State of the Dolphin, MySQL Keynote at Percona Live Europe 2019, Amsterda...The State of the Dolphin, MySQL Keynote at Percona Live Europe 2019, Amsterda...
The State of the Dolphin, MySQL Keynote at Percona Live Europe 2019, Amsterda...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
MySQL NoSQL JSON JS Python "Document Store" demo
MySQL NoSQL JSON JS Python "Document Store" demoMySQL NoSQL JSON JS Python "Document Store" demo
MySQL NoSQL JSON JS Python "Document Store" demo
 
MySQL Shell/AdminAPI - MySQL Architectures Made Easy For All!
MySQL Shell/AdminAPI - MySQL Architectures Made Easy For All!MySQL Shell/AdminAPI - MySQL Architectures Made Easy For All!
MySQL Shell/AdminAPI - MySQL Architectures Made Easy For All!
 
Oracle 11g R2 RAC setup on rhel 5.0
Oracle 11g R2 RAC setup on rhel 5.0Oracle 11g R2 RAC setup on rhel 5.0
Oracle 11g R2 RAC setup on rhel 5.0
 
Curso de MySQL 5.7
Curso de MySQL 5.7Curso de MySQL 5.7
Curso de MySQL 5.7
 
2019 indit blackhat_honeypot your database server
2019 indit blackhat_honeypot your database server2019 indit blackhat_honeypot your database server
2019 indit blackhat_honeypot your database server
 
MySQL Manchester TT - Performance Tuning
MySQL Manchester TT  - Performance TuningMySQL Manchester TT  - Performance Tuning
MySQL Manchester TT - Performance Tuning
 
20200613 my sql-ha-deployment
20200613 my sql-ha-deployment20200613 my sql-ha-deployment
20200613 my sql-ha-deployment
 
Solving Performance Problems Using MySQL Enterprise Monitor
Solving Performance Problems Using MySQL Enterprise MonitorSolving Performance Problems Using MySQL Enterprise Monitor
Solving Performance Problems Using MySQL Enterprise Monitor
 
My sql8 innodb_cluster
My sql8 innodb_clusterMy sql8 innodb_cluster
My sql8 innodb_cluster
 
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
 
MySQL Security and Standardization at PayPal - Percona Live 2019
MySQL Security and Standardization at PayPal - Percona Live 2019MySQL Security and Standardization at PayPal - Percona Live 2019
MySQL Security and Standardization at PayPal - Percona Live 2019
 
MySQL Replication
MySQL ReplicationMySQL Replication
MySQL Replication
 
MySQL on Docker and Kubernetes
MySQL on Docker and KubernetesMySQL on Docker and Kubernetes
MySQL on Docker and Kubernetes
 
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
 
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
 
20160821 coscup-my sql57docstorelab01
20160821 coscup-my sql57docstorelab0120160821 coscup-my sql57docstorelab01
20160821 coscup-my sql57docstorelab01
 

More from Keith Hollman

MySQL Cluster: El ‘qué’ y el ‘cómo’.
MySQL Cluster: El ‘qué’ y el ‘cómo’.MySQL Cluster: El ‘qué’ y el ‘cómo’.
MySQL Cluster: El ‘qué’ y el ‘cómo’.
Keith Hollman
 
MySQL Replication: Demo Réplica en Español
MySQL Replication: Demo Réplica en EspañolMySQL Replication: Demo Réplica en Español
MySQL Replication: Demo Réplica en Español
Keith Hollman
 
Meb Backup & Recovery Performance
Meb Backup & Recovery PerformanceMeb Backup & Recovery Performance
Meb Backup & Recovery Performance
Keith Hollman
 
MySQL Una Introduccion Tecnica
MySQL Una Introduccion TecnicaMySQL Una Introduccion Tecnica
MySQL Una Introduccion Tecnica
Keith Hollman
 
MySQL Enterprise Backup: PITR Partial Online Recovery
MySQL Enterprise Backup: PITR Partial Online RecoveryMySQL Enterprise Backup: PITR Partial Online Recovery
MySQL Enterprise Backup: PITR Partial Online Recovery
Keith Hollman
 
A MySQL Odyssey - A Blackhole Crossover
A MySQL Odyssey - A Blackhole CrossoverA MySQL Odyssey - A Blackhole Crossover
A MySQL Odyssey - A Blackhole Crossover
Keith Hollman
 
Embracing Database Diversity: The New Oracle / MySQL DBA - UKOUG
Embracing Database Diversity: The New Oracle / MySQL DBA -   UKOUGEmbracing Database Diversity: The New Oracle / MySQL DBA -   UKOUG
Embracing Database Diversity: The New Oracle / MySQL DBA - UKOUG
Keith Hollman
 

More from Keith Hollman (7)

MySQL Cluster: El ‘qué’ y el ‘cómo’.
MySQL Cluster: El ‘qué’ y el ‘cómo’.MySQL Cluster: El ‘qué’ y el ‘cómo’.
MySQL Cluster: El ‘qué’ y el ‘cómo’.
 
MySQL Replication: Demo Réplica en Español
MySQL Replication: Demo Réplica en EspañolMySQL Replication: Demo Réplica en Español
MySQL Replication: Demo Réplica en Español
 
Meb Backup & Recovery Performance
Meb Backup & Recovery PerformanceMeb Backup & Recovery Performance
Meb Backup & Recovery Performance
 
MySQL Una Introduccion Tecnica
MySQL Una Introduccion TecnicaMySQL Una Introduccion Tecnica
MySQL Una Introduccion Tecnica
 
MySQL Enterprise Backup: PITR Partial Online Recovery
MySQL Enterprise Backup: PITR Partial Online RecoveryMySQL Enterprise Backup: PITR Partial Online Recovery
MySQL Enterprise Backup: PITR Partial Online Recovery
 
A MySQL Odyssey - A Blackhole Crossover
A MySQL Odyssey - A Blackhole CrossoverA MySQL Odyssey - A Blackhole Crossover
A MySQL Odyssey - A Blackhole Crossover
 
Embracing Database Diversity: The New Oracle / MySQL DBA - UKOUG
Embracing Database Diversity: The New Oracle / MySQL DBA -   UKOUGEmbracing Database Diversity: The New Oracle / MySQL DBA -   UKOUG
Embracing Database Diversity: The New Oracle / MySQL DBA - UKOUG
 

Recently uploaded

Girls call Kolkata 👀 XXXXXXXXXXX 👀 Rs.9.5 K Cash Payment With Room Delivery
Girls call Kolkata 👀 XXXXXXXXXXX 👀 Rs.9.5 K Cash Payment With Room Delivery Girls call Kolkata 👀 XXXXXXXXXXX 👀 Rs.9.5 K Cash Payment With Room Delivery
Girls call Kolkata 👀 XXXXXXXXXXX 👀 Rs.9.5 K Cash Payment With Room Delivery
sunilverma7884
 
Google I/O Extended Harare Merged Slides
Google I/O Extended Harare Merged SlidesGoogle I/O Extended Harare Merged Slides
Google I/O Extended Harare Merged Slides
Google Developer Group - Harare
 
Types of Weaving loom machine & it's technology
Types of Weaving loom machine & it's technologyTypes of Weaving loom machine & it's technology
Types of Weaving loom machine & it's technology
ldtexsolbl
 
UX Webinar Series: Aligning Authentication Experiences with Business Goals
UX Webinar Series: Aligning Authentication Experiences with Business GoalsUX Webinar Series: Aligning Authentication Experiences with Business Goals
UX Webinar Series: Aligning Authentication Experiences with Business Goals
FIDO Alliance
 
UX Webinar Series: Drive Revenue and Decrease Costs with Passkeys for Consume...
UX Webinar Series: Drive Revenue and Decrease Costs with Passkeys for Consume...UX Webinar Series: Drive Revenue and Decrease Costs with Passkeys for Consume...
UX Webinar Series: Drive Revenue and Decrease Costs with Passkeys for Consume...
FIDO Alliance
 
LeadMagnet IQ Review: Unlock the Secret to Effortless Traffic and Leads.pdf
LeadMagnet IQ Review:  Unlock the Secret to Effortless Traffic and Leads.pdfLeadMagnet IQ Review:  Unlock the Secret to Effortless Traffic and Leads.pdf
LeadMagnet IQ Review: Unlock the Secret to Effortless Traffic and Leads.pdf
SelfMade bd
 
EuroPython 2024 - Streamlining Testing in a Large Python Codebase
EuroPython 2024 - Streamlining Testing in a Large Python CodebaseEuroPython 2024 - Streamlining Testing in a Large Python Codebase
EuroPython 2024 - Streamlining Testing in a Large Python Codebase
Jimmy Lai
 
Connector Corner: Leveraging Snowflake Integration for Smarter Decision Making
Connector Corner: Leveraging Snowflake Integration for Smarter Decision MakingConnector Corner: Leveraging Snowflake Integration for Smarter Decision Making
Connector Corner: Leveraging Snowflake Integration for Smarter Decision Making
DianaGray10
 
MAKE MONEY ONLINE Unlock Your Income Potential Today.pptx
MAKE MONEY ONLINE Unlock Your Income Potential Today.pptxMAKE MONEY ONLINE Unlock Your Income Potential Today.pptx
MAKE MONEY ONLINE Unlock Your Income Potential Today.pptx
janagijoythi
 
Perth MuleSoft Meetup July 2024
Perth MuleSoft Meetup July 2024Perth MuleSoft Meetup July 2024
Perth MuleSoft Meetup July 2024
Michael Price
 
Zaitechno Handheld Raman Spectrometer.pdf
Zaitechno Handheld Raman Spectrometer.pdfZaitechno Handheld Raman Spectrometer.pdf
Zaitechno Handheld Raman Spectrometer.pdf
AmandaCheung15
 
Vulnerability Management: A Comprehensive Overview
Vulnerability Management: A Comprehensive OverviewVulnerability Management: A Comprehensive Overview
Vulnerability Management: A Comprehensive Overview
Steven Carlson
 
Keynote : AI & Future Of Offensive Security
Keynote : AI & Future Of Offensive SecurityKeynote : AI & Future Of Offensive Security
Keynote : AI & Future Of Offensive Security
Priyanka Aash
 
Retrieval Augmented Generation Evaluation with Ragas
Retrieval Augmented Generation Evaluation with RagasRetrieval Augmented Generation Evaluation with Ragas
Retrieval Augmented Generation Evaluation with Ragas
Zilliz
 
Acumatica vs. Sage Intacct _Construction_July (1).pptx
Acumatica vs. Sage Intacct _Construction_July (1).pptxAcumatica vs. Sage Intacct _Construction_July (1).pptx
Acumatica vs. Sage Intacct _Construction_July (1).pptx
BrainSell Technologies
 
Semantic-Aware Code Model: Elevating the Future of Software Development
Semantic-Aware Code Model: Elevating the Future of Software DevelopmentSemantic-Aware Code Model: Elevating the Future of Software Development
Semantic-Aware Code Model: Elevating the Future of Software Development
Baishakhi Ray
 
It's your unstructured data: How to get your GenAI app to production (and spe...
It's your unstructured data: How to get your GenAI app to production (and spe...It's your unstructured data: How to get your GenAI app to production (and spe...
It's your unstructured data: How to get your GenAI app to production (and spe...
Zilliz
 
BLOCKCHAIN TECHNOLOGY - Advantages and Disadvantages
BLOCKCHAIN TECHNOLOGY - Advantages and DisadvantagesBLOCKCHAIN TECHNOLOGY - Advantages and Disadvantages
BLOCKCHAIN TECHNOLOGY - Advantages and Disadvantages
SAI KAILASH R
 
What's New in Teams Calling, Meetings, Devices June 2024
What's New in Teams Calling, Meetings, Devices June 2024What's New in Teams Calling, Meetings, Devices June 2024
What's New in Teams Calling, Meetings, Devices June 2024
Stephanie Beckett
 
Mastering OnlyFans Clone App Development: Key Strategies for Success
Mastering OnlyFans Clone App Development: Key Strategies for SuccessMastering OnlyFans Clone App Development: Key Strategies for Success
Mastering OnlyFans Clone App Development: Key Strategies for Success
David Wilson
 

Recently uploaded (20)

Girls call Kolkata 👀 XXXXXXXXXXX 👀 Rs.9.5 K Cash Payment With Room Delivery
Girls call Kolkata 👀 XXXXXXXXXXX 👀 Rs.9.5 K Cash Payment With Room Delivery Girls call Kolkata 👀 XXXXXXXXXXX 👀 Rs.9.5 K Cash Payment With Room Delivery
Girls call Kolkata 👀 XXXXXXXXXXX 👀 Rs.9.5 K Cash Payment With Room Delivery
 
Google I/O Extended Harare Merged Slides
Google I/O Extended Harare Merged SlidesGoogle I/O Extended Harare Merged Slides
Google I/O Extended Harare Merged Slides
 
Types of Weaving loom machine & it's technology
Types of Weaving loom machine & it's technologyTypes of Weaving loom machine & it's technology
Types of Weaving loom machine & it's technology
 
UX Webinar Series: Aligning Authentication Experiences with Business Goals
UX Webinar Series: Aligning Authentication Experiences with Business GoalsUX Webinar Series: Aligning Authentication Experiences with Business Goals
UX Webinar Series: Aligning Authentication Experiences with Business Goals
 
UX Webinar Series: Drive Revenue and Decrease Costs with Passkeys for Consume...
UX Webinar Series: Drive Revenue and Decrease Costs with Passkeys for Consume...UX Webinar Series: Drive Revenue and Decrease Costs with Passkeys for Consume...
UX Webinar Series: Drive Revenue and Decrease Costs with Passkeys for Consume...
 
LeadMagnet IQ Review: Unlock the Secret to Effortless Traffic and Leads.pdf
LeadMagnet IQ Review:  Unlock the Secret to Effortless Traffic and Leads.pdfLeadMagnet IQ Review:  Unlock the Secret to Effortless Traffic and Leads.pdf
LeadMagnet IQ Review: Unlock the Secret to Effortless Traffic and Leads.pdf
 
EuroPython 2024 - Streamlining Testing in a Large Python Codebase
EuroPython 2024 - Streamlining Testing in a Large Python CodebaseEuroPython 2024 - Streamlining Testing in a Large Python Codebase
EuroPython 2024 - Streamlining Testing in a Large Python Codebase
 
Connector Corner: Leveraging Snowflake Integration for Smarter Decision Making
Connector Corner: Leveraging Snowflake Integration for Smarter Decision MakingConnector Corner: Leveraging Snowflake Integration for Smarter Decision Making
Connector Corner: Leveraging Snowflake Integration for Smarter Decision Making
 
MAKE MONEY ONLINE Unlock Your Income Potential Today.pptx
MAKE MONEY ONLINE Unlock Your Income Potential Today.pptxMAKE MONEY ONLINE Unlock Your Income Potential Today.pptx
MAKE MONEY ONLINE Unlock Your Income Potential Today.pptx
 
Perth MuleSoft Meetup July 2024
Perth MuleSoft Meetup July 2024Perth MuleSoft Meetup July 2024
Perth MuleSoft Meetup July 2024
 
Zaitechno Handheld Raman Spectrometer.pdf
Zaitechno Handheld Raman Spectrometer.pdfZaitechno Handheld Raman Spectrometer.pdf
Zaitechno Handheld Raman Spectrometer.pdf
 
Vulnerability Management: A Comprehensive Overview
Vulnerability Management: A Comprehensive OverviewVulnerability Management: A Comprehensive Overview
Vulnerability Management: A Comprehensive Overview
 
Keynote : AI & Future Of Offensive Security
Keynote : AI & Future Of Offensive SecurityKeynote : AI & Future Of Offensive Security
Keynote : AI & Future Of Offensive Security
 
Retrieval Augmented Generation Evaluation with Ragas
Retrieval Augmented Generation Evaluation with RagasRetrieval Augmented Generation Evaluation with Ragas
Retrieval Augmented Generation Evaluation with Ragas
 
Acumatica vs. Sage Intacct _Construction_July (1).pptx
Acumatica vs. Sage Intacct _Construction_July (1).pptxAcumatica vs. Sage Intacct _Construction_July (1).pptx
Acumatica vs. Sage Intacct _Construction_July (1).pptx
 
Semantic-Aware Code Model: Elevating the Future of Software Development
Semantic-Aware Code Model: Elevating the Future of Software DevelopmentSemantic-Aware Code Model: Elevating the Future of Software Development
Semantic-Aware Code Model: Elevating the Future of Software Development
 
It's your unstructured data: How to get your GenAI app to production (and spe...
It's your unstructured data: How to get your GenAI app to production (and spe...It's your unstructured data: How to get your GenAI app to production (and spe...
It's your unstructured data: How to get your GenAI app to production (and spe...
 
BLOCKCHAIN TECHNOLOGY - Advantages and Disadvantages
BLOCKCHAIN TECHNOLOGY - Advantages and DisadvantagesBLOCKCHAIN TECHNOLOGY - Advantages and Disadvantages
BLOCKCHAIN TECHNOLOGY - Advantages and Disadvantages
 
What's New in Teams Calling, Meetings, Devices June 2024
What's New in Teams Calling, Meetings, Devices June 2024What's New in Teams Calling, Meetings, Devices June 2024
What's New in Teams Calling, Meetings, Devices June 2024
 
Mastering OnlyFans Clone App Development: Key Strategies for Success
Mastering OnlyFans Clone App Development: Key Strategies for SuccessMastering OnlyFans Clone App Development: Key Strategies for Success
Mastering OnlyFans Clone App Development: Key Strategies for Success
 

MySQL 8.0 InnoDB Cluster demo

  • 1. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | MySQL High Availability InnoDB Cluster Keith Hollman MySQL Principal Solution Architect keith.hollman@oracle.com DEMO
  • 2. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Safe Harbor Statement The following is intended to outline our general product direction. It is intended for information purposes 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 upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle.
  • 3. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Install MySQL 8.0 • We have previously downloaded the latest comercial rpm bundles from https://edelivery.oracle.com. $ sudo yum install -y python numactl $ sudo yum install -y mysql-commercial-*8.0.12*rpm mysql-router-commercial- 8.0.12-1.1.el7.x86_64.rpm mysql-shell-commercial-8.0.12-1.1.el7.x86_64.rpm $ sudo systemctl start mysqld.service $ sudo systemctl enable mysqld.service
  • 4. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Post-Install • Change the root password: $ sudo grep 'A temporary password is generated for root@localhost' /var/log/mysqld.log |tail -1 $ mysql -uroot -p SET sql_log_bin = OFF; alter user 'root'@'localhost' identified by 'Oracle20!8'; create user 'ic'@'%' identified by 'Oracle20!8'; grant all on *.* to 'ic'@'%' with grant option; flush privileges; SET sql_log_bin = ON; exit
  • 5. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | MySQL Shell CLI • Just so that we understand what this means: $ mysqlsh --uri root@localhost:3306 Please provide the password for 'root@localhost:3306': ********** Save password for 'root@localhost:3306'? [Y]es/[N]o/Ne[v]er (default No): y • Making things simple, i.e. password is cached for our o.s. session.
  • 6. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Preparing the instances • Check that the instances are a good candidates for joing the cluster: (Run commands below for all three instances) dba.checkInstanceConfiguration('ic@ic1:3306'); • If check instance spots any issues, solve these by running: dba.configureInstance('ic@ic1:3306'); • All parameters that need changing will be changed in the my.cnf if we accept the interactive questions:
  • 7. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Preparing the instances (cont) • Configuration options added by configureInstance ("SET PERSIST") can be found in file: mysqldata/mysqld-auto.cnf You can also view these changes in MySQL by running: c root@localhost:3306 sql select * from performance_schema.persisted_variables; • To see all variables and their source run: mysql -uroot -e "SELECT * FROM performance_schema.variables_info WHERE variable_source != 'COMPILED';"
  • 8. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Create Cluster • On just one instance, start shell and run: connect ic@ic1:3306 cluster=dba.createCluster("mycluster"); cluster.status(); cluster.addInstance("ic@ic2:3306"); cluster.addInstance("ic@ic3:3306"); cluster.status(); • You can connect from any host, eg. ic2, using mysqlsh to any other instance, eg. c ic@ic1:3306 and follow the same steps, consecutively, on the same instance.
  • 9. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Checking InnoDB Cluster status • Connect IDc to a specific MySQL instance using shell: mysqlsh -uic -hic2 -P3306 • And run: cluster = dba.getCluster(); cluster.status(); • From performance_schema: sql SELECT * FROM performance_schema.replication_group_membersG
  • 10. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | • We will run the MySQL Router process on ic2: $ sudo -i $ mkdir -p /opt/mysql/myrouter $ chown -R mysql:mysql /opt/mysql/myrouter $ cd /opt/mysql $ mysqlrouter --bootstrap ic@ic2:3306 -d /opt/mysql/myrouter -u mysql Please enter MySQL password for ic: Bootstrapping MySQL Router instance at '/opt/mysql/myrouter'... Executing statements failed with: 'Error executing MySQL query: The MySQL server is running with the --super-read-only option so it cannot execute this statement (1290)' (1290), trying to connect to another node Fetching Group Replication Members disconnecting from mysql-server trying to connecting to mysql-server at ic1:3306 Checking for old Router accounts Creating account mysql_router3_53c1tbork49d@'%' MySQL Router has now been configured for the InnoDB cluster 'mycluster'. The following connection information can be used to connect to the cluster. Classic MySQL protocol connections to cluster 'mycluster': - Read/Write Connections: localhost:6446 - Read/Only Connections: localhost:6447 X protocol connections to cluster 'mycluster': - Read/Write Connections: localhost:64460 - Read/Only Connections: localhost:64470 • As the master was ic1, and we ran the bootstrap from ic2, super-read-only mode was detected and hence the master, ic1, was used. • Now to start the Router process: $ ./myrouter/start.sh MySQL Router
  • 11. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | • On ic1, test the connection to both the RW port, 6446, and the RO port, 6447 of Router, that, remember, is running on ic2: $ mysql -uic -p -P6446 -hic2 -e "select @@hostname" $ mysql -uic -p -P6446 -hic2 -e "select @@hostname" $ mysql -uic -p -P6446 -hic2 -e "select @@hostname" $ mysql -uic -p -P6447 -hic2 -e "select @@hostname" $ mysql -uic -p -P6447 -hic2 -e "select @@hostname" $ mysql -uic -p -P6447 -hic2 -e "select @@hostname" • The same on ic3: $ mysql -uic -p -P6446 -hic2 -e "select @@hostname" $ mysql -uic -p -P6446 -hic2 -e "select @@hostname" $ mysql -uic -p -P6446 -hic2 -e "select @@hostname" $ mysql -uic -p -P6447 -hic2 -e "select @@hostname" $ mysql -uic -p -P6447 -hic2 -e "select @@hostname" $ mysql -uic -p -P6447 -hic2 -e "select @@hostname" • You should see all RW connections show ic1, as well as all RO connections use round-robin between the RO slaves, i.e. ic2 & ic3. MySQL Router: testing
  • 12. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | More examples & Information • https://mysqlserverteam.com/mysql-innodb-cluster-8-0-a-hands-on- tutorial/ • https://github.com/wwwted/MySQL-InnoDB-Cluster-3VM-Setup • https://mysqlmed.wordpress.com/2017/11/09/innodb-cluster-setting-up- production-for-disaster-1-2/ (MySQL 5.7)
  • 13. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Preguntas?
  • 14. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |