1. An Introduction to
MySQL
When to select MySQL and how to get the most
out of the world’s most popular open source
database.
2. 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
3. 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
4. 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
6. 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
7. 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
8. 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
9. Copyright Oracle Corporation 2014 | 25th July 20149
Small Systems
Scale vertically; Active/passive replication for HA
App
10. Copyright Oracle Corporation 2014 | 25th July 201410
Medium-Large; Read-intensive
Horizontally scale with read-slaves
App
11. 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
12. Copyright Oracle Corporation 2014 | 25th July 201412
Real-Time/Carrier Grade
MySQL Cluster
MySQL Cluster Data Nodes
Clients
Application Layer
Data Layer
Management
13. 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
14. 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
15. 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
16. 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
17. 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
18. 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
19. 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
20. 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?
21. 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
22. 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.
23. 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
24. 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
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 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
39. 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
52. 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
67. Copyright Oracle Corporation 2014 | 25th July 201467
Cross-Platform
Lower TCO Performance
Ease of Use
Summary - Why MySQL?
68. 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