Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
MySQL for Oracle DBA -- Rocky Mountain Oracle User Group Training Days '15
1. <Insert Picture Here>
MySQL: An Introduction for Oracle DBAs or
How to Speak MySQL for Beginners
Dave Stokes
David.Stokes@Oracle.com @Stoker
MySQL Community Manager
2. 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.
Safe Harbor Statement
3. • How to get MySQL
• MySQL Architecture 101
• Storage Engines
• Cluster
• Replication
• Support
• Tools of the trade
• New Stuff
• Where to use MySQL / Where not to use MySQL
• Additional Resources
• Joining the 'MySQL gang'
Agenda
4. How to get MySQL
Community:
Freely downloadable version of the world's most popular
open source database. It is available under the GPL license
and is supported by a huge and active community of open
source developers.
Enterprise:
Paid subscription includes support and the following
• MySQL Enterprise Backup
• MySQL Enterprise Monitor
• MySQL Query Analyzer
• MySQL Workbench
Free for 30 day evaluation
5. Get it now
Server – Community or Enterprise (for 30 days)
Cluster –real-time open source transactional database designed for
fast, always-on access to data under high throughput conditions.
Workbench – visual database design application that can be used to
efficiently design, manage and document database schemata and
get MySQL Utilities too!
Proxy – a simple program that sits between your client and MySQL
server(s) that can monitor, analyze or transform their communication.
Connectors – ODBC, Java, .Net, MXJ, C/C++, DBI, Ruby, Python,
etc.
http://dev.mysql.com/downloads/
6. Easy to install
Pre-complied binaries
Example config files
Demo database
Lots of documentation
Docs
Online
Books
Classes
User Groups
15 Minute install
5 minutes Windows
Packages, Binaries,
packages &
source code
Compile your own
Add/delete Storage Engine
Add/delete features
7. MySQL Architecture 101
MySQL is a RDMS
Wide variety of hardware platforms
Connectors for most languages
Runs great on commodity hardware
Scales from small to Facebook
8. Is it standard SQL?
Yes
aim is to support the full
ANSI/ISO SQL standard,
but without making
concessions to speed and
quality of the code
No
Depends on engine
9. MySQL Storage Engines
What is it?
MySQL supports multiple storage
engines. Each one implements
tables that have a specific set of
properties or characteristics.
10. MySQL Database
Performance, Reliability, Ease of Use
Support for common
development
languages/platforms
Efficient multi-
threaded session
handling
Full DML, DDL
parsing, cost
based optimizer,
caching of queries
and result sets
Flexible Storage
Engine options for
application specific
storage needs
Flexible logging and physical storage options
11. • Default Storage Engine for MySQL 5.5 and above
• ACID-compliant transactions, MVCC
• Row-level locking
• Two phase commit
• Efficient indexing
• Fast DDL operations
• Table compression
• Automatic crash recovery
• Referential integrity
• Online backup
• More
MySQL Database
InnoDB - Transactional by Default
12. Storage Engines:
Select a specialized storage engine for a particular application
need.
InnoDB: a high-reliability and high-performance storage engine
for MySQL designed for transaction processing. It follows the
ACID model. Row-level locking and Oracle-style consistent
reads increase multi-user concurrency and performance
MyISAM: oldest storage engine has many features
that have been developed over years.
Memory: creates tables with contents that are stored in memory.
MySQL Cluster offers the same features as the MEMORY
engine with higher performance levels, and provides
additional features
14. InnoDB
InnoDB is a high-reliability and high-performance storage engine.
Key advantages of InnoDB include:
ACID model, with transactions featuring commit, rollback, and crash-
recovery capabilities to protect user data.
Row-level locking and Oracle-style consistent reads increase multi-user
concurrency and performance.
InnoDB tables arrange your data on disk to optimize common queries
based on primary keys.
InnoDB also supports FOREIGN KEY referential-integrity constraints.
15. Cluster
MySQL Cluster is a real-time open
source transactional database
designed for fast, always-on
access to data under high
throughput conditions. MySQL
Cluster utilizes a “shared
nothing” architecture which
does not require any additional
infrastructure investment to
provide 99.999% data
availability with no single point
of failure.
16. Copyright 2011 Oracle Corporation 24
MySQL Database
High Availability with MySQL Replication
17. MySQL Cluster 7.3
High Write Scalability, Real Time Performance, 99,999% Uptime
Copyright 2011 Oracle Corporation 25
• Telecoms
• Subscriber Databases (HLR/HSS)
• Service Delivery Platforms
• VoIP, IPTV & VoD
• Mobile Content Delivery
• On-Line app stores and portals
• IP Management
• Payment Gateways
• Web
• User profile management
• Session stores
• eCommerce
• On-Line Gaming
• Application Servers
GA
18. • Improved Administration
• NDBINFO: Real time status & usage statistics
• MySQL Cluster Manager (CGE Only)
• Higher Performance
• MySQL Cluster Connector for Java
• Native Java & OpenJPA access to MySQL Cluster
• Carrier Grade Availability & Performance
• Shared nothing, distributed design for 99.999% availability
• Sub-Second Failover & Self Healing Recovery
• On-Line Scaling and Maintenance
• Parallel Multi-Master Architecture
• Low Latency, Real Time Responsiveness
MySQL Cluster 7.3 GA
19. Who uses MySQL Cluster?
US Navy carrier
flight operations
20. Cluster – Typical Performance
Availability
99.999% (<5 min downtime / year)
Performance
Response Time 2-5 millisecond (with synchronous replication
and access via NDB API
Throughput of 10,000+ replicated transactions/sec on a 2
Node Cluster, with 1 CPU Per Node (minimal configuration)
Throughput of 100,000 replicated transactions/sec on 4 Node
Cluster, with 2 CPU Per Node (low-end configuration)
Failover
Sub-second failover enables you to deliver service
without interruption
GA
21. •<Insert Picture Here>
“Testing of Adaptive Query Localization has yielded over 20x
higher performance on complex queries within our application,
enabling Docudesk to expand our use of MySQL Cluster into a
broader range of highly dynamic web services.”
Casey Brown
Manager, Development & DBA Services, Docudesk
MySQL Cluster 7.2
Early Adopter Speaks!
22. MySQL Replication Overview
Native in MySQL
Used for Scalability and
HA
Asynchronous as
standard
Semi-Synchronous
support added in
MySQL 5.5
Each slave adds
minimal load on master
24. MySQL Replication
Delivering Read Scalability
Used by leading web properties for scale-out
Reads are directed to slaves, writes to master
Delivers higher performance & scale with efficient
resource utilization
Clients
Slaves Master
MySQL Replication
Copyright Oracle Corporation 2011 34
25. Writes & Reads Reads Reads
• Write to one master
• Read from many slaves, easily add more as needed
• Perfect for read/write intensive apps
Application
MySQL Replication
Load Balancer
MySQL Database
Replication Enables Scalability
26. Application
MySQL Server
SE2SE1
Storage Engines
Master
Binlog
Replication
MySQL Server
Application
Slave
Relay
Binlog
L R R A
SE2SE1
Storage Engines
Logging/
Replication
Semi-Sync
Replicator
Relay Log/
Applier
Semi-Sync
Receiver
Ack
Available as two separate loadable components
for the master and the slave
MySQL 5.5 Semisynchronous Replication
Copyright Oracle Corporation 2011 37
27. Semisynchronous replication
Improved resilience by having master wait for slave to
receive events.
Slave fsync tuning & Automatic relay log recovery
Tune fsyncs so corruption is less likely on slave crashes.
Let the slave recover from corrupted relay logs.
Replication Heartbeat
Have a more precise failure detection mechanism.
Avoid spurious relay log rotation when the master is idle.
Per server replication filtering
Instruct slave to discard events from a master with a
specific server id.
MySQL 5.6 Replication Features
28. Precise Slave Type Conversions
Use different types on master and slave and get automatic type
promotion and demotion when using RBR
Individual Log Flushing
Selectively flush server logs when using 'FLUSH
LOGS'
Safe logging of mixed transactions
Replicate transactions containing both InnoDB and
MyISAM changes
Multi Threaded and Crash Safe
MySQL 5.6 Replication Features
dev.mysql.com/downloads/mysql
29. • Reach out to the community
– Irc on freenode
– Forums.mysql.com
– Local user groups
• Oracle Support
• Certifications
MySQL Support
How can I get help ?
30. • MySQL Database, Visual Development/Admin, Monitoring,
Backup tools, and Oracle Lifetime Support services
MySQL Enterprise
Monitor
Performance
Monitoring/ Alerts
Hot fixes
Service packs
MySQL Workbench
Oracle Lifetime Support
MySQL Enterprise Backup
MySQL Enterprise Edition
Query Analyzer
Dev/Admin, Monitoring/
Backup Tools
Oracle Lifetime
Support Services
31. • 24 X 7 Problem Resolution
Services
• Unlimited Support Incidents
• Knowledge Base
• Maintenance Releases, Bug
fixes, Patches, Updates
• MySQL Consultative Support
• Staffed by experienced,
seasoned MySQL Engineers
Oracle Premier Support for MySQL
32. • Oracle Golden Gate
• Bi-directional replication between MySQL and Oracle
• Exadata Data Stores – Enterprise DW, legacy apps,
etc.
• Hybrid Applications (MySQL frontend + Oracle data
store)
• Oracle Secure Backup
• MySQL Enterprise Backup 3.6 - supports backup
streaming to OSB via SBT API
MySQL Enterprise Certifications
Oracle Products
Enables you to manage your Oracle and MySQL databases
with Oracle tools/solutions you are already using.
33. • Oracle Listens
• Enterprise backup
• Enterprise Monitor
• Query Analyzer
• Workbench
• Proxy Server
• Memcache
• Windows development
MySQL
Tools of the trade ?
34. MySQL Server Feature Requests
- Online Backup is the #1 most requested feature for MySQL Users and Customers
35. MySQL Enterprise Backup
• Online Backup for InnoDB
• Full, Incremental, Partial Backups (scriptable interface)
• Compression
• Point in Time, Full, Partial Recovery options
• Metadata on status, progress, history
• Unlimited Database Size
• Cross-Platform
• Windows, Linux, Unix
• Certified with Oracle Secure Backup
MEB Backup
Files
MySQL
Database Files
mysqlbackup
Ensures quick, online backup and recovery of your MySQL apps.
36. A Virtual MySQL Tuning Assistant!
MySQL Enterprise Monitor
• Global view of MySQL
environment
• Automated, rules-based
monitoring and alerts (SMTP,
SNMP enabled)
• Query capture, monitoring,
analysis and tuning, correlated
with Monitor graphs
• Visual monitoring of “hot”
applications and servers
• Real-time Replication Monitor
with auto-discovery of master-
slave topologies
• Integrated with MySQL Support
37. MySQL Query Analyzer
• Centralized monitoring of queries
without Slow Query Log, SHOW
PROCESSLIST;
• Enabled via MySQL Connectors
• Aggregated view of query
execution counts, time, and rows
• Visual “grab and go” correlation
with Monitor graphs
• Traces query executions back to
source code
Saves you time parsing atomic
executions from logs. Finds
problems you cannot find yourself.
38. MySQL Workbench SE
Database Design
• Visual Design, modeling
• Forward/Reverse Engineer
• Schema validation, Schema doc
SQL Development
• SQL Editor - Color Syntax
Highlighting
• Objects - Import/Export, Browse/Edit
• Connections - Wizard, SSH Tunnel
Database Administration
• Status, Configuration, Start/Stop
• Users, Security, Sessions
• Import/Export Dump Files
Scripting & Plug-in Support
UI Designed to match VS 2010
Saves you time developing and
managing your MySQL apps.
39. MySQL Workbench - Plugins
• Community driven Plugins & Add-ons site
– Code in Python, share with the community
40. • Oracle Linux with the Unbreakable
Enterprise Kernel
• Oracle VM
• Oracle VM Manager
• Oracle Cluster File System 2 (OCFS2)
• MySQL Database (Enterprise Edition)
• Pre-Installed & Pre-
Configured
• Full Integration & QA Testing
• Single Point of Support**
Oracle VM Servers
Oracle VM Server Pool
ocfs2
Oracle VM
Manager
SAN / iSCSI
Secure Live
Migration (SSL)
Oracle VM
Automatic Fault
Detection &
Recovery
MySQL Enterprise High Availability
OVM Template for MySQL
Oracle VM
** Technical support for Oracle Linux and Oracle Virtual Machine requires
Unbreakable Linux Network subscription..
GA
41. New Stuff
Oracle Enterprise Manager for MySQL
•Collects over 500 metrics
•Requires Oracle Enterprise manager 12c release 4 or better
•Monitors Enterprise and Community MySQL
Oracle Audit Vault Support
Database Firewall Support
42. • Fast, simple access to InnoDB
• Accessed via Memcached API
• Use existing Memcached clients
• Bypasses SQL transformations
• NotOnlySQL access
• Memcached for key-value operations
• SQL for rich queries, JOINs, foreign
keys, etc.
• Implementation
• Memcached daemon plug-in to mysqld
• Memcached protocol mapped to the
native InnoDB API
• Shared process space for ultra-low
latency
MySQL 5.6: Key-Value access to InnoDB
NotOnlySQL: Memcached API
InnoDB Storage Engine
MySQL
Server
Memcached
plugin
Application
SQL
(MySQL Client)
NoSQL
(Memcached
Protocol)mysqld
43. Already use MySQL
Require read scalability
Require high performance
Don’t need durability or HA in caching
layer
Need massive/proven scaling capabilities
Want vendor-neutral solution
Don’t need transactions
Don’t mind “Warming” up cache after a
failure
Need a generic cache – not Java object
specific
Need Cloud friendly cache
MySQL 5.6: When to use memcache
InnoDB Storage Engine
MySQL
Server
Memcached
plugin
Application
SQL
(MySQL Client)
NoSQL
(Memcached
Protocol)mysqld
45. Performance & Scalability
Improved on Windows
MySQL 5.5 Benchmarks
Lower TCO
More Affordable
Easier to Administer
Ease of Use
MySQL Workbench
New Connector/NET 6.3
Cross-platform
20+ Platforms
No Lock-in
MySQL on Windows
The Right Choice
46. Where to use MySQL?
Where not to use MySQL?
Yes
Data size:
Small to Facebook
Speed:
doesn’t matter to blazing
HA
Ease
Cost
Ubiquity
No
Not a drop in replacement for
12 or earlier or RAC
May not have all the features
you know and love from
Oracle 12 (such as)
47. Things Oracle DBAs will miss
No Materialized views
Authentication Primitive
No GRID control
Nothing analogous to RAC
PL/SQL
JOINs per query limited to 61
Execution plans cached per
connection not globally
Different storage engines
behave differently, I.E.
COUNT()
See Xaprb.com's 50 things
to know before migrating
Oracle to MySQL*
* (A little dated)
48. Changes In Prases
Oracle Instances =
MySQL Databases
V$ =
Performance_Schema,
Information_Schema &
Sys_schema
Oracle Databases =
MySQL Schemas
49. Additional Resources
mysql.com
• Download MySQL 5.5, MySQL Cluster 7.1 GA, GPL Products
• MySQL Products, Editions, Licensing Options
• TCO calculator
• Upcoming Events
• Customer use cases and success stories
dev.mysql.com
• Download MySQL 5.6 DMR and Labs “early access” features
• Developer Zone Articles, How to’s
eDelivery.com
• Download and evaluate all MySQL products
50. Additional Resources
Planet.mysql.com
• Blog feeds from the experts and the community
Books:
• MySQL by Paul DuBois
• MySQL Administrator's Bible by Sheeri Cabral
• High Performance MySQL: Optimization, Backups, Replication,
and More (next edition in the works)
forums.mysql.com
• Community interaction
Preview of coming attractions – not for production
• Labs.MySQL.Com
51. Joining the ‘MySQL Gang’
1. Download MySQL & use
2. Local User Groups (MySQL, LAMP, IOUG …)
1. See me if you want to start one!
3. Read http://Planet.MySQL.Com
4. Certifications
52. <Insert Picture Here>
Thanks for attending!
Dave Stokes David.Stokes@Oracle.com
@stoker slideshare.net/davestokes