MySQL for Oracle DBAs

Philipp Michaly Trivadis GmbH Munich

@michaly_philipp

BASEL BERN BRUGG DÜSSELDORF FRANKFURT A.M. FREIBURG I.BR. GENF HAMBURG KOPENHAGEN LAUSANNE MÜNCHEN STUTTGART WIEN ZÜRICH About me

Philipp Michaly . Consultant, Trivadis GmbH, Munich . Since 2010 Oracle DBA . 12 years experience in IT System Engineering . Focus areas - Oracle DB - MySQL

2 11/18/2016 Trivadis DOAG 2016: MySQL for Oracle DBAs Our company.

Trivadis is a market leader in IT consulting, system integration, solution engineering and the provision of IT services focusing on and technologies in Switzerland, Germany, Austria and Denmark. We offer our services in the following strategic business fields:

O P E R A T I O N

Trivadis Services takes over the interacting operation of your IT systems.

3 11/18/2016 Trivadis DOAG 2016: MySQL for Oracle DBAs With over 600 specialists and IT experts in your region.

COPENHAGEN

14 Trivadis branches and more than 600 employees HAMBURG 200 Service Level Agreements Over 4,000 training participants Research and development budget: DÜSSELDORF CHF 5.0 million

FRANKFURT Financially self-supporting and sustainably profitable STUTTGART Experience from more than 1,900 FREIBURG VIENNA MUNICH projects per year at over 800 BRUGG customers BASEL ZURICH BERN GENEVA LAUSANNE

4 11/18/2016 Trivadis DOAG 2016: MySQL for Oracle DBAs Agenda 1. Considerations about ODBMS Gartner market Study Why MySQL

2. Introducing MySQL History of MySQL Forks MySQL Architecture MySQL Basics

3. Oracle vs MySQL Licensing Features and Components

4. Integrating MySQL in an Oracle Environment

5 11/18/2016 Trivadis DOAG 2016: MySQL for Oracle DBAs Considerations about ODBMS – Gartner Study 1/3

“Open-source relational DBMSs have matured significantly and can be used to replace commercial RDBMSs at a considerable TCO saving. Information leaders, DBAs and application development management can now consider them as a standard choice for deploying applications.” The State of Open-Source RDBMSs, 2015 - Gartner

6 11/18/2016 Trivadis DOAG 2016: MySQL for Oracle DBAs Considerations about ODBMS – Gartner Study 2/3

Gartner Strategic assumptions for 2018:

• More than 70% of new in-house applications will be developed on an OSDBMS

• 50% of existing commercial RDBMS instances will have been converted or will be in process

7 11/18/2016 Trivadis DOAG 2016: MySQL for Oracle DBAs Considerations about ODBMS – Gartner Study 3/3

Significant maturity Progress for OSDBMS in the past years:

2009 2015

8 11/18/2016 Trivadis DOAG 2016: MySQL for Oracle DBAs Considerations about ODBMS – Maturity 2009

9 11/18/2016 Trivadis DOAG 2016: MySQL for Oracle DBAs Considerations about ODBMS – Maturity 2015

10 11/18/2016 Trivadis DOAG 2016: MySQL for Oracle DBAs Considerations about ODBMS – Gartner Study 3/3

Significant maturity Progress for OSDBMS in the past years:

2009 2015

11 11/18/2016 Trivadis DOAG 2016: MySQL for Oracle DBAs Agenda 1. Considerations about ODBMS Gartner market Study Why MySQL

2. Introducing MySQL History of MySQL Forks MySQL Architecture MySQL Basics

3. Oracle vs MySQL Licensing Features and Components

4. Integrating MySQL in an Oracle Environment

12 11/18/2016 Trivadis DOAG 2016: MySQL for Oracle DBAs Considerations about ODBMS – Why MySQL

• MySQL Enterprise Edition

• Large set of extra enterprise features

• Technical Maturity

• Very attractive pricing

• Oracle support 24/7

• Customer relationship to oracle can stay intact

• Best choice if no opensource community contribution wanted

• Transparent and reliable release cycles

13 11/18/2016 Trivadis DOAG 2016: MySQL for Oracle DBAs Agenda 1. Considerations about ODBMS Gartner market Study Why MySQL

2. Introducing MySQL History of MySQL Forks MySQL Architecture MySQL Basics

3. Oracle vs MySQL Licensing Features and Components

4. Integrating MySQL in an Oracle Environment

14 11/18/2016 Trivadis DOAG 2016: MySQL for Oracle DBAs Introducing MySQL – History of MySQL 1/4

1994 • MySQL project started by Michael Widenius (Monty), David Axmark and Allan Larsson • For the first 6 years commercially represented by TCX, predecessor of MySQL AB

1997 • Official MySQL 3.1 release • Releases as binary distribution for Linux and Solaris • Based on „matured“ internal kernel from 23th Mai 1995 • Focus on performance and large tables • Stability was not the primary target 

15 11/18/2016 Trivadis DOAG 2016: MySQL for Oracle DBAs Introducing MySQL – History of MySQL 2/4

2000 • MySQL goes Open Source and releases software under a dual license in the terms of the GPL • Foundation and transition to MySQL AB • Revenues dropped 80% as a result, and it took a year to make up for it. • Release of MySQL 3.23 • Introducing InnoDB and Replication

2003 • MySQL 4.0 released

2004 • MySQL 4.1 released

16 11/18/2016 Trivadis DOAG 2016: MySQL for Oracle DBAs Introducing MySQL – History of MySQL 3/4

2005 • MySQL 5.0 released • Introducing • Views, Triggers, Stored Procedures, User defined Functions • Now supporting all SQL3-Standard Objects • Oracle buys Innobase, the 4-person Finnish company behind MySQL's InnoDB storage backend.

2006 • Oracle tries to buy MySQL and fails • Buys Sleepycat instead • MySQL is estimated to have a 33% market share measured in install base and 0.2% market share measured in revenue (the database market was a $15 billion market in 2006).

17 11/18/2016 Trivadis DOAG 2016: MySQL for Oracle DBAs Introducing MySQL – History of MySQL 4/4

2008 • MySQL 5.1 released, Features Partitioning • acquires MySQL AB for approximately $1 billion. • Michael Widenius (Monty) and David Axmark, two of MySQL AB's co-founders, leave Sun shortly after the acquisition.

2009 • Oracle acquires Sun Microsystems for approximately 7.4 Billion

2010 • MySQL 5.5 released • InnoDB now default storage engine • Performance Schema introduced

18 11/18/2016 Trivadis DOAG 2016: MySQL for Oracle DBAs Introducing MySQL – The Present

2012 • MySQL 5.6 released • Replication improvements (Multithreaded slaves, Crash-Safe slaves)

2015 – today • MySQL 5.7 released • Security enhancements „secure by default“ • Significant optimizer improvements

19 11/18/2016 Trivadis DOAG 2016: MySQL for Oracle DBAs Agenda 1. Considerations about ODBMS Gartner market Study Why MySQL

2. Introducing MySQL History of MySQL Forks MySQL Architecture MySQL Basics

3. Oracle vs MySQL Licensing Features and Components

4. Integrating MySQL in an Oracle Environment Sub-chapter

20 11/18/2016 Trivadis DOAG 2016: MySQL for Oracle DBAs Introducing MySQL – Forks

Maria DB

• Forked after Oracles aquistion of Sun • More popular in opensource community • Big Players migrating from MySQL to MariaDB

Percona Sever

• Focus on Performance improvements • Own administration toolkit • Storage engine XtraDB

21 11/18/2016 Trivadis DOAG 2016: MySQL for Oracle DBAs Agenda 1. Considerations about ODBMS Gartner market Study Why MySQL

2. Introducing MySQL History of MySQL Forks MySQL Architecture MySQL Basics

3. Oracle vs MySQL Licensing Features and Components

4. Integrating MySQL in an Oracle Environment Sub-chapter

22 11/18/2016 Trivadis DOAG 2016: MySQL for Oracle DBAs Introducing MySQL – MySQL Architecture DB-Applikation Client MySQL Connection/Thread Manager NoSQL Plugin MySQL Layer 1 StorageSQL- Engines MySQL- DB-Applikation Client Statement Konnektor Server MySQL Layer 1 SQL- MySQLTransaktionsmanagement- AbfrageverarbeitungStatement Konnektor Plugin 1 Recovery ManagementMySQL NoSQL Plugin Connection/Thread Manager Server Parser Query Cache MySQL Query Cache Abfrageverarbeitung Referentielle IntegritätPlugin 1 Layer 2 Buffer Plugin 2 Parser Query Cache MySQL Query Cache MySQL Layer 3Layer 2 IndexBuffer & SpeicherstrukturPlugin 2

Security Security Execution Execution Plugin 3 OptimizerOptimizer Plugin 3 Manager Manager SpeicherverwaltungEngine Engine . . . Buffer cache . Storage-Engines . Manager Weitere

Transaktionsmanagement Plugins .

.. .. Memory Fremdhersteller InnoDB MyISAM Recovery Management Weitere Referentielle Integrität Plugins MySQL Layer 3 Index & Speicherstruktur

Speicherverwaltung

Buffer cache

Manager

InnoDB .. Fremdhersteller MyISAM Memory

Datafiles Redo,Undo,Logs... Hauptspeicher

23 11/18/2016 Trivadis DOAG 2016: MySQLDatafiles for Oracle DBAsRedo,Undo ,Logs... Hauptspeicher Agenda 1. Considerations about ODBMS Gartner market Study Why MySQL

2. Introducing MySQL History of MySQL Forks MySQL Architecture MySQL Basics

3. Oracle vs MySQL Licensing Features and Components

4. Integrating MySQL in an Oracle Environment

24 11/18/2016 Trivadis DOAG 2016: MySQL for Oracle DBAs MySQL Basics – Installing MySQL 1/3

3 possible ways to install MySQL:

1. Package Manager installation (apt, yum, yast,dpkg,rpm…)

yum install -commercial-server.x86_64

Pros: • Simplicity of maintenance • Comfortable Patch/Upgrade/Removal maintenance

Cons: • Hard coded default locations • Sensitive repository maintenance

25 11/18/2016 Trivadis DOAG 2016: MySQL for Oracle DBAs MySQL Basics – Installing MySQL 2/3

2. Pre-built binaries (binary tarballs) tar –xzfbv Archive.tar.gz

Pros: • High flexibility • Easier upgrade/downgrade management • Custom locations

Cons: • Manage dependency issues manually • A bit more manual work

26 11/18/2016 Trivadis DOAG 2016: MySQL for Oracle DBAs MySQL Basics – Installing MySQL 3/3

3. Custom built binaries (Compile your own) cmake --build .

Pros: • Maximum freedom to modify mysql

Cons: • Requires engineering effort • Release/Patch Maintenance is enormous

27 11/18/2016 Trivadis DOAG 2016: MySQL for Oracle DBAs MySQL Basics – Controlling MySQL with systemd

Control MySQL Instance with Systemd:

• Status

• Start/Stop

• Restart

28 11/18/2016 Trivadis DOAG 2016: MySQL for Oracle DBAs MySQL Basics – Controlling MySQL with systemd

systemctl status s1

s1.service - MySQL Server - Instance S1 Loaded: loaded (/usr/lib/systemd/system/s1.service; enabled; vendor preset: disabled) Active: active (running) since Tue 2016-09-06 20:44:57 CEST; 1h 59min ago Main PID: 25359 (mysqld) CGroup: /system.slice/s1.service /u00/app/mysql/product/5.7.14/bin/mysqld --defaults- file=/u00/app/mysql/etc/s1.my.cnf –daemonize ......

29 11/18/2016 Trivadis DOAG 2016: MySQL for Oracle DBAs Agenda 1. Considerations about ODBMS Gartner market Study Why MySQL

2. Introducing MySQL History of MySQL Forks MySQL Architecture MySQL Basics

3. Oracle vs MySQL Licensing Features and Components

4. Integrating MySQL in an Oracle Environment

30 11/18/2016 Trivadis DOAG 2016: MySQL for Oracle DBAs Oracle vs. MySQL

VS

31 11/18/2016 Trivadis DOAG 2016: MySQL for Oracle DBAs Licensing

Server Setup: X86, 2 Sockets, each CPU 6 cores

Number of Yearly per License per Yearly Total Three Year License Metric License Fee sockets/cores Metric Server Support Cost Oracle Database 2 per socket $17,500 $3,850 $35,000 $7,700 $58,100 Standard Edition 2 Oracle Database 12 0.5 per core $47,500 $10,450 $285,000 $62,700 $473,100 Enterprise Edition MySQL Enterprise n/a Server n/a $5,000 n/a $5,000 $15,000 Edition

32 11/18/2016 Trivadis DOAG 2016: MySQL for Oracle DBAs Agenda 1. Considerations about ODBMS Gartner market Study Why MySQL

2. Introducing MySQL History of MySQL Forks MySQL Architecture MySQL Basics

3. Oracle vs MySQL Licensing Features and Components

4. Integrating MySQL in an Oracle Environment Example of Customer Project

33 11/18/2016 Trivadis DOAG 2016: MySQL for Oracle DBAs Features and Components – Schema Concept 1/3

MySQL: Schema/Database

• Schema is a Synonym for Database

• Database is a container for objects

• Database is user independent

34 11/18/2016 Trivadis DOAG 2016: MySQL for Oracle DBAs Features and Components – Schema Concept 2/3

• mysql> show databases; • +------+ • | Database | • +------+ • | information_schema | • | mysql | • | performance_schema | • | s1 | • | sakila | • | sys | • | test | • | world_x | • +------+

35 11/18/2016 Trivadis DOAG 2016: MySQL for Oracle DBAs Features and Components – Schema Concept 3/3

• mysql> use test; • Database changed • mysql> show tables; • +------+ • | Tables_in_test | • +------+ • | badges | • | comments | • | post_history | • | post_links | • | posts | • | tags | • | users | • | votes | • +------+

36 11/18/2016 Trivadis DOAG 2016: MySQL for Oracle DBAs Features and Components – User Concept 1/2

MySQL: User

• Similiar meaning to oracle

• But: Can not own objects

• No role concept

• User is associated with hostname

37 11/18/2016 Trivadis DOAG 2016: MySQL for Oracle DBAs Features and Components – User Concept 2/2

mysql> select user,host from mysql.user; +------+------+ | user | host | +------+------+ | root | % | | s1_repl | localhost | | s1_repl | server1.com | | mysql.sys | localhost | | root | localhost | +------+------+

38 11/18/2016 Trivadis DOAG 2016: MySQL for Oracle DBAs Features and Components - Configuration File

MySQL: Configuration File

• No binary equivalent (spfile)

• System variables equivalent to Oracle Parameters

• No scope option – variables have to be set manually

39 11/18/2016 Trivadis DOAG 2016: MySQL for Oracle DBAs Features and Components - Tablespaces 3 Types of tablespaces:

1. InnoDB System Tablespace: • All database objects stored in one tablespace

2. File-Per-Table Tablespaces • Default • Each table and index stored in individual tablespace • The only Tablespace type that allows encryption

3. InnoDB general Tablespace: • Allows to consolidate Schema Objects into on Tablespace • No „default tablespace“ option for schema available • Consumes less memory than File-Per-Table Tablespaces

40 11/18/2016 Trivadis DOAG 2016: MySQL for Oracle DBAs Features and Components - HA Architectures Active/Passive Failover Cluster:

• Oracle: Clusterware • MySQL: MySQL Replication, Clusterware

Master/Slave Replication:

• Oracle: Dataguard • MySQL: Synchronous, Semi-Synchronous Replication, Synchronous Replication (MySQL Cluster)

Active/Active Cluster:

• Oracle: Real Application Cluster • MySQL: MySQL Cluster: Multi Master Replication and Active/Active Cluster

41 11/18/2016 Trivadis DOAG 2016: MySQL for Oracle DBAs Features and Components - Asynchronous vs. Synchronous Replication

Asynchronous Semi-Synchronous Synchronous MySQL Default Since MySQL 5.5+ - Only available with Parallel: Master acks Enhanced in MySQL 5.7 MySQL Cluster to app and sends Serially: Master waits for Serially: Master transaction to slave change to be received by waits for change to • Fast slave then In parallel ack be applied on all • Risk of lost changes if to app and apply changes slaves before ack to master dies on slave app • Intermediate latency • Higher latency • Lossless (MySQL 5.7) • Lossless

42 11/18/2016 Trivadis DOAG 2016: MySQL for Oracle DBAs Features and Components - Process vs Threads 1/3

MySQL: Thread Architecture

Oracle: Typically uses processes (Threaded mode possible since 12c)

Show MySQL Process: ps -ef | grep mysqld UID PID PPID CMD mysql 62779 1 /…bin/mysqld --defaults-file =/u00/app/mysql/etc/s1.my.cnf --daemonize

Wait! There‘s got to be more? Check for threads:

43 11/18/2016 Trivadis DOAG 2016: MySQL for Oracle DBAs Features and Components - Process vs Threads 2/3 Show threads: ps –eLF | grep mysqld UID PID LWP (“thread_os_id”) CMD mysql 62779 62779 /u00/app/mysql/product/5.7.14/bin/mysqld --defaults-file=/u00/app/mysql/etc/s1.my.cnf --daemonize mysql 62779 62780 /u00/app/mysql/product/5.7.14/bin/mysqld --defaults-file=/u00/app/mysql/etc/s1.my.cnf --daemonize mysql 62779 62781 /u00/app/mysql/product/5.7.14/bin/mysqld --defaults-file=/u00/app/mysql/etc/s1.my.cnf --daemonize mysql 62779 62782 /u00/app/mysql/product/5.7.14/bin/mysqld --defaults-file=/u00/app/mysql/etc/s1.my.cnf --daemonize mysql 62779 62783 /u00/app/mysql/product/5.7.14/bin/mysqld --defaults-file=/u00/app/mysql/etc/s1.my.cnf --daemonize mysql 62779 62784 /u00/app/mysql/product/5.7.14/bin/mysqld --defaults-file=/u00/app/mysql/etc/s1.my.cnf --daemonize mysql 62779 62785 /u00/app/mysql/product/5.7.14/bin/mysqld --defaults-file=/u00/app/mysql/etc/s1.my.cnf --daemonize mysql 62779 62786 /u00/app/mysql/product/5.7.14/bin/mysqld --defaults-file=/u00/app/mysql/etc/s1.my.cnf --daemonize mysql 62779 62787 /u00/app/mysql/product/5.7.14/bin/mysqld --defaults-file=/u00/app/mysql/etc/s1.my.cnf --daemonize mysql 62779 62788 /u00/app/mysql/product/5.7.14/bin/mysqld --defaults-file=/u00/app/mysql/etc/s1.my.cnf --daemonize mysql 62779 62789 /u00/app/mysql/product/5.7.14/bin/mysqld --defaults-file=/u00/app/mysql/etc/s1.my.cnf --daemonize mysql 62779 62790 /u00/app/mysql/product/5.7.14/bin/mysqld --defaults-file=/u00/app/mysql/etc/s1.my.cnf --daemonize mysql 62779 62791 /u00/app/mysql/product/5.7.14/bin/mysqld --defaults-file=/u00/app/mysql/etc/s1.my.cnf --daemonize mysql 62779 62792 /u00/app/mysql/product/5.7.14/bin/mysqld --defaults-file=/u00/app/mysql/etc/s1.my.cnf --daemonize mysql 62779 63939 /u00/app/mysql/product/5.7.14/bin/mysqld --defaults-file=/u00/app/mysql/etc/s1.my.cnf --daemonize mysql 62779 63940 /u00/app/mysql/product/5.7.14/bin/mysqld --defaults-file=/u00/app/mysql/etc/s1.my.cnf --daemonize mysql 62779 63941 /u00/app/mysql/product/5.7.14/bin/mysqld --defaults-file=/u00/app/mysql/etc/s1.my.cnf --daemonize mysql 62779 63942 /u00/app/mysql/product/5.7.14/bin/mysqld --defaults-file=/u00/app/mysql/etc/s1.my.cnf --daemonize mysql 62779 63943 /u00/app/mysql/product/5.7.14/bin/mysqld --defaults-file=/u00/app/mysql/etc/s1.my.cnf --daemonize mysql 62779 63944 /u00/app/mysql/product/5.7.14/bin/mysqld --defaults-file=/u00/app/mysql/etc/s1.my.cnf --daemonize mysql 62779 63945 /u00/app/mysql/product/5.7.14/bin/mysqld --defaults-file=/u00/app/mysql/etc/s1.my.cnf --daemonize mysql 62779 63946 /u00/app/mysql/product/5.7.14/bin/mysqld --defaults-file=/u00/app/mysql/etc/s1.my.cnf --daemonize mysql 62779 63947 /u00/app/mysql/product/5.7.14/bin/mysqld --defaults-file=/u00/app/mysql/etc/s1.my.cnf --daemonize mysql 62779 63948 /u00/app/mysql/product/5.7.14/bin/mysqld --defaults-file=/u00/app/mysql/etc/s1.my.cnf --daemonize mysql 62779 63949 /u00/app/mysql/product/5.7.14/bin/mysqld --defaults-file=/u00/app/mysql/etc/s1.my.cnf --daemonize mysql 62779 63950 /u00/app/mysql/product/5.7.14/bin/mysqld --defaults-file=/u00/app/mysql/etc/s1.my.cnf –daemonize

44 11/18/2016 Trivadis DOAG 2016: MySQL for Oracle DBAs Features and Components - Process vs Threads 3/3 Identify threads with table „performance_schema.threads” mysql> SELECT thread_id,thread_os_id, name AS 'thread_name', type, processlist_user AS user FROM performance_schema.threads; +------+------+------+------+ | thread_id | thread_os_id | thread_name | type | user | +------+------+------+------+ | 1 | 62779 | thread/sql/main | BACKGROUND | NULL | | 2 | 62780 | thread/sql/thread_timer_notifier | BACKGROUND | NULL | | 3 | 62781 | thread/innodb/io_ibuf_thread | BACKGROUND | NULL | | 4 | 62782 | thread/innodb/io_log_thread | BACKGROUND | NULL | | 5 | 62783 | thread/innodb/io_read_thread [+3] | BACKGROUND | NULL | | 10 | 62788 | thread/innodb/io_write_thread [+2] | BACKGROUND | NULL | | 13 | 62791 | thread/innodb/page_cleaner_thread | BACKGROUND | NULL | | 16 | 63940 | thread/innodb/srv_error_monitor_thread | BACKGROUND | NULL | | 17 | 63942 | thread/innodb/srv_master_thread | BACKGROUND | NULL | | 18 | 63941 | thread/innodb/srv_monitor_thread | BACKGROUND | NULL | | 19 | 63943 | thread/innodb/srv_purge_thread | BACKGROUND | NULL | | 20 | 63944 | thread/innodb/srv_worker_thread [+2] | BACKGROUND | NULL | | 21 | 63939 | thread/innodb/srv_lock_timeout_thread | BACKGROUND | NULL | | 24 | 63948 | thread/innodb/dict_stats_thread | BACKGROUND | NULL | | 25 | 63947 | thread/innodb/buf_dump_thread | BACKGROUND | NULL | | 26 | 63951 | thread/sql/signal_handler | BACKGROUND | NULL | | 27 | 63952 | thread/sql/compress_gtid_table | FOREGROUND | NULL | | 30 | 63953 | thread/sql/one_connection | FOREGROUND | root | | 32 | 3942 | thread/sql/one_connection | FOREGROUND | root | 45 11/18/2016 Trivadis DOAG 2016: MySQL for Oracle DBAs Features and Components - Backup & Recovery

Logical Backup:

• Mysqldump (datapump)

Physical Backup:

• MySQL Enterprise Backup • PITR • Incremental Backup • Mulitple IO Threads • Compression • TDE support • Much more additional Features • See https://www.mysql.de/products/enterprise/backup.html

46 11/18/2016 Trivadis DOAG 2016: MySQL for Oracle DBAs Features and Components - Security 1/2

Enterprise TDE • Data at Rest encyryption • Transparent encryption

Enterprise Security • Encrypt data stored using RSA, DSA, or DH encryption algorithms • Replication encryption: Binlog and redolog

Enterprise Audit • Policy based auditing • Meets several compliance regulations (HIPAA,SoX, PCI DATA Security)

47 11/18/2016 Trivadis DOAG 2016: MySQL for Oracle DBAs Features and Components - Security 2/2

MySQL Enterprise Firewall

• Real-time Threat Monitoring

• Transparent Protection

MySQL Enterprise Authentication

• MySQL External Authentication for PAM

• MySQL External Authentication for Windows

48 11/18/2016 Trivadis DOAG 2016: MySQL for Oracle DBAs Features and Components - Tools

Commandline tools: • Mysqladmin

• MySQL Utilities

Graphical Tools:

• MySQL Workbench

• TOAD for MySQL

• SQL-Developer (with third party jar file)

49 11/18/2016 Trivadis DOAG 2016: MySQL for Oracle DBAs Features and Components - Monitoring 1/4

MySQL Enterprise Monitoring: MEM

• Real-time Health & Availability Monitoring

• Real-time Performance Monitoring

• Visual Query Analysis

• InnoDB Monitoring

• Replication Monitoring

• Much more… • See https://www.mysql.com/products/enterprise/monitor-features.html

50 11/18/2016 Trivadis DOAG 2016: MySQL for Oracle DBAs Features and Components - Monitoring 2/4

Other plugins

• Cloud Control Plugin

51 11/18/2016 Trivadis DOAG 2016: MySQL for Oracle DBAs Features and Components – Monitoring 3/4

52 11/18/2016 Trivadis DOAG 2016: MySQL for Oracle DBAs Features and Components - Monitoring 4/4

Other plugins

• Cloud Control Plugin

• Variety of Nagios plugins

53 11/18/2016 Trivadis DOAG 2016: MySQL for Oracle DBAs Agenda 1. Considerations about ODBMS Gartner market Study Why MySQL

2. Introducing MySQL History of MySQL Forks MySQL Architecture MySQL Basics

3. Oracle vs MySQL Licensing Features and Components

4. Integrating MySQL in an Oracle Environment

54 11/18/2016 Trivadis DOAG 2016: MySQL for Oracle DBAs Integrating MySQL in an Oracle Environment

Best practice outputs:

• 3 Architecture Variants

• Several Configuration Alignments

55 11/18/2016 Trivadis DOAG 2016: MySQL for Oracle DBAs Single Instance Architecture

Connectors Native C API, JDBC, ODBC... R/W

VM 1 VM 2

Prod_DB 1

Test_DB1

Dev_DB1

56 11/18/2016 Trivadis DOAG 2016: MySQL for Oracle DBAs HA Architecture - Performance

Connectors Native C API, JDBC, ODBC... R/W RO

VM 1 Asynch. Replication VM 2 Master_Prod_DB 1 Slave_Prod_DB1

Test_DB1

Dev_DB1

57 11/18/2016 Trivadis DOAG 2016: MySQL for Oracle DBAs HA Architecture – Maximum Safety

Connectors Native C API, JDBC, ODBC... R/W RO

VM 1 Semi Synch. VM 2 Master_Prod_DB 1 Replication Slave_Prod_DB1

Test_DB1

Dev_DB1

58 11/18/2016 Trivadis DOAG 2016: MySQL for Oracle DBAs Mysql Best Practices 1/2

• Use OFA Filsystem Layout: MySQL Basedir: /u00/app/mysql/… MySQL Datadir: /u01/mysqldata/Instance_Name Redo+BIN-LOG dir:/u02/binlog/Instance_Name

• Default Port Range Limited: 3306 -3312

• Recommended Port: 33001-330xx

• Installation type: Tarball and manual initialization: bin/mysqld --initialize --user=mysql -- basedir=/u00/app/mysql -- datadir=/u01/mysqldata/$dbname

59 11/18/2016 Trivadis DOAG 2016: MySQL for Oracle DBAs Mysql Best Practices 2/2

• Enable Large Pages • HugePages=(InnoDB Buffer size MB + 8MB) / 2

• Use „Socket Peer-Credential Authentication Plugin” • Allows password free login in personalized user environments

60 11/18/2016 Trivadis DOAG 2016: MySQL for Oracle DBAs Any questions…? Philipp Michaly

[email protected]

61 11/18/2016 Trivadis DOAG 2016: MySQL for Oracle DBAs Trivadis @ DOAG 2016

Booth: 3rd Floor – next to the escalator Know how, T-Shirts, Contest and more We look forward to your visit Because with Trivadis you always win !

62 11/18/2016 Trivadis DOAG 2016: MySQL for Oracle DBAs