An Introduction to MySQL When to select MySQL and how to get the most out of the world’s most popular open source database.
Copyright Oracle Corporation 2014 | 25th July 20142 Agenda §  A few facts about MySQL §  Understanding when to choose MySQL §  How to get the most out of MySQL §  Focus on MySQL Fabric §  JSON and Key-Value store §  Q&A
Copyright Oracle Corporation 2014 | 25th July 20143 Agenda §  A few facts about MySQL §  Understanding when to choose MySQL §  How to get the most out of MySQL §  Focus on MySQL Fabric §  JSON and Key-Value store §  Q&A
Copyright Oracle Corporation 2014 | 25th July 20144 MySQL today •  Founded 1995 (MySQL AB, -> Sun Microsystems, -> Oracle) •  12+ million product installations •  100+ million downloads to date •  68,000+ downloads each day •  Web Property de facto Standard (e.g. LAMP & WAMP) •  Runs on Windows, Linux, Solaris, Mac OS X •  MySQL Commercial Editions Available
Copyright Oracle Corporation 2014 | 25th July 20145 Industry Leaders Rely on MySQL
Copyright Oracle Corporation 2014 | 25th July 20146 MySQL 5.5 MySQL Enterprise Monitor 2.3 & 3.0 MySQL Enterprise Backup Security Scalability HA Audit MySQL 5.6 MySQL Workbench 6.1 M y S Q L U t i l i t i e s MySQL Applier for Hadoop MySQL Workbench 5.2 & 6.0 M y S Q L E n t e r p r i s e O r a c l e C e r t i f i c a t i o n s MySQL@Oracle: 4 Years of MySQL Innovation M y S Q L C l u s t e r M a n a g e rWindows installer & Tools MySQL Cluster 7.2 MySQL Cluster 7.1 MySQL Migration Wizard MySQL 5.7 MySQL Cluster 7.4 MySQL Fabric 1.4 MySQL Cluster 7.3
Copyright Oracle Corporation 2014 | 25th July 20147 Agenda §  A few facts about MySQL §  Understanding when to choose MySQL §  How to get the most out of MySQL §  Focus on MySQL Fabric §  JSON and Key-Value store §  Q&A
Copyright Oracle Corporation 2014 | 25th July 20148 Scalability with MySQL Scale Out •  Commodity Intel / AMD •  Data replication between servers •  Add commodity servers to increase capacity •  High Availability via some tweaks
Copyright Oracle Corporation 2014 | 25th July 20149 Small Systems Scale vertically; Active/passive replication for HA App
Copyright Oracle Corporation 2014 | 25th July 201410 Medium-Large; Read-intensive Horizontally scale with read-slaves App
Copyright Oracle Corporation 2014 | 25th July 201411 Medium-Large; Write-intensive §  Write scalability –  Can handle more writes §  Large data set –  Database too large –  Does not fit on single server §  Improved performance –  Smaller index size –  Smaller working set –  Improve performance UID 10000-20000 UID 20001-40000 Application-level sharding App
Copyright Oracle Corporation 2014 | 25th July 201412 Real-Time/Carrier Grade MySQL Cluster MySQL Cluster Data Nodes Clients Application Layer Data Layer Management
Copyright Oracle Corporation 2014 | 25th July 201413 MySQL Fabric 1.4 GA High Availability + Sharding-Based Scale-out MySQL Fabric Connector Application Read-slaves mappings SQL Master group Read-slaves Master group •  High Availability: •  Server monitoring with auto-promotion and transparent application failover •  Fabric-aware connectors rather than proxy: Python, Java & PHP •  Optionally scale-out through sharding •  Application provides shard key •  Range or Hash •  Tools for resharding •  Global updates & tables •  Available in MySQL Utilities 1.4.2 RC
Copyright Oracle Corporation 2014 | 25th July 201414 Considerations §  MySQL scale out is not always transparent to the application –  Implies a closer connection between dev and db administration/design –  Means off-the-shelf packages not designed or adapted for MySQL may not be a good fit §  MySQL Fabric simplifies the development of scale out architectures and will be a key area for future innovation §  MySQL scale out is a good fit for the cloud
Copyright Oracle Corporation 2014 | 25th July 201415 Applications Custom-built web applications are the most popular types of applications deployed by MySQL Enterprise Customers and Community Users
Copyright Oracle Corporation 2014 | 25th July 201416 Agenda §  A few facts about MySQL §  Understanding when to choose MySQL §  How to get the most out of MySQL §  Focus on MySQL Fabric §  JSON and Key-Value store §  Q&A
Copyright Oracle Corporation 2014 | 25th July 201417 DB architecture §  The optimal db architecture may imply some level of application awareness. §  Particularly true where MySQL Cluster or Sharding would be the best solution. §  Ensure the db architecture is considered early enough and communication with the development team is effective
Copyright Oracle Corporation 2014 | 25th July 201418 Monitoring & Tuning §  Monitoring is the most basic and necessary step to managing performance and availability §  The correct monitoring will intercept most problems before they lead to a failure §  MySQL maintains a performance schema internally – determine what you want to monitor and how frequently §  Tune / take remedial action based on the information provided by the monitoring
Copyright Oracle Corporation 2014 | 25th July 201419 Performance Analysis §  Understand what is happening at both DB and OS level §  Set a baseline for acceptable performance §  Set up alerting where actual worse than baseline based on some threshold §  Drill down into performance issues – ideally down to the individual code fragment associated with the issue §  Decide what corrective action to take
Copyright Oracle Corporation 2014 | 25th July 201420 Backups §  A key part of the high availability strategy §  May need to be part of the architectural planning for the whole solution §  Online (non blocking) backups required? §  Incremental as well as full backups required? §  Point in time recovery required? §  Backup / restore performance needs to be considered §  Monitoring of backup status? §  On-premise? Cloud?
Copyright Oracle Corporation 2014 | 25th July 201421 DB Security §  Authorisation §  Privilege Management §  Password Policies §  Authentication §  Encryption – connections, database, backups §  Auditing §  Firewall – SQL Injection, Whitelists, Blacklists §  Hardening best practice
Copyright Oracle Corporation 2014 | 25th July 201422 Support §  Three broad approaches: –  Self support using community resources. Will involve higher levels of expertise, investment of time, some risk. –  ‘Best efforts’ support from a cloud vendor. Typically they have already some investment in MySQL skills so are capable of basic support. No service level. No familiarity with complex architectures. No patching. Very limited monitoring. –  Vendor support. Full technical support including patching (Oracle Premier Support). Consultative support. Monitoring, performance analysis and backup tools, security features and tools, integration with other Oracle products (OEM for example), certifications, indemnity, architectural guidance from account team. Will involve investment of some money.
Copyright Oracle Corporation 2014 | 25th July 201423 Oracle Premier Lifetime Support Oracle Product Certifications/Integrations MySQL Enterprise High Availability MySQL Enterprise Security & Firewall MySQL Enterprise Scalability MySQL Enterprise Backup MySQL Enterprise Monitor/Query Analyzer MySQL Workbench MySQL Enterprise Edition Highest Levels of MySQL Scalability, Security and Uptime MySQL Enterprise Audit
Copyright Oracle Corporation 2014 | 25th July 201424 Agenda §  A few facts about MySQL §  Understanding when to choose MySQL §  How to get the most out of MySQL §  Focus on MySQL Fabric §  JSON and Key-Value store §  Q&A
MySQL  Fabric   An  extensible  and  easy-­‐to-­‐ use  framework  for   managing  a  farm  of  MySQL   server  suppor=ng  high-­‐ availability  and  sharding   25  09/11/15   Copyright  ©  2015,  Oracle  and/or  its  affiliates.  All  rights  reserved  
MySQL  Fabric  1.5   •  High  Availability   –  Server  monitoring  with  auto-­‐promoJon  and   transparent  applicaJon  failover   •  OpJonally  scale-­‐out  through  sharding   –  ApplicaJon  provides  shard  key   –  Range  or  Hash   –  Tools  for  resharding   –  Global  updates  &  tables   •  Fabric-­‐aware  connectors  rather  than   proxy:  Python,  Java,  PHP  (pre-­‐ producJon),  .NET,  C  (labs)   –  Lower  latency,  boYleneck-­‐free   •  Server  provisioning  using  OpenStack  etc.   High  Availability  +  Sharding-­‐Based  Scale-­‐out   MySQL  Fabric   Connector   ApplicaJon   Read-­‐slaves   mappings   SQL   HA  group   Read-­‐slaves   HA  group   Connector   ApplicaJon   26  09/11/15   Copyright  ©  2015,  Oracle  and/or  its  affiliates.  All  rights  reserved  
MySQL  Fabric  Framework  (HA)   All  Data   Primary   Secondary   Extra  Read  Replicas  MySQL  Fabric   Controller   SQL  Queries   State  &   Rou=ng  Info   HA  Group   Coordina=on   and  Control   27  09/11/15   Copyright  ©  2015,  Oracle  and/or  its  affiliates.  All  rights  reserved  
Dependable  and  Scalable  MySQL  (labs)   Tuesday, October 20, 2015 Oracle Confidential – Restricted 28 Global  Data   Shard  1   Shard  2   MySQL  Fabric   Controller   SQL  Queries   Server/Shard  State  &   Mapping   Global  Group   HA  Group   Coordina=on   and  Control   HA  Group   Group  Replica=on   cluster   Group  Replica=on   cluster   Group  Replica=on   cluster   MySQL Router
Copyright Oracle Corporation 2014 | 25th July 201429 Agenda §  A few facts about MySQL §  Understanding when to choose MySQL §  How to get the most out of MySQL §  Focus on MySQL Fabric §  JSON and Key-Value store §  Q&A
Copyright  ©  2015,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   MySQL  5.7:  JSON     •  NaJve  JSON  data  type   – NaJve  internal  binary  format  for  efficient  processing  &  storage   •  Built-­‐in  JSON  funcJons   – Allowing  you  to  efficiently  store,  search,  update,  and  manipulate  Documents   •  JSON  Comparator   – Allows  for  easy  integraJon  of  Document  data  within  your  SQL  queries   •  Indexing  of  Documents  using  Generated  Columns     – InnoDB  supports  indexes  on  both  stored  and  virtual  Generated  Columns   – New  expression  analyzer  automaJcally  uses  the  best  “funcJonal”  index  available   •  New  inline  syntax  for  easy  SQL  integraJon     30  
Copyright  ©  2015,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   MySQL  5.7:  JSON  and  Text  Datatype  Comparison     #  With  feature  column  as  JSON  type   SELECT  DISTINCT    feature-­‐>"$.type"  as  json_extract   FROM  features;   +-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐+   |  json_extract  |   +-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐+   |  "Feature"        |   +-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐+   1  row  in  set  (1.25  sec)   Unindexed  traversal  of  206K  documents   #  With  feature  column  as  TEXT  type   SELECT  DISTINCT      feature-­‐>"$.type"  as  json_extract   FROM  features;   +-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐+   |  json_extract  |   +-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐+   |  "Feature"        |   +-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐+     1  row  in  set  (12.85  sec)   Explana=on:  Binary  format  of  JSON  type  is  very  efficient  at  searching.  Storing  as  TEXT   performs  over  10x  worse  at  traversal.   31  
Copyright  ©  2015,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   MySQL  5.7:  FuncJonal  Indexes  with  JSON     ALTER  TABLE  features  ADD  feature_type  VARCHAR(30)  AS  (JSON_UNQUOTE(feature-­‐ >'$.type'));   Query  OK,  0  rows  affected  (0.01  sec)   Records:  0    Duplicates:  0    Warnings:  0     ALTER  TABLE  features  ADD  INDEX  (feature_type);   Query  OK,  0  rows  affected  (0.73  sec)   Records:  0    Duplicates:  0    Warnings:  0     SELECT  DISTINCT  feature_type  FROM  features;   +-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐+   |  feature_type  |   +-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐+   |  "Feature"        |   +-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐+   1  row  in  set  (0.06  sec)   From  table  scan  on  206K  documents  to  index  scan  on  206K  materialized  values   Meta  data  change  only  (FAST).   Does  not  need  to  touch  table..   Creates  index  only,  does  not   touch  row  data.   Down  from  1.25  sec  to  0.06  sec   32  
Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.   •  5.7  supports  funcJons  to  CREATE,  SEARCH,  MODIFY  and  RETURN  JSON  values:   JSON  FuncJons   33 JSON_ARRAY_APPEND()   JSON_ARRAY_INSERT()   JSON_ARRAY()   JSON_CONTAINS_PATH()   JSON_CONTAINS()   JSON_DEPTH()   JSON_EXTRACT()   JSON_INSERT()   JSON_KEYS()   JSON_LENGTH()   JSON_MERGE()   JSON_OBJECT()   JSON_QUOTE()   JSON_REMOVE()   JSON_REPLACE()   JSON_SEARCH()   JSON_SET()   JSON_TYPE()   JSON_UNQUOTE()   JSON_VALID()   hYps://dev.mysql.com/doc/refman/5.7/en/json-­‐funcJons.html  
NoSQL   Simple  access  paYerns   Compromise  on  consistency   for  performance   Ad-­‐hoc  data  format   Simple  operaJon   SQL   Complex  queries  with  joins   ACID  transacJons   Well  defined  schemas   Rich  set  of  tools   SJll  a  role  for  SQL  (RDBMS)?   26th  March  2015   Copyright  ©  2015,  Oracle  and/or  its  affiliates.  All  rights  reserved.   34  
NoSQL  Access  to  MySQL  Cluster  data   Apps Apps Apps Apps Apps Apps Apps Apps Apps Apps Apps Apps JPA Cluster  JPA PHP Perl Python Ruby JDBC Cluster  J JS Apache Memcached MySQL JNI Node.JS mod_ndb ndb_eng NDB  API  (C++) MySQL  Cluster  Data  Nodes   26th  March  2015   Copyright  ©  2015,  Oracle  and/or  its  affiliates.  All  rights  reserved.   35  
MySQL  5.6  Memcached  with  InnoDB   0 10000 20000 30000 40000 50000 60000 70000 80000 8 32 128 512 TPS Client Connections Memcached API SQL Clients  and  Applica=ons   MySQL  Server   Memcached  Plug-­‐in   innodb_   memcached   local  cache   (opJonal)   Handler  API   InnoDB  API   InnoDB  Storage  Engine   mysqld  process   SQL   Memcached  Protocol   Up  to  9x  Higher  “SET  /  INSERT”  Throughput   26th March 2015 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 36
Cluster  &  Memcached  –  Schema-­‐Free   <town:maidenhead,SL6> key value <town:maidenhead,SL6> key value Key   Value   town:maidenhead   SL6   generic table Application view SQL view 26th March 2015 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 37
Cluster  &  Memcached  -­‐  Configured  Schema   <town:maidenhead,SL6> prefix key value <town:maidenhead,SL6> key value Prefix   Table   Key-­‐col   Val-­‐col   policy   town:   map.zip   town   code   cluster   Config tables town   ...   code   ...   maidenhead   ...   SL6   ...   map.zip Application view SQL view 26th March 2015 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 38
Copyright Oracle Corporation 2014 | 25th July 201439 Agenda §  A few facts about MySQL §  Understanding when to choose MySQL §  How to get the most out of MySQL §  Focus on MySQL Fabric §  JSON and Key-Value store §  Q&A
Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   MySQL  Enterprise  Monitor   40   •  Start  monitoring  MySQL  in  10  minutes   •  Real-­‐Jme  MySQL  performance  and   availability  monitoring   •  Visually  find  &  fix  problem  queries   •  Disk  monitoring  for  capacity  planning   •  Cloud  friendly  architecture   – No  agents  required   •  OpJonal  agent  opJon  provides   advanced  Host/OS  monitoring  
Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   Cloud-­‐friendly  Architecture   41   MySQL  Enterprise    Dashboard   Service  Manager   Repository     HTTPS   Data  Center  Public  Cloud  Private  Cloud   •  MySQL     – Performance  Schema  provides  Query  Analyzer  data   – Provides  all  MySQL  related  metrics     •  Service  Manager   – Collects  all  MySQL  related  metrics   – Collects  all  OS/Host  related  metrics   •  Repository   – Stores  all  historical  data   •  Agent  (opJonal)   – Only  required  for  OS/Host  metrics  
Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   Enterprise  Monitor  Dashboard   42   "The  MySQL  Enterprise  Monitor  is  an  absolute   must  for  any  DBA  who  takes  his  work  seriously.”     -­‐  Adrian  Baumann,  System  Specialist   Federal  Office  of  InformaJon  Technology  &     TelecommunicaJons   •  SLA  monitoring   •  Real-­‐Jme  performance  monitoring   •  Alerts  &  noJficaJons   •  MySQL  best  pracJce  advisors  
Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   Enterprise  Query  Analyzer   43   •  Real-­‐Jme  query  performance   •  Visual  correlaJon  graphs   •  Find  &  fix  expensive  queries   •  Detailed  query  staJsJcs   •  Query  Response  Time  index  (QRTi)   – “Quality  of  Service”  (QoS)  measurement   for  each  query   – QoS  measurement  for  a  server,  group,   or  every  instance   – Single  metric  for  query  performance   “With  the  MySQL  Query  Analyzer,  we  were  able  to   idenEfy  and  analyze  problemaEc  SQL  code,  and  triple   our  database  performance.  More  importantly,  we  were   able  to  accomplish  this  in  three  days,  rather  than  taking   weeks.”     Keith  Souhrada     Sorware  Development  Engineer     Big  Fish  Games    
Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   Enterprise  ReplicaJon  Monitor   44   •  Auto-­‐discovers  replicaJon  topology   •  Master/Slave  performance   monitoring   •  ReplicaJon  advisor     •  Best  pracJce  replicaJon  advice   "I  use  the  MySQL  Enterprise  Monitor   every  day  to  monitor  and  keep  tabs   on  our  MySQL  databases.  Quick  one   stop  shopping  for  keeping  tabs  on   them.”     -­‐ Wes  Homer,     Sr  System  and  Network  Administrator    
Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   Best  PracJce  Advisors   45   •  Enforce  MySQL  best  pracJces   •  14  Advisor  categories   •  250+  Advisors   •  Threshold-­‐based  alerts   – ExponenJal  moving  averages   – Rate  change  detecJon   •  Expert  problem  resoluJon  advice   "I  definitely  recommend  the  MySQL  Enterprise   Monitor  to  DBAs  who  don't  have  a  ton  of  MySQL   experience.  It  makes  monitoring  MySQL  security,   performance  and  availability  very  easy  to   understand  and  to  act  on.”     Sandi  Barr   Sr.  Sorware  Engineer   Schneider  Electric  
Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   MySQL  Enterprise  Backup   •  Online,  non-­‐locking  backup  and  recovery     –  Complete  MySQL  instance  backup  (data  and  config)   –  ParJal  backup  and  restore   •  Direct  Cloud  storage  backups  (S3,  etc.)   •  Incremental  backups   •  Point-­‐in-­‐Jme  recovery   •  Advanced  compressed  and  encrypJon   •  Backup  to  tape  (SBT)   •  Backup  validaJon   •  OpJmisJc  backups   •  Cross-­‐Plasorm  (Windows,  Linux,  Unix)   46  
Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   MySQL  Enterprise  Monitor  +  Backup   47   •  Monitor  backup  results   •  Monitor  backup  performance   •  Ensure  backups  are  up  to  date  
Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   MySQL  Workbench  EE   •  Database  migraJons   – From  Microsor  SQL  Server,   PostgreSQL,  Sybase  ASE,  Sybase  SQL   Anywhere,  SQLite,  Microsor  Access,   and  more     •  Manage  migraJon  projects   •  Source  and  target  selecJon   •  Object  migraJon   •  Data  migraJon   •  MySQL  version  upgrades   48   New!  Database  MigraJon  Wizard    for  SQL  Server,  Sybase,  SQLite,  SQL  Anywhere  &  PostgreSQL  
Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   MySQL  Workbench  EE  +  Audit   •  Fast  and  easy  access  to  Audit   events   •  Indexed  searches   – Event  type   – User  account   – Date  range   – Text  match   49  
Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   MySQL  Workbench  EE  +  Backup   •  Create  and  manage  backup  jobs   – Create  new  backup  jobs   – Schedule  backup  jobs  to  run   automaJcally   – View  current  backup  jobs   – View  recent  backup  acJvity   •  Restore  backups     – Full,  parJal,  incremental  …   50  
Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    |       Oracle  Enterprise  Manager  for  MySQL   51   Performance   Security   Availability   •  Availability  monitoring   •  Performance  monitoring   •  ConfiguraJon  monitoring   •  All  available  metrics  collected   – Allowing  for  custom  threshold   based  incident  reports   •  MySQL  auto-­‐detecJon    
Copyright Oracle Corporation 2014 | 25th July 201452 Agenda §  A few facts about MySQL §  Understanding when to choose MySQL §  How to get the most out of MySQL §  MySQL Enterprise Edition §  Summary §  Q&A
Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   •  Provides  20x  beYer  scalability   •  Plugin  improves  sustained   performance  as  user  connecJons   grow   MySQL  Enterprise  Scalability  :  Thread  Pool   53  
Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   MySQL  Enterprise  Security   •  SSL  enabled  communicaJon   •  Access  control   – Enterprise  authenJcaJon  (PAM,  Windows,  LDAP,  etc.)   – Proxy  users   •  AudiJng  and  monitoring   – MySQL  security  advisors   – Oracle  Audit  Vault   •  Oracle  Database  Firewall   54  
Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   MySQL  Enterprise  EncrypJon   •  MySQL  encrypJon  libraries     – Symmetric  encrypJon  AES256   – Public-­‐key  /  asymmetric  cryptography   •  Key  management   – Generate  public  and  private  keys   – Key  exchange  methods:  RSA,  DSA,  DH   •  Sign  and  verify  data   – Cryptographic  hashing  for  digital  signing,  verificaJon,  &  validaJon   55  
Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   MySQL  Enterprise  Audit   •  Out-­‐of-­‐the-­‐box  logging  of  connecJons,  logins,  and  query   •  User  defined  policies  for  filtering,  and  log  rotaJon   •  Dynamically  enabled,  disabled:  no  server  restart   •  XML-­‐based  audit  stream  per  Oracle  Audit  Vault  spec   56   Adds  regulatory  compliance  to   MySQL  applicaJons  (HIPAA,   Sarbanes-­‐Oxley,  PCI,  etc.)    
Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   MySQL  Enterprise  AuthenJcaJon   57   •  PAM  (Pluggable  AuthenJcaJon  Modules)   – Access  external  authenJcaJon  methods   – Standard  interface  (Unix,  LDAP,  Kerberos,  others)   – Proxied  and  non-­‐proxied  users   •   Windows   – Access  naJve  Windows  services   – AuthenJcate  users  already  logged  into  Windows   (Windows  AcJve  Directory)   •  Pluggable  AuthenJcaJon  API   Integrates  MySQL  with  exisJng   security  infrastructures  and  SOPs  
Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   MySQL  Enterprise  High  Availability   •  HA  with  MySQL  Fabric  (recommended)   •  Oracle  VM  Templates  for  MySQL   •  HA  with  DRBD  and  Linux  Clustering   •  HA  with  Solaris  Clustering   •  HA  with  Windows  Failover  Clustering   •  HA  with  Oracle  Clusterware  Plugin   58     Range  of  opJons  to  make  your   MySQL  applicaJon  deployments   Highly  Available  
Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   MySQL  Enterprise  HA  :  MySQL  Fabric   59   •  High  Availability  features   – Server  monitoring   – Auto-­‐promoJon   – Transparent  applicaJon  failover   – Dynamically  scale  up  and  down   •  Fabric-­‐aware  connectors  rather   than  a  proxy   – Python,  Java,  and  PHP   – Lower  latency,  boYleneck-­‐free   •  OpJonal  sharding  features   MySQL  Fabric   Connector   ApplicaJon   Read-­‐slaves   mappings   SQL   HA  group   Read-­‐slaves   HA  group   Connector   ApplicaJon  
Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   MySQL  Enterprise  HA  :  Shared  Nothing   60   •  DRBD  +  Clustering   – Based  on  distributed  storage,  not  a  SAN   – Synchronous  replicaJon  eliminates  risk  of   data  loss   •  Open  source,  mature,  &  proven   •  CerJfied  and  fully  supported  by  Oracle   – DRBD  integrated  into  Oracle  Linux   Unbreakable  Enterprise  Kernel  R2   – Pacemaker  and  Corosync  for  clustering  /   failover   – Updates  to  stack  via  ULN  channel  
Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   MySQL  Enterprise  HA  :  Shared  Storage   61   •  Stricter  data  durability,  integrity   constraints   – Shared  storage  persists  commits  across   instances   – Clustering  sorware  manages  data  access   – Auto-­‐failover  of  applicaJons  and  database   – Deploy  with  MySQL  Fabric  for  scale-­‐out   •  MySQL  cerJfied  &  supported  soluJons   – Oracle  Clusterware   – Windows  Failover  Clustering   – Oracle  Solaris  Cluster   Virtual  IP     Clients  
Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   MySQL  Enterprise  HA  :  Oracle  VM  Templates   62   •  Oracle  Linux   •  Oracle  VM     •  Oracle  VM  Manager     •  Oracle  Cluster  File  System  2  (OCFS2)   •  MySQL  Database  (Enterprise  EdiJon)   •  Pre-­‐installed  &  pre-­‐configured   •  Full  integraJon  &  QA  tesJng   •  Single  point  of  support   Oracle  VM  Servers   Oracle  VM  Server  Pool   ocfs2   Oracle  VM   Manager   SAN  /  iSCSI   Oracle   VM   Secure  Live   Migra=on  (SSL)   Oracle   VM   Automa=c  Fault   Detec=on  &   Recovery  
Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   MySQL  Enterprise  Support   •  Largest  MySQL  engineering  and  support  organizaJon   •  Backed  by  the  MySQL  developers   •  World-­‐class  support,  in  29  languages   •  Hot  fixes  &  maintenance  releases   •  24x7x365   •  Unlimited  incidents   •  ConsultaJve  support   •  Global  scale  and  reach   Get  immediate  help  for  any  MySQL   issue,  plus  expert  advice 63  
Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   MySQL  ConsultaJve  Support     Make  the  Most  of  your  Deployments   •  Remote  troubleshooJng   •  ReplicaJon  review   •  ParJJoning  review   •  Schema  review   •  Query  review   •  Performance  tuning   •  ...and  more   64  
Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   Work  Directly  with  MySQL  Engineering     •  A  direct  relaJonship  with  the  MySQL  team   •  The  ability  to  parJcipate  in:   – Product  roadmaps   – Product  betas   – Customer  advisory  boards   •  Work  closely  with  Support  Engineers   – Resolve  issues  faster   – Request  bug  and  feature  request  escalaJons     65  
Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   MySQL  Enterprise  Oracle  CerJficaJons   • Oracle  Enterprise  Manager  for   MySQL   • Oracle  Linux  (w/DRBD  stack)   • Oracle  VM   • Oracle  Solaris   •  Oracle  Solaris  Clustering   •  Oracle  Clusterware   • My  Oracle  Support   • Oracle  Fusion  Middleware   • Oracle  GoldenGate   • Oracle  Audit  Vault   • Oracle  Database  Firewall   • Oracle  Secure  Backup   MySQL  integrates  into  your  Oracle  environment   66  
Copyright Oracle Corporation 2014 | 25th July 201467 Cross-Platform Lower TCO Performance Ease of Use Summary - Why MySQL?
Copyright Oracle Corporation 2014 | 25th July 201468 Agenda §  A few facts about MySQL §  Understanding when to choose MySQL §  How to get the most out of MySQL §  Summary §  Q&A
Copyright Oracle Corporation 2014 | 25th July 201469

MySQL Intro JSON NoSQL

  • 1.
    An Introduction to MySQL Whento select MySQL and how to get the most out of the world’s most popular open source database.
  • 2.
    Copyright Oracle Corporation2014 | 25th July 20142 Agenda §  A few facts about MySQL §  Understanding when to choose MySQL §  How to get the most out of MySQL §  Focus on MySQL Fabric §  JSON and Key-Value store §  Q&A
  • 3.
    Copyright Oracle Corporation2014 | 25th July 20143 Agenda §  A few facts about MySQL §  Understanding when to choose MySQL §  How to get the most out of MySQL §  Focus on MySQL Fabric §  JSON and Key-Value store §  Q&A
  • 4.
    Copyright Oracle Corporation2014 | 25th July 20144 MySQL today •  Founded 1995 (MySQL AB, -> Sun Microsystems, -> Oracle) •  12+ million product installations •  100+ million downloads to date •  68,000+ downloads each day •  Web Property de facto Standard (e.g. LAMP & WAMP) •  Runs on Windows, Linux, Solaris, Mac OS X •  MySQL Commercial Editions Available
  • 5.
    Copyright Oracle Corporation2014 | 25th July 20145 Industry Leaders Rely on MySQL
  • 6.
    Copyright Oracle Corporation2014 | 25th July 20146 MySQL 5.5 MySQL Enterprise Monitor 2.3 & 3.0 MySQL Enterprise Backup Security Scalability HA Audit MySQL 5.6 MySQL Workbench 6.1 M y S Q L U t i l i t i e s MySQL Applier for Hadoop MySQL Workbench 5.2 & 6.0 M y S Q L E n t e r p r i s e O r a c l e C e r t i f i c a t i o n s MySQL@Oracle: 4 Years of MySQL Innovation M y S Q L C l u s t e r M a n a g e rWindows installer & Tools MySQL Cluster 7.2 MySQL Cluster 7.1 MySQL Migration Wizard MySQL 5.7 MySQL Cluster 7.4 MySQL Fabric 1.4 MySQL Cluster 7.3
  • 7.
    Copyright Oracle Corporation2014 | 25th July 20147 Agenda §  A few facts about MySQL §  Understanding when to choose MySQL §  How to get the most out of MySQL §  Focus on MySQL Fabric §  JSON and Key-Value store §  Q&A
  • 8.
    Copyright Oracle Corporation2014 | 25th July 20148 Scalability with MySQL Scale Out •  Commodity Intel / AMD •  Data replication between servers •  Add commodity servers to increase capacity •  High Availability via some tweaks
  • 9.
    Copyright Oracle Corporation2014 | 25th July 20149 Small Systems Scale vertically; Active/passive replication for HA App
  • 10.
    Copyright Oracle Corporation2014 | 25th July 201410 Medium-Large; Read-intensive Horizontally scale with read-slaves App
  • 11.
    Copyright Oracle Corporation2014 | 25th July 201411 Medium-Large; Write-intensive §  Write scalability –  Can handle more writes §  Large data set –  Database too large –  Does not fit on single server §  Improved performance –  Smaller index size –  Smaller working set –  Improve performance UID 10000-20000 UID 20001-40000 Application-level sharding App
  • 12.
    Copyright Oracle Corporation2014 | 25th July 201412 Real-Time/Carrier Grade MySQL Cluster MySQL Cluster Data Nodes Clients Application Layer Data Layer Management
  • 13.
    Copyright Oracle Corporation2014 | 25th July 201413 MySQL Fabric 1.4 GA High Availability + Sharding-Based Scale-out MySQL Fabric Connector Application Read-slaves mappings SQL Master group Read-slaves Master group •  High Availability: •  Server monitoring with auto-promotion and transparent application failover •  Fabric-aware connectors rather than proxy: Python, Java & PHP •  Optionally scale-out through sharding •  Application provides shard key •  Range or Hash •  Tools for resharding •  Global updates & tables •  Available in MySQL Utilities 1.4.2 RC
  • 14.
    Copyright Oracle Corporation2014 | 25th July 201414 Considerations §  MySQL scale out is not always transparent to the application –  Implies a closer connection between dev and db administration/design –  Means off-the-shelf packages not designed or adapted for MySQL may not be a good fit §  MySQL Fabric simplifies the development of scale out architectures and will be a key area for future innovation §  MySQL scale out is a good fit for the cloud
  • 15.
    Copyright Oracle Corporation2014 | 25th July 201415 Applications Custom-built web applications are the most popular types of applications deployed by MySQL Enterprise Customers and Community Users
  • 16.
    Copyright Oracle Corporation2014 | 25th July 201416 Agenda §  A few facts about MySQL §  Understanding when to choose MySQL §  How to get the most out of MySQL §  Focus on MySQL Fabric §  JSON and Key-Value store §  Q&A
  • 17.
    Copyright Oracle Corporation2014 | 25th July 201417 DB architecture §  The optimal db architecture may imply some level of application awareness. §  Particularly true where MySQL Cluster or Sharding would be the best solution. §  Ensure the db architecture is considered early enough and communication with the development team is effective
  • 18.
    Copyright Oracle Corporation2014 | 25th July 201418 Monitoring & Tuning §  Monitoring is the most basic and necessary step to managing performance and availability §  The correct monitoring will intercept most problems before they lead to a failure §  MySQL maintains a performance schema internally – determine what you want to monitor and how frequently §  Tune / take remedial action based on the information provided by the monitoring
  • 19.
    Copyright Oracle Corporation2014 | 25th July 201419 Performance Analysis §  Understand what is happening at both DB and OS level §  Set a baseline for acceptable performance §  Set up alerting where actual worse than baseline based on some threshold §  Drill down into performance issues – ideally down to the individual code fragment associated with the issue §  Decide what corrective action to take
  • 20.
    Copyright Oracle Corporation2014 | 25th July 201420 Backups §  A key part of the high availability strategy §  May need to be part of the architectural planning for the whole solution §  Online (non blocking) backups required? §  Incremental as well as full backups required? §  Point in time recovery required? §  Backup / restore performance needs to be considered §  Monitoring of backup status? §  On-premise? Cloud?
  • 21.
    Copyright Oracle Corporation2014 | 25th July 201421 DB Security §  Authorisation §  Privilege Management §  Password Policies §  Authentication §  Encryption – connections, database, backups §  Auditing §  Firewall – SQL Injection, Whitelists, Blacklists §  Hardening best practice
  • 22.
    Copyright Oracle Corporation2014 | 25th July 201422 Support §  Three broad approaches: –  Self support using community resources. Will involve higher levels of expertise, investment of time, some risk. –  ‘Best efforts’ support from a cloud vendor. Typically they have already some investment in MySQL skills so are capable of basic support. No service level. No familiarity with complex architectures. No patching. Very limited monitoring. –  Vendor support. Full technical support including patching (Oracle Premier Support). Consultative support. Monitoring, performance analysis and backup tools, security features and tools, integration with other Oracle products (OEM for example), certifications, indemnity, architectural guidance from account team. Will involve investment of some money.
  • 23.
    Copyright Oracle Corporation2014 | 25th July 201423 Oracle Premier Lifetime Support Oracle Product Certifications/Integrations MySQL Enterprise High Availability MySQL Enterprise Security & Firewall MySQL Enterprise Scalability MySQL Enterprise Backup MySQL Enterprise Monitor/Query Analyzer MySQL Workbench MySQL Enterprise Edition Highest Levels of MySQL Scalability, Security and Uptime MySQL Enterprise Audit
  • 24.
    Copyright Oracle Corporation2014 | 25th July 201424 Agenda §  A few facts about MySQL §  Understanding when to choose MySQL §  How to get the most out of MySQL §  Focus on MySQL Fabric §  JSON and Key-Value store §  Q&A
  • 25.
    MySQL  Fabric   An  extensible  and  easy-­‐to-­‐ use  framework  for   managing  a  farm  of  MySQL   server  suppor=ng  high-­‐ availability  and  sharding   25  09/11/15   Copyright  ©  2015,  Oracle  and/or  its  affiliates.  All  rights  reserved  
  • 26.
    MySQL  Fabric  1.5   •  High  Availability   –  Server  monitoring  with  auto-­‐promoJon  and   transparent  applicaJon  failover   •  OpJonally  scale-­‐out  through  sharding   –  ApplicaJon  provides  shard  key   –  Range  or  Hash   –  Tools  for  resharding   –  Global  updates  &  tables   •  Fabric-­‐aware  connectors  rather  than   proxy:  Python,  Java,  PHP  (pre-­‐ producJon),  .NET,  C  (labs)   –  Lower  latency,  boYleneck-­‐free   •  Server  provisioning  using  OpenStack  etc.   High  Availability  +  Sharding-­‐Based  Scale-­‐out   MySQL  Fabric   Connector   ApplicaJon   Read-­‐slaves   mappings   SQL   HA  group   Read-­‐slaves   HA  group   Connector   ApplicaJon   26  09/11/15   Copyright  ©  2015,  Oracle  and/or  its  affiliates.  All  rights  reserved  
  • 27.
    MySQL  Fabric  Framework  (HA)   All  Data   Primary   Secondary   Extra  Read  Replicas  MySQL  Fabric   Controller   SQL  Queries   State  &   Rou=ng  Info   HA  Group   Coordina=on   and  Control   27  09/11/15   Copyright  ©  2015,  Oracle  and/or  its  affiliates.  All  rights  reserved  
  • 28.
    Dependable  and  Scalable  MySQL  (labs)   Tuesday, October 20, 2015 Oracle Confidential – Restricted 28 Global  Data   Shard  1   Shard  2   MySQL  Fabric   Controller   SQL  Queries   Server/Shard  State  &   Mapping   Global  Group   HA  Group   Coordina=on   and  Control   HA  Group   Group  Replica=on   cluster   Group  Replica=on   cluster   Group  Replica=on   cluster   MySQL Router
  • 29.
    Copyright Oracle Corporation2014 | 25th July 201429 Agenda §  A few facts about MySQL §  Understanding when to choose MySQL §  How to get the most out of MySQL §  Focus on MySQL Fabric §  JSON and Key-Value store §  Q&A
  • 30.
    Copyright  ©  2015,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   MySQL  5.7:  JSON     •  NaJve  JSON  data  type   – NaJve  internal  binary  format  for  efficient  processing  &  storage   •  Built-­‐in  JSON  funcJons   – Allowing  you  to  efficiently  store,  search,  update,  and  manipulate  Documents   •  JSON  Comparator   – Allows  for  easy  integraJon  of  Document  data  within  your  SQL  queries   •  Indexing  of  Documents  using  Generated  Columns     – InnoDB  supports  indexes  on  both  stored  and  virtual  Generated  Columns   – New  expression  analyzer  automaJcally  uses  the  best  “funcJonal”  index  available   •  New  inline  syntax  for  easy  SQL  integraJon     30  
  • 31.
    Copyright  ©  2015,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   MySQL  5.7:  JSON  and  Text  Datatype  Comparison     #  With  feature  column  as  JSON  type   SELECT  DISTINCT    feature-­‐>"$.type"  as  json_extract   FROM  features;   +-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐+   |  json_extract  |   +-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐+   |  "Feature"        |   +-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐+   1  row  in  set  (1.25  sec)   Unindexed  traversal  of  206K  documents   #  With  feature  column  as  TEXT  type   SELECT  DISTINCT      feature-­‐>"$.type"  as  json_extract   FROM  features;   +-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐+   |  json_extract  |   +-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐+   |  "Feature"        |   +-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐+     1  row  in  set  (12.85  sec)   Explana=on:  Binary  format  of  JSON  type  is  very  efficient  at  searching.  Storing  as  TEXT   performs  over  10x  worse  at  traversal.   31  
  • 32.
    Copyright  ©  2015,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   MySQL  5.7:  FuncJonal  Indexes  with  JSON     ALTER  TABLE  features  ADD  feature_type  VARCHAR(30)  AS  (JSON_UNQUOTE(feature-­‐ >'$.type'));   Query  OK,  0  rows  affected  (0.01  sec)   Records:  0    Duplicates:  0    Warnings:  0     ALTER  TABLE  features  ADD  INDEX  (feature_type);   Query  OK,  0  rows  affected  (0.73  sec)   Records:  0    Duplicates:  0    Warnings:  0     SELECT  DISTINCT  feature_type  FROM  features;   +-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐+   |  feature_type  |   +-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐+   |  "Feature"        |   +-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐+   1  row  in  set  (0.06  sec)   From  table  scan  on  206K  documents  to  index  scan  on  206K  materialized  values   Meta  data  change  only  (FAST).   Does  not  need  to  touch  table..   Creates  index  only,  does  not   touch  row  data.   Down  from  1.25  sec  to  0.06  sec   32  
  • 33.
    Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.   •  5.7  supports  funcJons  to  CREATE,  SEARCH,  MODIFY  and  RETURN  JSON  values:   JSON  FuncJons   33 JSON_ARRAY_APPEND()   JSON_ARRAY_INSERT()   JSON_ARRAY()   JSON_CONTAINS_PATH()   JSON_CONTAINS()   JSON_DEPTH()   JSON_EXTRACT()   JSON_INSERT()   JSON_KEYS()   JSON_LENGTH()   JSON_MERGE()   JSON_OBJECT()   JSON_QUOTE()   JSON_REMOVE()   JSON_REPLACE()   JSON_SEARCH()   JSON_SET()   JSON_TYPE()   JSON_UNQUOTE()   JSON_VALID()   hYps://dev.mysql.com/doc/refman/5.7/en/json-­‐funcJons.html  
  • 34.
    NoSQL   Simple  access  paYerns   Compromise  on  consistency   for  performance   Ad-­‐hoc  data  format   Simple  operaJon   SQL   Complex  queries  with  joins   ACID  transacJons   Well  defined  schemas   Rich  set  of  tools   SJll  a  role  for  SQL  (RDBMS)?   26th  March  2015   Copyright  ©  2015,  Oracle  and/or  its  affiliates.  All  rights  reserved.   34  
  • 35.
    NoSQL  Access  to  MySQL  Cluster  data   Apps Apps Apps Apps Apps Apps Apps Apps Apps Apps Apps Apps JPA Cluster  JPA PHP Perl Python Ruby JDBC Cluster  J JS Apache Memcached MySQL JNI Node.JS mod_ndb ndb_eng NDB  API  (C++) MySQL  Cluster  Data  Nodes   26th  March  2015   Copyright  ©  2015,  Oracle  and/or  its  affiliates.  All  rights  reserved.   35  
  • 36.
    MySQL  5.6  Memcached  with  InnoDB   0 10000 20000 30000 40000 50000 60000 70000 80000 8 32 128 512 TPS Client Connections Memcached API SQL Clients  and  Applica=ons   MySQL  Server   Memcached  Plug-­‐in   innodb_   memcached   local  cache   (opJonal)   Handler  API   InnoDB  API   InnoDB  Storage  Engine   mysqld  process   SQL   Memcached  Protocol   Up  to  9x  Higher  “SET  /  INSERT”  Throughput   26th March 2015 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 36
  • 37.
    Cluster  &  Memcached  –  Schema-­‐Free   <town:maidenhead,SL6> key value <town:maidenhead,SL6> key value Key   Value   town:maidenhead   SL6   generic table Application view SQL view 26th March 2015 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 37
  • 38.
    Cluster  &  Memcached  -­‐  Configured  Schema   <town:maidenhead,SL6> prefix key value <town:maidenhead,SL6> key value Prefix   Table   Key-­‐col   Val-­‐col   policy   town:   map.zip   town   code   cluster   Config tables town   ...   code   ...   maidenhead   ...   SL6   ...   map.zip Application view SQL view 26th March 2015 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 38
  • 39.
    Copyright Oracle Corporation2014 | 25th July 201439 Agenda §  A few facts about MySQL §  Understanding when to choose MySQL §  How to get the most out of MySQL §  Focus on MySQL Fabric §  JSON and Key-Value store §  Q&A
  • 40.
    Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   MySQL  Enterprise  Monitor   40   •  Start  monitoring  MySQL  in  10  minutes   •  Real-­‐Jme  MySQL  performance  and   availability  monitoring   •  Visually  find  &  fix  problem  queries   •  Disk  monitoring  for  capacity  planning   •  Cloud  friendly  architecture   – No  agents  required   •  OpJonal  agent  opJon  provides   advanced  Host/OS  monitoring  
  • 41.
    Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   Cloud-­‐friendly  Architecture   41   MySQL  Enterprise    Dashboard   Service  Manager   Repository     HTTPS   Data  Center  Public  Cloud  Private  Cloud   •  MySQL     – Performance  Schema  provides  Query  Analyzer  data   – Provides  all  MySQL  related  metrics     •  Service  Manager   – Collects  all  MySQL  related  metrics   – Collects  all  OS/Host  related  metrics   •  Repository   – Stores  all  historical  data   •  Agent  (opJonal)   – Only  required  for  OS/Host  metrics  
  • 42.
    Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   Enterprise  Monitor  Dashboard   42   "The  MySQL  Enterprise  Monitor  is  an  absolute   must  for  any  DBA  who  takes  his  work  seriously.”     -­‐  Adrian  Baumann,  System  Specialist   Federal  Office  of  InformaJon  Technology  &     TelecommunicaJons   •  SLA  monitoring   •  Real-­‐Jme  performance  monitoring   •  Alerts  &  noJficaJons   •  MySQL  best  pracJce  advisors  
  • 43.
    Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   Enterprise  Query  Analyzer   43   •  Real-­‐Jme  query  performance   •  Visual  correlaJon  graphs   •  Find  &  fix  expensive  queries   •  Detailed  query  staJsJcs   •  Query  Response  Time  index  (QRTi)   – “Quality  of  Service”  (QoS)  measurement   for  each  query   – QoS  measurement  for  a  server,  group,   or  every  instance   – Single  metric  for  query  performance   “With  the  MySQL  Query  Analyzer,  we  were  able  to   idenEfy  and  analyze  problemaEc  SQL  code,  and  triple   our  database  performance.  More  importantly,  we  were   able  to  accomplish  this  in  three  days,  rather  than  taking   weeks.”     Keith  Souhrada     Sorware  Development  Engineer     Big  Fish  Games    
  • 44.
    Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   Enterprise  ReplicaJon  Monitor   44   •  Auto-­‐discovers  replicaJon  topology   •  Master/Slave  performance   monitoring   •  ReplicaJon  advisor     •  Best  pracJce  replicaJon  advice   "I  use  the  MySQL  Enterprise  Monitor   every  day  to  monitor  and  keep  tabs   on  our  MySQL  databases.  Quick  one   stop  shopping  for  keeping  tabs  on   them.”     -­‐ Wes  Homer,     Sr  System  and  Network  Administrator    
  • 45.
    Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   Best  PracJce  Advisors   45   •  Enforce  MySQL  best  pracJces   •  14  Advisor  categories   •  250+  Advisors   •  Threshold-­‐based  alerts   – ExponenJal  moving  averages   – Rate  change  detecJon   •  Expert  problem  resoluJon  advice   "I  definitely  recommend  the  MySQL  Enterprise   Monitor  to  DBAs  who  don't  have  a  ton  of  MySQL   experience.  It  makes  monitoring  MySQL  security,   performance  and  availability  very  easy  to   understand  and  to  act  on.”     Sandi  Barr   Sr.  Sorware  Engineer   Schneider  Electric  
  • 46.
    Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   MySQL  Enterprise  Backup   •  Online,  non-­‐locking  backup  and  recovery     –  Complete  MySQL  instance  backup  (data  and  config)   –  ParJal  backup  and  restore   •  Direct  Cloud  storage  backups  (S3,  etc.)   •  Incremental  backups   •  Point-­‐in-­‐Jme  recovery   •  Advanced  compressed  and  encrypJon   •  Backup  to  tape  (SBT)   •  Backup  validaJon   •  OpJmisJc  backups   •  Cross-­‐Plasorm  (Windows,  Linux,  Unix)   46  
  • 47.
    Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   MySQL  Enterprise  Monitor  +  Backup   47   •  Monitor  backup  results   •  Monitor  backup  performance   •  Ensure  backups  are  up  to  date  
  • 48.
    Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   MySQL  Workbench  EE   •  Database  migraJons   – From  Microsor  SQL  Server,   PostgreSQL,  Sybase  ASE,  Sybase  SQL   Anywhere,  SQLite,  Microsor  Access,   and  more     •  Manage  migraJon  projects   •  Source  and  target  selecJon   •  Object  migraJon   •  Data  migraJon   •  MySQL  version  upgrades   48   New!  Database  MigraJon  Wizard    for  SQL  Server,  Sybase,  SQLite,  SQL  Anywhere  &  PostgreSQL  
  • 49.
    Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   MySQL  Workbench  EE  +  Audit   •  Fast  and  easy  access  to  Audit   events   •  Indexed  searches   – Event  type   – User  account   – Date  range   – Text  match   49  
  • 50.
    Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   MySQL  Workbench  EE  +  Backup   •  Create  and  manage  backup  jobs   – Create  new  backup  jobs   – Schedule  backup  jobs  to  run   automaJcally   – View  current  backup  jobs   – View  recent  backup  acJvity   •  Restore  backups     – Full,  parJal,  incremental  …   50  
  • 51.
    Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    |       Oracle  Enterprise  Manager  for  MySQL   51   Performance   Security   Availability   •  Availability  monitoring   •  Performance  monitoring   •  ConfiguraJon  monitoring   •  All  available  metrics  collected   – Allowing  for  custom  threshold   based  incident  reports   •  MySQL  auto-­‐detecJon    
  • 52.
    Copyright Oracle Corporation2014 | 25th July 201452 Agenda §  A few facts about MySQL §  Understanding when to choose MySQL §  How to get the most out of MySQL §  MySQL Enterprise Edition §  Summary §  Q&A
  • 53.
    Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   •  Provides  20x  beYer  scalability   •  Plugin  improves  sustained   performance  as  user  connecJons   grow   MySQL  Enterprise  Scalability  :  Thread  Pool   53  
  • 54.
    Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   MySQL  Enterprise  Security   •  SSL  enabled  communicaJon   •  Access  control   – Enterprise  authenJcaJon  (PAM,  Windows,  LDAP,  etc.)   – Proxy  users   •  AudiJng  and  monitoring   – MySQL  security  advisors   – Oracle  Audit  Vault   •  Oracle  Database  Firewall   54  
  • 55.
    Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   MySQL  Enterprise  EncrypJon   •  MySQL  encrypJon  libraries     – Symmetric  encrypJon  AES256   – Public-­‐key  /  asymmetric  cryptography   •  Key  management   – Generate  public  and  private  keys   – Key  exchange  methods:  RSA,  DSA,  DH   •  Sign  and  verify  data   – Cryptographic  hashing  for  digital  signing,  verificaJon,  &  validaJon   55  
  • 56.
    Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   MySQL  Enterprise  Audit   •  Out-­‐of-­‐the-­‐box  logging  of  connecJons,  logins,  and  query   •  User  defined  policies  for  filtering,  and  log  rotaJon   •  Dynamically  enabled,  disabled:  no  server  restart   •  XML-­‐based  audit  stream  per  Oracle  Audit  Vault  spec   56   Adds  regulatory  compliance  to   MySQL  applicaJons  (HIPAA,   Sarbanes-­‐Oxley,  PCI,  etc.)    
  • 57.
    Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   MySQL  Enterprise  AuthenJcaJon   57   •  PAM  (Pluggable  AuthenJcaJon  Modules)   – Access  external  authenJcaJon  methods   – Standard  interface  (Unix,  LDAP,  Kerberos,  others)   – Proxied  and  non-­‐proxied  users   •   Windows   – Access  naJve  Windows  services   – AuthenJcate  users  already  logged  into  Windows   (Windows  AcJve  Directory)   •  Pluggable  AuthenJcaJon  API   Integrates  MySQL  with  exisJng   security  infrastructures  and  SOPs  
  • 58.
    Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   MySQL  Enterprise  High  Availability   •  HA  with  MySQL  Fabric  (recommended)   •  Oracle  VM  Templates  for  MySQL   •  HA  with  DRBD  and  Linux  Clustering   •  HA  with  Solaris  Clustering   •  HA  with  Windows  Failover  Clustering   •  HA  with  Oracle  Clusterware  Plugin   58     Range  of  opJons  to  make  your   MySQL  applicaJon  deployments   Highly  Available  
  • 59.
    Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   MySQL  Enterprise  HA  :  MySQL  Fabric   59   •  High  Availability  features   – Server  monitoring   – Auto-­‐promoJon   – Transparent  applicaJon  failover   – Dynamically  scale  up  and  down   •  Fabric-­‐aware  connectors  rather   than  a  proxy   – Python,  Java,  and  PHP   – Lower  latency,  boYleneck-­‐free   •  OpJonal  sharding  features   MySQL  Fabric   Connector   ApplicaJon   Read-­‐slaves   mappings   SQL   HA  group   Read-­‐slaves   HA  group   Connector   ApplicaJon  
  • 60.
    Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   MySQL  Enterprise  HA  :  Shared  Nothing   60   •  DRBD  +  Clustering   – Based  on  distributed  storage,  not  a  SAN   – Synchronous  replicaJon  eliminates  risk  of   data  loss   •  Open  source,  mature,  &  proven   •  CerJfied  and  fully  supported  by  Oracle   – DRBD  integrated  into  Oracle  Linux   Unbreakable  Enterprise  Kernel  R2   – Pacemaker  and  Corosync  for  clustering  /   failover   – Updates  to  stack  via  ULN  channel  
  • 61.
    Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   MySQL  Enterprise  HA  :  Shared  Storage   61   •  Stricter  data  durability,  integrity   constraints   – Shared  storage  persists  commits  across   instances   – Clustering  sorware  manages  data  access   – Auto-­‐failover  of  applicaJons  and  database   – Deploy  with  MySQL  Fabric  for  scale-­‐out   •  MySQL  cerJfied  &  supported  soluJons   – Oracle  Clusterware   – Windows  Failover  Clustering   – Oracle  Solaris  Cluster   Virtual  IP     Clients  
  • 62.
    Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   MySQL  Enterprise  HA  :  Oracle  VM  Templates   62   •  Oracle  Linux   •  Oracle  VM     •  Oracle  VM  Manager     •  Oracle  Cluster  File  System  2  (OCFS2)   •  MySQL  Database  (Enterprise  EdiJon)   •  Pre-­‐installed  &  pre-­‐configured   •  Full  integraJon  &  QA  tesJng   •  Single  point  of  support   Oracle  VM  Servers   Oracle  VM  Server  Pool   ocfs2   Oracle  VM   Manager   SAN  /  iSCSI   Oracle   VM   Secure  Live   Migra=on  (SSL)   Oracle   VM   Automa=c  Fault   Detec=on  &   Recovery  
  • 63.
    Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   MySQL  Enterprise  Support   •  Largest  MySQL  engineering  and  support  organizaJon   •  Backed  by  the  MySQL  developers   •  World-­‐class  support,  in  29  languages   •  Hot  fixes  &  maintenance  releases   •  24x7x365   •  Unlimited  incidents   •  ConsultaJve  support   •  Global  scale  and  reach   Get  immediate  help  for  any  MySQL   issue,  plus  expert  advice 63  
  • 64.
    Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   MySQL  ConsultaJve  Support     Make  the  Most  of  your  Deployments   •  Remote  troubleshooJng   •  ReplicaJon  review   •  ParJJoning  review   •  Schema  review   •  Query  review   •  Performance  tuning   •  ...and  more   64  
  • 65.
    Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   Work  Directly  with  MySQL  Engineering     •  A  direct  relaJonship  with  the  MySQL  team   •  The  ability  to  parJcipate  in:   – Product  roadmaps   – Product  betas   – Customer  advisory  boards   •  Work  closely  with  Support  Engineers   – Resolve  issues  faster   – Request  bug  and  feature  request  escalaJons     65  
  • 66.
    Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   MySQL  Enterprise  Oracle  CerJficaJons   • Oracle  Enterprise  Manager  for   MySQL   • Oracle  Linux  (w/DRBD  stack)   • Oracle  VM   • Oracle  Solaris   •  Oracle  Solaris  Clustering   •  Oracle  Clusterware   • My  Oracle  Support   • Oracle  Fusion  Middleware   • Oracle  GoldenGate   • Oracle  Audit  Vault   • Oracle  Database  Firewall   • Oracle  Secure  Backup   MySQL  integrates  into  your  Oracle  environment   66  
  • 67.
    Copyright Oracle Corporation2014 | 25th July 201467 Cross-Platform Lower TCO Performance Ease of Use Summary - Why MySQL?
  • 68.
    Copyright Oracle Corporation2014 | 25th July 201468 Agenda §  A few facts about MySQL §  Understanding when to choose MySQL §  How to get the most out of MySQL §  Summary §  Q&A
  • 69.
    Copyright Oracle Corporation2014 | 25th July 201469