mysql grundlagen und integration in andere oracle produkte · mysql grundlagen und integration in...
TRANSCRIPT
MySQL Grundlagen und Integration in andere Oracle Produkte
Carsten Thalheimer
Sales Consultant MySQL GBU ([email protected])
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Agenda
MySQL today
Download and Installation
Access MySQL databases
Scaling MySQL
MySQL Community vs. MySQL Commercial
Integration into Oracle Infrastructure
2
1
2
3
4
5
6
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
MySQL … a “Start up” ??? More Investment, More Innovation
2009 2015
3
... 20 Years MySQL … 10 Years InnoDB of Oracle Stewardship … 5 Years MySQL within Oracle (before Sun Microsystems)
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Source: http://db-engines.com/en/ranking
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
MySQL Database
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 InnoDB Default! ACID Transactions, Crash Recovery, Foreign Keys, Up to 64 TByte
Flexible logging and physical storage options
Server runs on MS Windows, Linux, Solaris and others OSes
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
MySQL – The view from the moon
• MySQL < 5.0/5.1 [pre Oracle] - MyISAM default, InnoDB optional Before 2010 - Very often default in Linux distributions
• MySQL 5.5 more ‘SQLish’ - First release under Oracle Dec 2010 - InnoDB default (MVCC, ACID), MyISAM optional - MS Windows highly optimized
• MySQL 5.6 Replication revamp - InnoDB+, GTID, NoSQL, Performance SchemaIn Feb 2013 - Used by some of the biggest Websites - Introduction of MySQL Fabric
• MySQL 5.7 New ways? … - InnoDB++, GIS Support, QRP, Instrinc Tables Oct 2015 (NoSQL and JSON) - MultiThreaded SLs, MultiSourceRpl, Group Rpl - MySQL Fabric, SemiSync+
6
Tip: Use new versions, don‘t stick with old stuff…
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
MySQL 5.7
7
Enhanced InnoDB: faster online & bulk load operations
Replication Improvements (incl. multi-source, multi-threaded slaves...)
New Optimizer Cost Model: greater user control & better query performance
Performance Schema Improvements
MySQL SYS Schema
Performance & Scalability Manageability
2 X Faster than MySQL 5.6
Improved Security: safer initialization, setup & management
And many more new features and enhancements... http://mysqlserverteam.com/the-mysql-5-7-7-release-candidate-is-available/
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Agenda
MySQL today
Download and Installation
Access MySQL databases
Scaling MySQL
MySQL Community vs. MySQL Commercial
Integration into Oracle Infrastructure
8
1
2
3
4
5
6
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
MySQL – Where should I start? http://www.mysql.com/downloads
• MySQL Community Edition (CE)
– ‘Open Source’ MySQL Server http://www.mysql.com/downloads
• MySQL Standard Edition (SE) – Open Source or Commercial MySQL Server
– Including MySQL Support
– https://edelivery.oracle.com/ or https://support.oracle.com
• MySQL Enterprise Edition (EE)
– Standard Edition (SE)
– Enterprise Tools (Monitor, Backup, Firewall, Audit and others)
– https://edelivery.oracle.com/ or https://support.oracle.com
• (MySQL for OEM, ISV, VAR)
9
Tip: Always use version from mysql.com …
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
MySQL – Installation? http://www.mysql.com/downloads
• MySQL on Windows:
- 32/64 Bit, Windows 7/8/10, 2008R2/2012 - Unified MySQL online/offline Installer
• MySQL on Linux: - 32/64 Bit, Oracle/Red Hat Linux, Suse, Debian, Ubuntu - rpm/deb/ etc. Package Installation - yum - tar
10
Tip: Use the OS which you knows best …
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
MySQL & Oracle Product Integrations
• Oracle Linux 5 / 6 / 7
• Oracle VM
• Oracle Solaris 10 (U8+), 11 – 32/64 Bit, Sparc_64
• Oracle Clusterware
11
Tip: Oracle Linux is free …
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Important Settings See: http://www.fromdual.com/mysql-configuration-file-sample
• my.cnf or my.ini (Linux/Win)
– Check /etc/ oder /etc/mysql
– Check C:\ProgramData\MySQL
• max_connections # Values < 1000 are typically good
• bind-address # MySQL Bind address
• innodb_flush_log_at_trx_commit (InnoDB) # 1 for durability, 0 or 2 for performance
• innodb_buffer_pool_size (InnoDB) # Go up to 80% of your available RAM
• key_buffer_size (MyISAM) # Set to 25 - 33 % of RAM if you still use MyISAM
Tip: Change the my.* file after installation …
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Agenda
MySQL today
Download and Installation
Access MySQL databases
Replication and Fabric
MySQL Community vs. MySQL Commercial
MySQL
13
1
2
3
4
5
6
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Access MySQL CLI and Apps
• CLI: mysql shell> mysql --user=... --password=... --host=... -- port=... Database
• MySQL Connector (here Python) import mysql.connector cnx = mysql.connector.connect(user='scott', password='tiger', host='127.0.0.1', database='employees') cnx.close()
14
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
MySQL NoSQL (via Memcached)
15
Same app can leverage:
Key-value access to InnoDB
via Memcached API
SQL for rich queries, fully transactional
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Access MySQL MySQL Workbench EE
• Administration
– Start Stop, Backup, Monitoring
• Development
• ER-Diagrams
• Database migrations
– From Microsoft SQL Server, PostgreSQL, Sybase ASE, Sybase SQL Anywhere, SQLite, Microsoft Access, and more
16
Tip: Use it for day to day administration!
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Cool, but does it really scale?
reliablly
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Agenda
MySQL today
Download and Installation
Access MySQL databases
Scaling MySQL
MySQL Community vs. MySQL Commercial
Integration into Oracle Infrastructure
18
1
2
3
4
5
6
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
MySQL 5.7 Sysbench Benchmark: OLTP Read Write 1.5x Faster than MySQL 5.6
3x Faster than MySQL 5.5
0
100.000
200.000
300.000
400.000
500.000
600.000
700.000
8 16 32 64 128 256 512 1.024
Qu
eri
es
pe
r Se
con
d
Connections
MySQL 5.7: Sysbench OLTP Read Write
MySQL 5.7
MySQL 5.6
MySQL 5.5
Intel(R) Xeon(R) CPU E7-8890 v3 4 sockets x 18 cores-HT (144 CPU threads) 2.5 Ghz, 512GB RAM Linux kernel 3.16
19
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
MySQL Replication (HA’) • Native to MySQL, Duplicates updates from a “master” to a “slave”
• Failover is either scripted or provided by additional middleware
• Supports Asynchronous and Semi-Synchronous replication
• Most common solution for HA – Used to scale out as well
Master
Slaves
Web / App Servers
Writes & Reads Reads
Administration Utility
Master Status & Switchover
Tip: Always replicate at least with one slave!
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
MySQL Fabric 1.5 (HA)
• High Availability
– Server monitoring with auto-promotion and transparent application failover
• Fabric-aware connectors or MySQL Router
High Availability
MySQL Fabric
Connector
Application
Read-slaves
HA group
Connector
Application
21
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
MySQL Fabric 1.5 (HA+)
• High Availability
– Server monitoring with auto-promotion and transparent application failover
• Optionally scale-out through sharding
– Application provides shard key
– Range or Hash
– Tools for resharding
– Global updates & tables
• Fabric-aware connector or MySQL Router
High Availability + Sharding-Based Scale-out
MySQL Fabric
Connector
Application
Read-slaves
SQL
HA group
Read-slaves
HA group
Connector
Application
22
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Agenda
MySQL today
Download and Installation
Access MySQL databases
Scaling MySQL
MySQL Community vs. MySQL Commercial
Integration into Oracle Infrastructure
23
1
2
3
4
5
6
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
MySQL is ‚free‘, but… All MySQL Binaries are available @ http://www.mysql.com
Oracle MySQL is licensed under the GNU General Public License (GPL) and is free.
MySQL Code is availeable :
… but there are costs associated with using it:
- Cost to integrate, deploy and secure - Cost to certify, support and maintain - Opportunity cost Are you running MySQL efficiently ?
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Management Tools* Advanced Features* Support
• Scalability • High Availability • Security • Audit
• Monitoring • Backup • Development • Administration • Migration
• Technical Support • Consultative Support •Oracle Certifications
MySQL Enterprise Edition
25
* All Plugins and Tools are ‚free‘ as part of the Support Subscription
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
MySQL Enterprise Authentication
26
• PAM (Pluggable Authentication Modules)
– Access external authentication methods
– Standard interface (Unix, LDAP, Kerberos, others)
– Proxied and non-proxied users
• Windows
– Access native Windows services
– Authenticate users already logged into Windows (Windows Active Directory)
• Pluggable Authentication API Integrates MySQL with existing security infrastructures and SOPs
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
MySQL Enterprise Audit
• Out-of-the-box logging of connections, logins, and query
• User defined policies for filtering, and log rotation
• Dynamically enabled, disabled: no server restart
• XML-based audit stream per Oracle Audit Vault spec
– Easily integrate all auditing within Audit Vault
27
Adds regulatory compliance to MySQL applications (HIPAA,
Sarbanes-Oxley, PCI, etc.)
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Global Filtering/Policies (First Class support)
AV Repository
AV Server
AV Agent
• For MySQL 5.5 and higher
• Audit Vault collects local MySQL audit stream XML data based on MySQL “collector” and auditing data from MySQL packets on network
• AV Console, Repo used to browse/report, archive, manage MySQL audit images
Oracle Audit Vault & Database Firewall
28
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
MySQL Enterprise Firewall
• Real Time Protection
–Queries analyzed and matched against White List
• Blocks SQL Injection Attacks
– Positive Security Model
• Block Suspicious Traffic –Out of Policy Transactions detected & blocked
• Learns White List
– Automated creation of approved list of SQL command patterns on a per user basis
• Transparent
– No changes to application required
29
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Management Tools* Advanced Features* Support
• Scalability • High Availability • Security • Audit
• Monitoring • Backup • Development • Administration • Migration
• Technical Support • Consultative Support •Oracle Certifications
MySQL Enterprise Edition
30
* All Plugins and Tools are ‚free‘ as part of the Support Subscription
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Oracle Enterprise Manager for MySQL
31
Performance Security
Availability
• Availability monitoring
• Performance monitoring
• Configuration monitoring
• All available metrics collected
– Allowing for custom threshold based incident reports
• MySQL auto-detection
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
MySQL Enterprise Monitor
32
• Real-time MySQL performance and availability monitoring
• Visually find & fix problem queries
• Disk monitoring for capacity planning
• Alerts & notifications
• MySQL best practice advisors
• Security/Backup/Replication Monitoring
• Enterprise Query Analyzer
Tip: Try the 30days Trial and check advisors!
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
MySQL Enterprise Backup Logical (aka. Dump) vs. Physical (aka. MEB)
• Online, non-locking backup and recovery – Complete MySQL instance backup (data and config) – Partial backup and restore
• Incremental backups • Point-in-time recovery • Advanced compressed and encryption • Backup to tape (SBT) • Backup validation • Cross-Platform (Windows, Linux, Unix) • Direct Cloud storage backups (S3, etc.)
33
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
• MySQL Enterprise Backup images to tape (like RMN)
• Via SBT interface (standard for MMS)
• Encryption, policy-based management, vault rotation
• Common management, SOP for Oracle, MySQL backups mysqlbackup
--port=3306
--protocol=tcp
--user=root
--password
--backup-image=sbt:backup-shoeprod-2011-10-02
--backup-dir=/backup backup-to-image
Oracle Integrations: Secure Backup
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Management Tools Advanced Features Support
• Scalability • High Availability • Security • Audit
• Monitoring • Backup • Development • Administration • Migration
• Technical Support • Consultative Support •Oracle Certifications
MySQL Enterprise Edition
35
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
MySQL Enterprise Support
• Based on Metalink , https://support.oracle.com
• Largest MySQL engineering and support organization
• Backed by the MySQL developers
• World-class support, in 29 languages
• Hot fixes & maintenance releases
• 24x7x365
• Unlimited incidents
• Consultative support
• Global scale and reach
Get immediate help for any MySQL issue, plus expert advice
36
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
MySQL Keynote and further sessions…
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Last (and most important) Tip …
• Centralize your MySQL Infrastructure …
• Run them as a real database –Monitor / Backup / Secure /Replicate your databases
–Multiple DBs • per MySQL
• Multiple MySQL daemons per OS
• OS Container & Zones
• Virtualization
… normally a few instances properly operated is the much better choice!
38
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Agenda MySQL within Oracle
Overview of MySQL architecture
MySQL Replication and MySQL Fabric
Commercial MySQL vs. „Open Source“
MySQL Subscription / MySQL License
A MySQL Reference
Questions and Answers
39
1
2
3
4
5
6
7 Carsten Thalheimer Mobile: +49 172 8833386 [email protected]
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Agenda
MySQL today
Download and Installation
Access MySQL databases
Scaling MySQL
MySQL Community vs. MySQL Commercial
Integration into Oracle Infrastructure
MySQL Cluster
40
1
2
3
4
5
6
7
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
MySQL Architecture: Local Data on disk (maybe NAS/SAN or others)
Clients
InnoDB
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
MySQL Cluster Architecture: Replication ≠ Cluster!
Clients
InnoDB InnoDB InnoDB
… based on Asynchronous or Semisynchronous Replication
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
MySQL Cluster Architecture: Cluster = Network Database, NDB
Clients
Access Layer NDB NDB
Node Group = 2x Server
Number of Replica = 1 (Schema + Copy)
MySQL Cluster Data Nodes
Data Layer
Management Management
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
MySQL Cluster Components
44
NDB API
(Applications)
Data Node
(Data Storage)
MGM Node
(Management)
SQL Node
(Applications)
• Standard SQL interface • Scale out for performance • Enables Geo Replication
• Real-time applications • C++/Java APIs • Automatic failover & load balancing
• Data storage (Memory & Disk) • Automatic & User defined data partitioning • Scale out for capacity and performance
• Management, Monitoring & Configuration • Arbitrator for split brain/network partitioning • Cluster logs
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
MySQL Cluster Architecture: Cluster = Network Database, NDB
Clients
Access Layer NDB NDB
2x Node Group = 2x Partition
MySQL Cluster Data Nodes
Data Layer
Management Management
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
MySQL Cluster Architecture: Cluster = Network Database, NDB
Clients
Access Layer NDB NDB
MySQL Cluster Data Nodes
Data Layer
Management Management
Access via SQL!
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
API Flexibility: SQL & NoSQL Combined
• SQL: Complex, relational queries • Memcached: Key-Value web services • Java: Enterprise Apps • NDB API: Real-time services
Mix &
Match
Data Nodes
NDB API
Clients
Native memcached HTTP/REST
JDBC / ODBC
PHP / PERL
Python / Ruby
Access via SQL!
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
• MySQL specific optimizations
• Hybrid web, enterprise applications
• Offload, scale query activity to MySQL read-only slaves
• Real-time access to web-based analytics, reporting
• Migration path from/to MySQL from other databases with minimal downtime
• Also supports MySQL Cluster
Log Based, Real-Time Change Data
Capture
Heterogeneous Source Systems
ODS
EDW
Disaster Recovery, Data Protection
Zero Downtime Migration and Upgrades
Operational Reporting
Real-time BI
Standby (Open & Active)
Reporting Database
OGG
ETL
ETL
Query Offloading
Data Distribution
Oracle Golden Gate
48
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Oracle VM
49
VM
SAN, iSCSI
Oracle VM Servers
Oracle VM Server Pool
VM VM
E-Delivery
Download from Oracle •Pre-built, pre-configured template •Complete OS, VM and MySQL
Database •Rapid provisioning and cloning
Import to Oracle VM Manager
File
VM
Customize & Save as Golden Images
VM
Save days / weeks in installation and configuration time
Start-Up in Oracle VM Pool
VM 1 VM 2
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Oracle Secure Backup
50
Availability
• Centralized tape backup management
• New Cloud module
– Direct backups to AWS S3 via RMAN
–Offers additional disaster recovery (DR) protections
• MySQL Enterprise Backup – Backups via SBT interface to OSB
– Backups directly to AWS S3 • Support for additional providers coming soon!
Admin Server
SBT Library
RMAN
Media Server Cloud Storage