SlideShare una empresa de Scribd logo
1 de 54
Descargar para leer sin conexión
1/54
Administering MySQL for
Oracle DBAs

Eng. Nelson Calero, OCP
UYOUG


                          2/54
Administering MySQL for Oracle DBAs


About me:


     http://www.linkedin.com/in/ncalero
     Working with Oracle tools and Linux environments since 1996
     DBA Oracle (since 2001) & MySQL (since 2005)
     Oracle University Instructor since 2011
     Co-founder and President of the Oracle user Group of Uruguay
     (UYOUG) since 2009
     Computer Engineer. OCP DBA 10g


                                                                    3/54
Uruguay




          4/54
AGENDA




1 – Brief Intro to main MySQL architectural components
2 – Comparison Oracle vs MySQL
3 – Installation and Upgrades
4 – Security & auditing
5 – Performance management
6 – Backup & Recovery
7 – Designing for High Availability


                                                         5/54
1 - Introduction to the
                           MySQL architecture




http://dev.mysql.com/doc/refman/5.5/en/pluggable-storage-overview.html   6/54
1 - Introduction to the
                                   MySQL architecture


MySQL server
   • comes in a Community and Enterprise Edition
   • has many databases
   • no schemas
   • two OS processes when running: mysqld and mysqld_safe
   • listen on port tcp/ip 3306 by default
         • local connections use sockets (similar to beq in Oracle)
   • creates one thread per each client connection
         • thread pool is a commercial feature of 5.5.16 (Oracle shared server)
   • cost based optimizer
   • replication is not transactional
   • cluster is another product, with shared nothing architecture

                                                                                  7/54
1 - Introduction to the
                                   MySQL architecture


binaries
    • installed in /usr/bin if using RPM installation on most *nix
    • if using binary distribution (.tar), can be placed in custom directories
             • Is the way of having different versions on same server

No OFA or similar.

Startup script (/etc/init.d/mysql) has some defaults, changed by configuration
file (/etc/my.cnf)
          datadir: /var/lib/mysql
          bindir: /usr/bin

                                                                                 8/54
1 - Introduction to the
                                 MySQL architecture


Internal components

   •memory caches
    { query | innodb buffer | innodb log | myisam key | user | dictionary } cache

   • InnoDB undo log - rollback segments
       •splitted as insert undo and update undo buffer
       •part of the system tablespace by default
       •since MySQL 5.6 can be moved: innodb_undo_tablespaces



                                                                              9/54
1 - MySQL architecture
                                 Internal components


Storage engines:
 pluggable architecture that enables different algorithms for handling data.

   InnoDB – Transactional. Default from 5.5
   MyISAM – non transactional. Default before 5.5
   Memory – stored only in memory, not persisted to disk
   NDB – used by the Cluster
   Archive/Blackhole/Merge/Federated - other specific use engines

Many third parties implementations
  XtraDB – from Percona. InnoDB improved

                                                                               10/54
1 - MySQL architecture
                                     Internal components


Storage engine files

    • table.frm – table definition, regardless of storage engine used ($datadir/dbname)
    • InnoDB logs – transactional log, used for crash recovery (ib_logfile1)
        • 2 by default. Circular rotation. No archiving
    • InnoDB system tablespace – ibdata1
        • Stores all data and metadata by default
        • Can be changed to external tablespaces: innodb_file_per_table in my.cnf
             • Stores each table data in one file named table.ibd
    • other tablespaces – used by NDB similarly as Oracle.

                                                                                    11/54
1 - MySQL architecture
                                    Internal components


Binary logs

    • All changes done on the server (called events), in the order they were executed.
    • Can be inspected easily with the command mysqlbinlog
    • Configurable format: Statement, Row or Mixed
    • Needed for replication and point in time recovery
    • Have a purge (EXPIRE_LOGS_DAYS) and rotation (MAX_BINLOG_SIZE) policy




                                                                                   12/54
1 - MySQL architecture
                                         Datatypes


More data types, more design choices:
   • 9 numeric. Oracle only has one
        • INT is 4 bytes, TINYINT 1 byte
        • UNSIGNED: double possible values for autoincrements

   •DATE (3 bytes), DATETIME (8 bytes) and TIMESTAMP (4 bytes)

Choosing a data type has more impact on the space used
   • int(N) – similar to Oracle, does not affect bytes used to store




                                                                       13/54
1 - MySQL architecture
                                      Internal components

Data dictionary
    • information_schema: metadata about objects
    • performance_schema: (5.5.3) dynamic metrics about server usage (as v$ views)

        mysql> SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES
            -> WHERE TABLE_SCHEMA = 'performance_schema';
        +----------------------------------------------+
        | TABLE_NAME                                   |
        +----------------------------------------------+
        | cond_instances                               |
        | events_waits_current                         |
        | events_waits_history                         |
        | events_waits_history_long                    |
        | events_waits_summary_by_instance             |
        | events_waits_summary_by_thread_by_event_name |
        | events_waits_summary_global_by_event_name    |
        ...


                                                                               14/54
1 - Introduction to the
                                     MySQL architecture
Server variables
    •Similar to Oracle initialization parameters, change functionality
    •Some can be changed dynamically
    •Can be persistent changed with startup options or parameter file
    •Global/session scope. Global do not affect session who changed it.

mysql root@localhost.information_schema>show variables like 'query%' limit 4;
+------------------------------+---------+
| Variable_name                | Value   |
+------------------------------+---------+
| query_alloc_block_size       | 8192    |
| query_cache_limit            | 1048576 |
| query_cache_min_res_unit     | 4096    |
| query_cache_size             | 0       |
+------------------------------+---------+
                                                                                15/54
1 - Introduction to the
                                   MySQL architecture

Status variables

    •Dynamic counters about server activity

     mysql root@localhost.information_schema>show status like 'qc%';
     +-------------------------+-------+
     | Variable_name           | Value |
     +-------------------------+-------+
     | Qcache_free_blocks      | 0     |
     | Qcache_free_memory      | 0     |
     | Qcache_hits             | 0     |
     | Qcache_inserts          | 0     |
     | Qcache_lowmem_prunes    | 0     |
     | Qcache_not_cached       | 0     |
     | Qcache_queries_in_cache | 0     |
     +-------------------------+-------+


                                                                       16/54
1 - MySQL architecture
                                        Log Files

Slow query log: can be enabled to record log running queries
       long_query_time=N (0 to 10)

General log: can be enabled to record all server activity.
       general_log = 'ON'

Error log: start, stop and error messages.
         file hostname.err by default
         can be changed with log_error=file.log in my.cnf




                                                               17/54
1 - MySQL architecture
                                      Security

Uses standard GRANT/REVOKE commands

Privileges per host/user/database/table/column
     grant select on employees.* to you@'desktop' identified by pwd;

Data stored on mysql database: user/db/*_priv tables




                                                                       18/54
1 - MySQL architecture
                               Locking and transactions

Lock handling: specific of the storage engine
   InnoDB – row level
   MyISAM – table level

Transactions?
    • autocommit enabled by default outside transactions
    • default tx_isolation is REPEATABLE-READ
        • READ_COMMITED does not work with binlog mode STATEMENT



                                                               19/54
1 - MySQL architecture
                                 Locking and transactions

What happens if the server crashes?
   • InnoDB has auto recovery (using ib_logfiles)
   • MyISAM does not, need manual intervention (myisamchk, repair table)



Some parameters needs to be adjusted if using InnoDB and replication:
   • InnoDB_flush_log_at_trx_commit
   • sync_binlog
   • innodb_support_xa




                                                                           20/54
AGENDA




1 – Brief Intro to main MySQL architectural components
2 – Comparison Oracle vs MySQL
3 – Installation and Upgrades
4 – Security & auditing
5 – Performance management
6 – Backup & Recovery
7 – Designing for High Availability


                                                         21/54
2 - Comparison with Oracle
                                         architecture

Which database flavor?
    • Standard? Enterprise? Exadata? Big data appliance?
    • There are different implementation decisions in every detail
            • Initially created for different purposes

Focus on Standard Edition, some picks:
    • Processes handling
    • Optimizer features
    • Locking
    • Memory management

Pick one Oracle functionality, look for that in MySQL.



                                                                     22/54
2 - Comparison with Oracle
                                           SQL

Some SQL differences:
   •No need for dual. Select without FROM clause works.
       •Dual exists just for compatibility
   •No sequences. autoincrement clause at column definition
       •last_insert_id() can show the autoincrement value of last insert
   •procedures, but no packages and user defined types
   •multi-record insert
   •insert delayed
   •select into outfile / load data file
   •drop table if exists
   •partial indexes (column(N)) looks like function based index, but they do not exists


                                                                                    23/54
2 - Comparison with Oracle
                                          SQL

Case insensitive char comparison

mysql root@localhost.employees>select * from employees
                               where first_name='JAANA' limit 3;
+--------+------------+------------+-----------------+--------+------------+
| emp_no | birth_date | first_name | last_name       | gender | hire_date |
+--------+------------+------------+-----------------+--------+------------+
| 52681 | 1956-03-28 | Jaana       | Besselaar       | M      | 1986-09-26 |
| 53990 | 1960-05-26 | Jaana       | Cunliffe        | M      | 1995-07-09 |
| 54450 | 1954-02-24 | Jaana       | Ranon           | F      | 1988-08-23 |
+--------+------------+------------+-----------------+--------+------------+
8 rows in set (0.01 sec)




                                                                               24/54
2 - Comparison with Oracle
                                          SQL
Silent conversions
mysql root@localhost.employees>create table pru (name varchar(10));
Query OK, 0 rows affected (0.19 sec)

mysql root@localhost.employees>insert into pru values ('Jhon'),('Lindenbaumgreen');
Query OK, 2 rows affected, 1 warning (0.16 sec)
Records: 2 Duplicates: 0 Warnings: 1

mysql root@localhost.employees>show warnings;
+---------+------+-------------------------------------------+
| Level   | Code | Message                                   |
+---------+------+-------------------------------------------+
| Warning | 1265 | Data truncated for column 'name' at row 2 |
+---------+------+-------------------------------------------+
1 row in set (0.00 sec)



                                                                               25/54
2 - Comparison with Oracle
                                         SQL
        mysql root@localhost.employees>select * from pru;
        +------------+
        | name       |
        +------------+
        | Jhon       |
        | Lindenbaum |
        +------------+
        2 rows in set (0.00 sec)

with SQL_MODE this can be changed:

         Mysql> set SQL_MODE=strict_all_tables;
         Query OK, 0 rows affected (0.00 sec)

         Mysql> insert into pru values ('Jhon'),('Lindenbaumgreen');
          ERROR 1406 (22001): Data too long for column 'name' at row 2

NOTE: this works because SET uses SESSION scope by default

                                                                         26/54
2 - Comparison with Oracle
                                          SQL
Many other behaviors can be changed to something Oracle-like:

    • SQL_MODE=ORACLE
           Equivalent to PIPES_AS_CONCAT, ANSI_QUOTES, IGNORE_SPACE, NO_KEY_OPTIONS,
                    NO_TABLE_OPTIONS, NO_FIELD_OPTIONS, NO_AUTO_CREATE_USER.

    • SQL_MODE=TRADITIONAL
           Equivalent to STRICT_TRANS_TABLES, STRICT_ALL_TABLES, NO_ZERO_IN_DATE,
                    NO_ZERO_DATE, ERROR_FOR_DIVISION_BY_ZERO, NO_AUTO_CREATE_USER,
                    and NO_ENGINE_SUBSTITUTION.

    • Warning: changing SQL_MODE can hurt tools that expect classic behavior

    • Great reference for going deeper on this:
              "MySQL Idiosyncrasies that BITE" by Ronald Bradford.

                                                                                  27/54
MySQL Tools

Console
          – mysql
          – mysqladmin
          – mysqldump
          – InnoDB Hot Backup: licensed

          – Third parties
                   Percona Toolkit (former maatkit): many useful script utilities
                   OpenArk: more
                   Percona XtraBackup: OpenSource non locking transactional backup

          – http://forge.mysql.com/tools/



                                                                                28/54
MySQL Tools

GUI tools

   • MySQL Workbench
       • Data modeling, SQL development, database management, forward and
       reverse engineering, change management.
       • Merge and improvement of old tools from MySQL AB.
       • Community edition under GPL


   • MySQL Enterprise Monitor
       • Real time alerting and monitoring solution
       • With support contract


                                                                            29/54
AGENDA




1 – Brief Intro to main MySQL architectural components
2 – Comparison Oracle vs MySQL
3 – Installation and Upgrades
4 – Security & auditing
5 – Performance management
6 – Backup & Recovery
7 – Designing for High Availability


                                                         30/54
3 - Installation and Upgrade



• Fresh install:
     rpm -Ivh mysql-server

• Customization?
    •defaults are for a single installation, single instance per server.
          /var/lib/mysql
          /etc/my.cnf
          /var/log/mysql/mysqld.log
          ...
• We can create and use our own custom deploy, just to not miss OFA:
       /u01?
       /u02/mysql/data

                                                                           31/54
3 - Installation


Default installation
    •no root user password. Should be used mysql_secure_installation

Autocommit is enabled. If we want to change it:
     mysql root@localhost.employees>set autocommit=off;
     Query OK, 0 rows affected (0.00 sec)

     mysql root@localhost.employees>show variables like '%autocommit%';
     +---------------+-------+
     | Variable_name | Value |
     +---------------+-------+
     | autocommit    | OFF   |
     +---------------+-------+
     1 row in set (0.00 sec)


                                                                       32/54
3 - Installation
Do not forget about GLOBAL/SESSION variables:
   mysql root@localhost.employees>show global variables like 'autocommit%';
   +---------------+-------+
   | Variable_name | Value |
   +---------------+-------+
   | autocommit    | ON    |
   +---------------+-------+
   1 row in set (0.01 sec)

   mysql root@localhost.employees>set global autocommit=off;
   Query OK, 0 rows affected (0.00 sec)

   mysql root@localhost.employees>show global variables like 'autocommit%';
   +---------------+-------+
   | Variable_name | Value |
   +---------------+-------+
   | autocommit    | OFF   |
   +---------------+-------+
   1 row in set (0.00 sec)
                                                                              33/54
3 - Installation

Also, variables are not persistent when changed with SET:

     oraculo:/var/lib/mysql # service mysql restart
     Restarting service MySQL
     Shutting down service MySQL                                            done
     Starting service MySQL                                                 done

     mysql root@localhost.(none)>show global variables like '%autocommit%';
     +---------------+-------+
     | Variable_name | Value |
     +---------------+-------+
     | autocommit    | ON    |
     +---------------+-------+
     1 row in set (0.00 sec)

        => It needs to be changed through startup options, in my.cnf file

                                                                                   34/54
3 - Upgrade


Just run rpm -Uvh?

    • First on development environments


    • Review changes in the new version, looking for:
        • new reserved words that could be in use by our existing tables
        • parameters in use deprecated/renamed
        • data conversion needed for some of our columns?
        • known issues



                                                                           35/54
3 - Upgrade

               Effect of upgrading binaries with RPM -Uvh (minor version)
oraculo:~ # service mysql start
Will update MySQL now, if you encounter any problems, please read following file:
        /usr/share/doc/packages/mysql-community-server/README.SuSE
Log files inconsistency, please merge following files manually:
        /var/log/mysql/mysqld.log
        /var/lib/mysql/mysqld.log
Running protected MySQL...
Upgrading MySQL...
Looking for 'mysql' as: /usr/bin/mysql
Looking for 'mysqlcheck' as: /usr/bin/mysqlcheck
Running 'mysqlcheck' with connection arguments: '--port=3306' '--socket=/var/run/my
Running 'mysqlcheck' with connection arguments: '--port=3306' '--socket=/var/run/my
SUELDOS.PARAMETROS_REPORTES                        OK
...
Running 'mysql_fix_privilege_tables'...
OK
Starting service MySQL                                           done


                                                                                      36/54
3 - Upgrade


Version after the upgrade:

         oraculo:~ # mysql --version
         mysql Ver 14.14 Distrib 5.5.21, for Linux (x86_64) using readline 6.1


Worked without issues during last versions (on OpenSUSE 11.4)

         5.5.18-73.1
         5.5.18-74.1
         5.5.20-75.1
         5.5.20-78
         5.5.20-80.1
         5.5.21-81.1



                                                                                 37/54
AGENDA




1 – Brief Intro to main MySQL architectural components
2 – Comparison Oracle vs MySQL
3 – Installation and Upgrades
4 – Security & auditing
5 – Performance management
6 – Backup & Recovery
7 – Designing for High Availability


                                                         38/54
4 - MySQL Security & auditing

• Privilege ALL includes SUPER, which allows to administer the MySQL
server. Follow least needed principle, and also avoid using %:
       GRANT SELECT (col1), INSERT (col1,col2) ON employees.employee TO
                                                         'you'@'desk';
       GRANT select on employees.* to you@'%' identified by pwd;
       GRANT select on *.* to you@'%';
       GRANT ALL on *.* to you@'%';


• Each user/host combination defines a unique user

• Vanilla is not possible to block connections to specific users
• Log analysis to have proper auditing in place?
    • heavily used servers should use replica, TCP or OS mechanisms.
                                                                      39/54
4 - MySQL Security & auditing


Auditing

   • No built in functionality
   • Can be implemented with triggers, sames as with Oracle
   • TIMESTAMP datatype has automatic updating and initialization, no
   triggers needed

      col_name TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP




                                                                                 40/54
AGENDA




1 – Brief Intro to main MySQL architectural components
2 – Comparison Oracle vs MySQL
3 – Installation and Upgrades
4 – Security & auditing
5 – Performance management
6 – Backup & Recovery
7 – Designing for High Availability


                                                         41/54
5 - Performance Management


NOs:
   • way of modify/cheat optimizer statistics as in Oracle
   • historical repository like AWR – Enterprise Monitor with support contract
   • limits on server CPU/IO usages
   • ability to rewrite queries on the fly

Can:
    • configure many internal memory areas and number of client threads
    • use hints to force index usage
    • use external home made solution for query rewrite




                                                                                 42/54
5 - Performance Management

• classical unix tools outside the database
     vmstat / oprofile / strace / top
     gdb – poor man's profiler

• inside database
     • mytop / innotop utilities
     • explain / explain extended
          • before MySQL 5.6.3, subqueries in the FROM clause are executed
     • status variables
          • com_*, innodb_*, connections
     • information_schema
     • show engine status / processlist
     • profiles

                                                                             43/54
5 - Performance Management

mysql >set profiling=1;                                      mysql >show profile for query 1;
Query OK, 0 rows affected (0.00 sec)                         +----------------------+----------+
                                                             | Status               | Duration |
mysql >select count(1) From employees;                       +----------------------+----------+
+----------+                                                 | starting             | 0.000142 |
| count(1) |                                                 | checking permissions | 0.000017 |
+----------+                                                 | Opening tables       | 0.140542 |
|    10000 |                                                 | System lock          | 0.000039 |
+----------+                                                 | init                 | 0.000022 |
1 row in set (0.21 sec)                                      | optimizing           | 0.000008 |
                                                             | statistics           | 0.000011 |
mysql >show profiles;                                        | preparing            | 0.000009 |
+----------+------------+--------------------------------+   | executing            | 0.000005 |
| Query_ID | Duration   | Query                          |   | Sending data         | 0.075795 |
+----------+------------+--------------------------------+   | end                  | 0.000018 |
|        1 | 0.21665250 | select count(1) From employees |   | query end            | 0.000007 |
+----------+------------+--------------------------------+   | closing tables       | 0.000012 |
1 row in set (0.00 sec)                                      | freeing items        | 0.000020 |
                                                             | logging slow query   | 0.000003 |
                                                             | cleaning up          | 0.000005 |


                                                                                            44/54
AGENDA




1 – Brief Intro to main MySQL architectural components
2 – Comparison Oracle vs MySQL
3 – Installation and Upgrades
4 – Security & auditing
5 – Performance management
6 – Backup & Recovery
7 – Designing for High Availability


                                                         45/54
6 - Backup & Recovery


mysqldump – logical backup, engine independent
       full, database or table
       locking based on storage engine used

XtraBackup – open-source hot backup / non-locking tool from Percona

Hotbackup with InnoDB
  hotbackup: mysqldump --single-transaction --master-data
  XtraBackup: innobackupex /data/backups
                 Needs an extra step to prepare prior to use in recovery
                   www.percona.com/doc/percona-xtrabackup/




                                                                           46/54
AGENDA




1 – Brief Intro to main MySQL architectural components
2 – Comparison Oracle vs MySQL
3 – Installation and Upgrades
4 – Security & auditing
5 – Performance management
6 – Backup & Recovery
7 – Designing for High Availability


                                                         47/54
7 - Designing for High Availability

Replication – built in:
    • Transfer and apply binary log from master to slaves.
    • Simple to setup.
    • Flexible to create cascade configurations.
    • Can be partial, filtering by DB, tables, and combined.
    • Asynchronous. Semi-sync in 5.5.
    • Easy to break. Needs periodical consistency checks.
    • No conflict resolution. Needs manual intervention when detected.
    • Not automated failover for HA.
    • Apply single threaded until 5.6.
    • Can be configured as circular, but it needs application level coding to avoid
    inconsistencies.



                                                                                      48/54
7 - Designing for High Availability


MySQL Cluster
   • Different distribution and binaries from MySQL 5.5
   • Shared nothing architecture: Data nodes, SQL nodes and Manager.
   • Data is stored redundant among Data nodes
   • Online operations: backup, upgrade, node provisioning
   • Memory usage tied to data handled and #nodes in the cluster
   • 7.2 recent in production with many improvements

Other solutions
    • SAN/DRBD: Protection from server failures
    • Pacemaker: Cluster resource manager. Automation of HA among servers.
    • Galera: Synchronous replication as server plugin. Community and Enterprise.
    • Tungsten: MultiMaster replication at application level. Community and Enterprise.

                                                                                   49/54
Last remarks


• MySQL addresses the same problems as Oracle Database.
• Do not look for same functionality, but ACID and performance.
    • Some specific task can be easier (example: Partitioning).
• Need to develop custom scripts for admin tasks, using standard OS tools.
• Big community of users.
• Being FOSS software, source code is available. This allows to overcome lack of
specialized tools for specific issues, and depending on your skills you can fix your
own problems, and benefit the community.
• Many improvements by other companies (as Percona and Facebook).



                                                                                 50/54
Questions?




             nelson.calero@gmail.com

                                       51/54
Tip: Better command line prompt

Command line could be tuned similar to sqlplus with glogin script?
         oracle@oraculo:~> sqlplus / as sysdba

         SQL*Plus: Release 11.2.0.2.0 Production on Tue Feb 28 22:09:00 2012
         Copyright (c) 1982, 2011, Oracle. All rights reserved.
         Connected to:
         Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production

         22:09:01 SYS@XE>


         oracle@oraculo:~> tail $ORACLE_HOME/sqlplus/admin/glogin.sql
         set pagesize 200
         set linesize 120
         SET TIME ON TIMING ON
         SET SQLPROMPT '&_user@&_connect_identifier>'

                                                                               52/54
Tip: Better command line prompt
Add PROMPT parameter to /etc/my.cnf
  [mysql]
  no-auto-rehash
  prompt=mysql u@h.d>

  oraculo:~ # mysql
  Welcome to the MySQL monitor. Commands end with ; or g.
  Your MySQL connection id is 7
  Server version: 5.5.21-log Source distribution
  Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
  Oracle is a registered trademark of Oracle Corporation and/or its
  affiliates. Other names may be trademarks of their respective owners.
  Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.

  mysql root@localhost.(none)>use information_schema
  Database changed
  mysql root@localhost.information_schema>


                                                                                   53/54
54/54

Más contenido relacionado

La actualidad más candente

Mydumper - Vinoth kanna @ MySQL meetup Mumbai
Mydumper - Vinoth kanna @ MySQL meetup MumbaiMydumper - Vinoth kanna @ MySQL meetup Mumbai
Mydumper - Vinoth kanna @ MySQL meetup MumbaiKarthik .P.R
 
MySQL :What's New #GIDS16
MySQL :What's New #GIDS16MySQL :What's New #GIDS16
MySQL :What's New #GIDS16Sanjay Manwani
 
MySQL 8.0 achitecture and enhancement
MySQL 8.0 achitecture and enhancementMySQL 8.0 achitecture and enhancement
MySQL 8.0 achitecture and enhancementlalit choudhary
 
MySQL Storage Engines
MySQL Storage EnginesMySQL Storage Engines
MySQL Storage EnginesKarthik .P.R
 
"Advanced MySQL 5 Tuning" by Michael Monty Widenius @ eLiberatica 2007
"Advanced MySQL 5 Tuning" by Michael Monty Widenius @ eLiberatica 2007"Advanced MySQL 5 Tuning" by Michael Monty Widenius @ eLiberatica 2007
"Advanced MySQL 5 Tuning" by Michael Monty Widenius @ eLiberatica 2007eLiberatica
 
MySQL Server Backup, Restoration, and Disaster Recovery Planning
MySQL Server Backup, Restoration, and Disaster Recovery PlanningMySQL Server Backup, Restoration, and Disaster Recovery Planning
MySQL Server Backup, Restoration, and Disaster Recovery PlanningLenz Grimmer
 
MariaDB 10.5 binary install (바이너리 설치)
MariaDB 10.5 binary install (바이너리 설치)MariaDB 10.5 binary install (바이너리 설치)
MariaDB 10.5 binary install (바이너리 설치)NeoClova
 
MySQL8.0_performance_schema.pptx
MySQL8.0_performance_schema.pptxMySQL8.0_performance_schema.pptx
MySQL8.0_performance_schema.pptxNeoClova
 
MySQL DBA OCP 1Z0-883
MySQL DBA OCP 1Z0-883MySQL DBA OCP 1Z0-883
MySQL DBA OCP 1Z0-883Kwaye Kant
 
Highly efficient backups with percona xtrabackup
Highly efficient backups with percona xtrabackupHighly efficient backups with percona xtrabackup
Highly efficient backups with percona xtrabackupNilnandan Joshi
 
Get More Out of MongoDB with TokuMX
Get More Out of MongoDB with TokuMXGet More Out of MongoDB with TokuMX
Get More Out of MongoDB with TokuMXTim Callaghan
 
The InnoDB Storage Engine for MySQL
The InnoDB Storage Engine for MySQLThe InnoDB Storage Engine for MySQL
The InnoDB Storage Engine for MySQLMorgan Tocker
 
Tuning DB2 in a Solaris Environment
Tuning DB2 in a Solaris EnvironmentTuning DB2 in a Solaris Environment
Tuning DB2 in a Solaris EnvironmentJignesh Shah
 

La actualidad más candente (18)

Mydumper - Vinoth kanna @ MySQL meetup Mumbai
Mydumper - Vinoth kanna @ MySQL meetup MumbaiMydumper - Vinoth kanna @ MySQL meetup Mumbai
Mydumper - Vinoth kanna @ MySQL meetup Mumbai
 
MySQL :What's New #GIDS16
MySQL :What's New #GIDS16MySQL :What's New #GIDS16
MySQL :What's New #GIDS16
 
MySQL 8.0 achitecture and enhancement
MySQL 8.0 achitecture and enhancementMySQL 8.0 achitecture and enhancement
MySQL 8.0 achitecture and enhancement
 
MySQL Storage Engines
MySQL Storage EnginesMySQL Storage Engines
MySQL Storage Engines
 
Percona FT / TokuDB
Percona FT / TokuDBPercona FT / TokuDB
Percona FT / TokuDB
 
"Advanced MySQL 5 Tuning" by Michael Monty Widenius @ eLiberatica 2007
"Advanced MySQL 5 Tuning" by Michael Monty Widenius @ eLiberatica 2007"Advanced MySQL 5 Tuning" by Michael Monty Widenius @ eLiberatica 2007
"Advanced MySQL 5 Tuning" by Michael Monty Widenius @ eLiberatica 2007
 
MySQL Backup & Recovery
MySQL Backup & RecoveryMySQL Backup & Recovery
MySQL Backup & Recovery
 
MySQL Server Backup, Restoration, and Disaster Recovery Planning
MySQL Server Backup, Restoration, and Disaster Recovery PlanningMySQL Server Backup, Restoration, and Disaster Recovery Planning
MySQL Server Backup, Restoration, and Disaster Recovery Planning
 
Slides
SlidesSlides
Slides
 
MariaDB 10.5 binary install (바이너리 설치)
MariaDB 10.5 binary install (바이너리 설치)MariaDB 10.5 binary install (바이너리 설치)
MariaDB 10.5 binary install (바이너리 설치)
 
MySQL8.0_performance_schema.pptx
MySQL8.0_performance_schema.pptxMySQL8.0_performance_schema.pptx
MySQL8.0_performance_schema.pptx
 
MySQL DBA OCP 1Z0-883
MySQL DBA OCP 1Z0-883MySQL DBA OCP 1Z0-883
MySQL DBA OCP 1Z0-883
 
Highly efficient backups with percona xtrabackup
Highly efficient backups with percona xtrabackupHighly efficient backups with percona xtrabackup
Highly efficient backups with percona xtrabackup
 
Database storage engines
Database storage enginesDatabase storage engines
Database storage engines
 
Get More Out of MongoDB with TokuMX
Get More Out of MongoDB with TokuMXGet More Out of MongoDB with TokuMX
Get More Out of MongoDB with TokuMX
 
MySQL and DB Engines
MySQL  and DB EnginesMySQL  and DB Engines
MySQL and DB Engines
 
The InnoDB Storage Engine for MySQL
The InnoDB Storage Engine for MySQLThe InnoDB Storage Engine for MySQL
The InnoDB Storage Engine for MySQL
 
Tuning DB2 in a Solaris Environment
Tuning DB2 in a Solaris EnvironmentTuning DB2 in a Solaris Environment
Tuning DB2 in a Solaris Environment
 

Similar a Collaborate 2012 - Administering MySQL for Oracle DBAs

My sql introduction for Bestcom
My sql introduction for BestcomMy sql introduction for Bestcom
My sql introduction for BestcomIvan Tu
 
2015: Whats New in MySQL 5.7, At Oracle Open World, November 3rd, 2015
2015: Whats New in MySQL 5.7, At Oracle Open World, November 3rd, 2015 2015: Whats New in MySQL 5.7, At Oracle Open World, November 3rd, 2015
2015: Whats New in MySQL 5.7, At Oracle Open World, November 3rd, 2015 Geir Høydalsvik
 
MySQL Performance - Best practices
MySQL Performance - Best practices MySQL Performance - Best practices
MySQL Performance - Best practices Ted Wennmark
 
MySQL Server Backup, Restoration, And Disaster Recovery Planning Presentation
MySQL Server Backup, Restoration, And Disaster Recovery Planning PresentationMySQL Server Backup, Restoration, And Disaster Recovery Planning Presentation
MySQL Server Backup, Restoration, And Disaster Recovery Planning PresentationColin Charles
 
My sql crashcourse_intro_kdl
My sql crashcourse_intro_kdlMy sql crashcourse_intro_kdl
My sql crashcourse_intro_kdlsqlhjalp
 
Embracing Database Diversity: The New Oracle / MySQL DBA - UKOUG
Embracing Database Diversity: The New Oracle / MySQL DBA -   UKOUGEmbracing Database Diversity: The New Oracle / MySQL DBA -   UKOUG
Embracing Database Diversity: The New Oracle / MySQL DBA - UKOUGKeith Hollman
 
MySQL Performance Tuning at COSCUP 2014
MySQL Performance Tuning at COSCUP 2014MySQL Performance Tuning at COSCUP 2014
MySQL Performance Tuning at COSCUP 2014Ryusuke Kajiyama
 
MySQL 5.6 Replication Webinar
MySQL 5.6 Replication WebinarMySQL 5.6 Replication Webinar
MySQL 5.6 Replication WebinarMark Swarbrick
 
Making MySQL Administration a Breeze - A look into a MySQL DBA's toolchest
Making MySQL Administration a Breeze - A look into a MySQL DBA's toolchest Making MySQL Administration a Breeze - A look into a MySQL DBA's toolchest
Making MySQL Administration a Breeze - A look into a MySQL DBA's toolchest Lenz Grimmer
 
MySQL 5.7: What's New, Nov. 2015
MySQL 5.7: What's New, Nov. 2015MySQL 5.7: What's New, Nov. 2015
MySQL 5.7: What's New, Nov. 2015Mario Beck
 
Maximizing performance via tuning and optimization
Maximizing performance via tuning and optimizationMaximizing performance via tuning and optimization
Maximizing performance via tuning and optimizationMariaDB plc
 
Maximizing performance via tuning and optimization
Maximizing performance via tuning and optimizationMaximizing performance via tuning and optimization
Maximizing performance via tuning and optimizationMariaDB plc
 
MySQL Performance Tuning Variables
MySQL Performance Tuning VariablesMySQL Performance Tuning Variables
MySQL Performance Tuning VariablesFromDual GmbH
 
MySQL overview
MySQL overviewMySQL overview
MySQL overviewMarco Tusa
 

Similar a Collaborate 2012 - Administering MySQL for Oracle DBAs (20)

My sql introduction for Bestcom
My sql introduction for BestcomMy sql introduction for Bestcom
My sql introduction for Bestcom
 
MySQL database
MySQL databaseMySQL database
MySQL database
 
2015: Whats New in MySQL 5.7, At Oracle Open World, November 3rd, 2015
2015: Whats New in MySQL 5.7, At Oracle Open World, November 3rd, 2015 2015: Whats New in MySQL 5.7, At Oracle Open World, November 3rd, 2015
2015: Whats New in MySQL 5.7, At Oracle Open World, November 3rd, 2015
 
MySQL Performance - Best practices
MySQL Performance - Best practices MySQL Performance - Best practices
MySQL Performance - Best practices
 
MySQL Server Backup, Restoration, And Disaster Recovery Planning Presentation
MySQL Server Backup, Restoration, And Disaster Recovery Planning PresentationMySQL Server Backup, Restoration, And Disaster Recovery Planning Presentation
MySQL Server Backup, Restoration, And Disaster Recovery Planning Presentation
 
Fudcon talk.ppt
Fudcon talk.pptFudcon talk.ppt
Fudcon talk.ppt
 
My sql crashcourse_intro_kdl
My sql crashcourse_intro_kdlMy sql crashcourse_intro_kdl
My sql crashcourse_intro_kdl
 
Embracing Database Diversity: The New Oracle / MySQL DBA - UKOUG
Embracing Database Diversity: The New Oracle / MySQL DBA -   UKOUGEmbracing Database Diversity: The New Oracle / MySQL DBA -   UKOUG
Embracing Database Diversity: The New Oracle / MySQL DBA - UKOUG
 
MySQL Performance Tuning at COSCUP 2014
MySQL Performance Tuning at COSCUP 2014MySQL Performance Tuning at COSCUP 2014
MySQL Performance Tuning at COSCUP 2014
 
MySQL 5.6 Replication Webinar
MySQL 5.6 Replication WebinarMySQL 5.6 Replication Webinar
MySQL 5.6 Replication Webinar
 
Making MySQL Administration a Breeze - A look into a MySQL DBA's toolchest
Making MySQL Administration a Breeze - A look into a MySQL DBA's toolchest Making MySQL Administration a Breeze - A look into a MySQL DBA's toolchest
Making MySQL Administration a Breeze - A look into a MySQL DBA's toolchest
 
MySQL 5.7: What's New, Nov. 2015
MySQL 5.7: What's New, Nov. 2015MySQL 5.7: What's New, Nov. 2015
MySQL 5.7: What's New, Nov. 2015
 
Maximizing performance via tuning and optimization
Maximizing performance via tuning and optimizationMaximizing performance via tuning and optimization
Maximizing performance via tuning and optimization
 
Maximizing performance via tuning and optimization
Maximizing performance via tuning and optimizationMaximizing performance via tuning and optimization
Maximizing performance via tuning and optimization
 
My sql
My sqlMy sql
My sql
 
PostgreSQL and MySQL
PostgreSQL and MySQLPostgreSQL and MySQL
PostgreSQL and MySQL
 
Oracle DBA
Oracle DBAOracle DBA
Oracle DBA
 
MySQL 5.7 what's new
MySQL 5.7 what's newMySQL 5.7 what's new
MySQL 5.7 what's new
 
MySQL Performance Tuning Variables
MySQL Performance Tuning VariablesMySQL Performance Tuning Variables
MySQL Performance Tuning Variables
 
MySQL overview
MySQL overviewMySQL overview
MySQL overview
 

Más de Nelson Calero

Database automation guide - Oracle Community Tour LATAM 2023
Database automation guide - Oracle Community Tour LATAM 2023Database automation guide - Oracle Community Tour LATAM 2023
Database automation guide - Oracle Community Tour LATAM 2023Nelson Calero
 
Terraform Tips and Tricks - LAOUC 2022
Terraform Tips and Tricks - LAOUC 2022Terraform Tips and Tricks - LAOUC 2022
Terraform Tips and Tricks - LAOUC 2022Nelson Calero
 
Oracle on kubernetes 101 - Dec/2021
Oracle on kubernetes 101 - Dec/2021Oracle on kubernetes 101 - Dec/2021
Oracle on kubernetes 101 - Dec/2021Nelson Calero
 
Automate Oracle database patches and upgrades using Fleet Provisioning and Pa...
Automate Oracle database patches and upgrades using Fleet Provisioning and Pa...Automate Oracle database patches and upgrades using Fleet Provisioning and Pa...
Automate Oracle database patches and upgrades using Fleet Provisioning and Pa...Nelson Calero
 
Oracle Exadata Cloud Services guide from practical experience - OOW19
Oracle Exadata Cloud Services guide from practical experience - OOW19Oracle Exadata Cloud Services guide from practical experience - OOW19
Oracle Exadata Cloud Services guide from practical experience - OOW19Nelson Calero
 
Automate your oracle cloud infrastructure operations v2.0 - OOW19
Automate your oracle cloud infrastructure operations v2.0 - OOW19Automate your oracle cloud infrastructure operations v2.0 - OOW19
Automate your oracle cloud infrastructure operations v2.0 - OOW19Nelson Calero
 
Automate the operation of your Oracle Cloud infrastructure v2.0
Automate the operation of your Oracle Cloud infrastructure v2.0Automate the operation of your Oracle Cloud infrastructure v2.0
Automate the operation of your Oracle Cloud infrastructure v2.0Nelson Calero
 
SSL certificates in the Oracle Database without surprises
SSL certificates in the Oracle Database without surprisesSSL certificates in the Oracle Database without surprises
SSL certificates in the Oracle Database without surprisesNelson Calero
 
Practical guide to Oracle Virtual environments
Practical guide to Oracle Virtual environmentsPractical guide to Oracle Virtual environments
Practical guide to Oracle Virtual environmentsNelson Calero
 
Automate your Oracle Cloud Infrastructure operation
Automate your Oracle Cloud Infrastructure operationAutomate your Oracle Cloud Infrastructure operation
Automate your Oracle Cloud Infrastructure operationNelson Calero
 
Welcome to databases in the Cloud
Welcome to databases in the CloudWelcome to databases in the Cloud
Welcome to databases in the CloudNelson Calero
 
Redefining tables online without surprises
Redefining tables online without surprisesRedefining tables online without surprises
Redefining tables online without surprisesNelson Calero
 
Protect Sensitive Data: Implementing Fine-Grained Access Control in Oracle
Protect Sensitive Data: Implementing Fine-Grained Access Control in OracleProtect Sensitive Data: Implementing Fine-Grained Access Control in Oracle
Protect Sensitive Data: Implementing Fine-Grained Access Control in OracleNelson Calero
 
Evolution of Performance Management: Oracle 12c adaptive optimizations - ukou...
Evolution of Performance Management: Oracle 12c adaptive optimizations - ukou...Evolution of Performance Management: Oracle 12c adaptive optimizations - ukou...
Evolution of Performance Management: Oracle 12c adaptive optimizations - ukou...Nelson Calero
 
Oracle Exadata Maintenance tasks 101 - OTN Tour 2015
Oracle Exadata Maintenance tasks 101 - OTN Tour 2015Oracle Exadata Maintenance tasks 101 - OTN Tour 2015
Oracle Exadata Maintenance tasks 101 - OTN Tour 2015Nelson Calero
 
My Experience Using Oracle SQL Plan Baselines 11g/12c
My Experience Using Oracle SQL Plan Baselines 11g/12cMy Experience Using Oracle SQL Plan Baselines 11g/12c
My Experience Using Oracle SQL Plan Baselines 11g/12cNelson Calero
 
Oracle RAC sin sorpresas - v2014
Oracle RAC sin sorpresas - v2014Oracle RAC sin sorpresas - v2014
Oracle RAC sin sorpresas - v2014Nelson Calero
 
Alta disponibilidad con Pacemaker
Alta disponibilidad con PacemakerAlta disponibilidad con Pacemaker
Alta disponibilidad con PacemakerNelson Calero
 
AROUG BIDAY 2013 - Automatizar procesos de ETL con PL/SQL
AROUG BIDAY 2013 - Automatizar procesos de ETL con PL/SQLAROUG BIDAY 2013 - Automatizar procesos de ETL con PL/SQL
AROUG BIDAY 2013 - Automatizar procesos de ETL con PL/SQLNelson Calero
 
MariaDB y FOSS en infraestructura de salud y estándares
MariaDB y FOSS en infraestructura de salud y estándaresMariaDB y FOSS en infraestructura de salud y estándares
MariaDB y FOSS en infraestructura de salud y estándaresNelson Calero
 

Más de Nelson Calero (20)

Database automation guide - Oracle Community Tour LATAM 2023
Database automation guide - Oracle Community Tour LATAM 2023Database automation guide - Oracle Community Tour LATAM 2023
Database automation guide - Oracle Community Tour LATAM 2023
 
Terraform Tips and Tricks - LAOUC 2022
Terraform Tips and Tricks - LAOUC 2022Terraform Tips and Tricks - LAOUC 2022
Terraform Tips and Tricks - LAOUC 2022
 
Oracle on kubernetes 101 - Dec/2021
Oracle on kubernetes 101 - Dec/2021Oracle on kubernetes 101 - Dec/2021
Oracle on kubernetes 101 - Dec/2021
 
Automate Oracle database patches and upgrades using Fleet Provisioning and Pa...
Automate Oracle database patches and upgrades using Fleet Provisioning and Pa...Automate Oracle database patches and upgrades using Fleet Provisioning and Pa...
Automate Oracle database patches and upgrades using Fleet Provisioning and Pa...
 
Oracle Exadata Cloud Services guide from practical experience - OOW19
Oracle Exadata Cloud Services guide from practical experience - OOW19Oracle Exadata Cloud Services guide from practical experience - OOW19
Oracle Exadata Cloud Services guide from practical experience - OOW19
 
Automate your oracle cloud infrastructure operations v2.0 - OOW19
Automate your oracle cloud infrastructure operations v2.0 - OOW19Automate your oracle cloud infrastructure operations v2.0 - OOW19
Automate your oracle cloud infrastructure operations v2.0 - OOW19
 
Automate the operation of your Oracle Cloud infrastructure v2.0
Automate the operation of your Oracle Cloud infrastructure v2.0Automate the operation of your Oracle Cloud infrastructure v2.0
Automate the operation of your Oracle Cloud infrastructure v2.0
 
SSL certificates in the Oracle Database without surprises
SSL certificates in the Oracle Database without surprisesSSL certificates in the Oracle Database without surprises
SSL certificates in the Oracle Database without surprises
 
Practical guide to Oracle Virtual environments
Practical guide to Oracle Virtual environmentsPractical guide to Oracle Virtual environments
Practical guide to Oracle Virtual environments
 
Automate your Oracle Cloud Infrastructure operation
Automate your Oracle Cloud Infrastructure operationAutomate your Oracle Cloud Infrastructure operation
Automate your Oracle Cloud Infrastructure operation
 
Welcome to databases in the Cloud
Welcome to databases in the CloudWelcome to databases in the Cloud
Welcome to databases in the Cloud
 
Redefining tables online without surprises
Redefining tables online without surprisesRedefining tables online without surprises
Redefining tables online without surprises
 
Protect Sensitive Data: Implementing Fine-Grained Access Control in Oracle
Protect Sensitive Data: Implementing Fine-Grained Access Control in OracleProtect Sensitive Data: Implementing Fine-Grained Access Control in Oracle
Protect Sensitive Data: Implementing Fine-Grained Access Control in Oracle
 
Evolution of Performance Management: Oracle 12c adaptive optimizations - ukou...
Evolution of Performance Management: Oracle 12c adaptive optimizations - ukou...Evolution of Performance Management: Oracle 12c adaptive optimizations - ukou...
Evolution of Performance Management: Oracle 12c adaptive optimizations - ukou...
 
Oracle Exadata Maintenance tasks 101 - OTN Tour 2015
Oracle Exadata Maintenance tasks 101 - OTN Tour 2015Oracle Exadata Maintenance tasks 101 - OTN Tour 2015
Oracle Exadata Maintenance tasks 101 - OTN Tour 2015
 
My Experience Using Oracle SQL Plan Baselines 11g/12c
My Experience Using Oracle SQL Plan Baselines 11g/12cMy Experience Using Oracle SQL Plan Baselines 11g/12c
My Experience Using Oracle SQL Plan Baselines 11g/12c
 
Oracle RAC sin sorpresas - v2014
Oracle RAC sin sorpresas - v2014Oracle RAC sin sorpresas - v2014
Oracle RAC sin sorpresas - v2014
 
Alta disponibilidad con Pacemaker
Alta disponibilidad con PacemakerAlta disponibilidad con Pacemaker
Alta disponibilidad con Pacemaker
 
AROUG BIDAY 2013 - Automatizar procesos de ETL con PL/SQL
AROUG BIDAY 2013 - Automatizar procesos de ETL con PL/SQLAROUG BIDAY 2013 - Automatizar procesos de ETL con PL/SQL
AROUG BIDAY 2013 - Automatizar procesos de ETL con PL/SQL
 
MariaDB y FOSS en infraestructura de salud y estándares
MariaDB y FOSS en infraestructura de salud y estándaresMariaDB y FOSS en infraestructura de salud y estándares
MariaDB y FOSS en infraestructura de salud y estándares
 

Último

SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 

Último (20)

SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 

Collaborate 2012 - Administering MySQL for Oracle DBAs

  • 2. Administering MySQL for Oracle DBAs Eng. Nelson Calero, OCP UYOUG 2/54
  • 3. Administering MySQL for Oracle DBAs About me: http://www.linkedin.com/in/ncalero Working with Oracle tools and Linux environments since 1996 DBA Oracle (since 2001) & MySQL (since 2005) Oracle University Instructor since 2011 Co-founder and President of the Oracle user Group of Uruguay (UYOUG) since 2009 Computer Engineer. OCP DBA 10g 3/54
  • 4. Uruguay 4/54
  • 5. AGENDA 1 – Brief Intro to main MySQL architectural components 2 – Comparison Oracle vs MySQL 3 – Installation and Upgrades 4 – Security & auditing 5 – Performance management 6 – Backup & Recovery 7 – Designing for High Availability 5/54
  • 6. 1 - Introduction to the MySQL architecture http://dev.mysql.com/doc/refman/5.5/en/pluggable-storage-overview.html 6/54
  • 7. 1 - Introduction to the MySQL architecture MySQL server • comes in a Community and Enterprise Edition • has many databases • no schemas • two OS processes when running: mysqld and mysqld_safe • listen on port tcp/ip 3306 by default • local connections use sockets (similar to beq in Oracle) • creates one thread per each client connection • thread pool is a commercial feature of 5.5.16 (Oracle shared server) • cost based optimizer • replication is not transactional • cluster is another product, with shared nothing architecture 7/54
  • 8. 1 - Introduction to the MySQL architecture binaries • installed in /usr/bin if using RPM installation on most *nix • if using binary distribution (.tar), can be placed in custom directories • Is the way of having different versions on same server No OFA or similar. Startup script (/etc/init.d/mysql) has some defaults, changed by configuration file (/etc/my.cnf) datadir: /var/lib/mysql bindir: /usr/bin 8/54
  • 9. 1 - Introduction to the MySQL architecture Internal components •memory caches { query | innodb buffer | innodb log | myisam key | user | dictionary } cache • InnoDB undo log - rollback segments •splitted as insert undo and update undo buffer •part of the system tablespace by default •since MySQL 5.6 can be moved: innodb_undo_tablespaces 9/54
  • 10. 1 - MySQL architecture Internal components Storage engines: pluggable architecture that enables different algorithms for handling data. InnoDB – Transactional. Default from 5.5 MyISAM – non transactional. Default before 5.5 Memory – stored only in memory, not persisted to disk NDB – used by the Cluster Archive/Blackhole/Merge/Federated - other specific use engines Many third parties implementations XtraDB – from Percona. InnoDB improved 10/54
  • 11. 1 - MySQL architecture Internal components Storage engine files • table.frm – table definition, regardless of storage engine used ($datadir/dbname) • InnoDB logs – transactional log, used for crash recovery (ib_logfile1) • 2 by default. Circular rotation. No archiving • InnoDB system tablespace – ibdata1 • Stores all data and metadata by default • Can be changed to external tablespaces: innodb_file_per_table in my.cnf • Stores each table data in one file named table.ibd • other tablespaces – used by NDB similarly as Oracle. 11/54
  • 12. 1 - MySQL architecture Internal components Binary logs • All changes done on the server (called events), in the order they were executed. • Can be inspected easily with the command mysqlbinlog • Configurable format: Statement, Row or Mixed • Needed for replication and point in time recovery • Have a purge (EXPIRE_LOGS_DAYS) and rotation (MAX_BINLOG_SIZE) policy 12/54
  • 13. 1 - MySQL architecture Datatypes More data types, more design choices: • 9 numeric. Oracle only has one • INT is 4 bytes, TINYINT 1 byte • UNSIGNED: double possible values for autoincrements •DATE (3 bytes), DATETIME (8 bytes) and TIMESTAMP (4 bytes) Choosing a data type has more impact on the space used • int(N) – similar to Oracle, does not affect bytes used to store 13/54
  • 14. 1 - MySQL architecture Internal components Data dictionary • information_schema: metadata about objects • performance_schema: (5.5.3) dynamic metrics about server usage (as v$ views) mysql> SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES -> WHERE TABLE_SCHEMA = 'performance_schema'; +----------------------------------------------+ | TABLE_NAME | +----------------------------------------------+ | cond_instances | | events_waits_current | | events_waits_history | | events_waits_history_long | | events_waits_summary_by_instance | | events_waits_summary_by_thread_by_event_name | | events_waits_summary_global_by_event_name | ... 14/54
  • 15. 1 - Introduction to the MySQL architecture Server variables •Similar to Oracle initialization parameters, change functionality •Some can be changed dynamically •Can be persistent changed with startup options or parameter file •Global/session scope. Global do not affect session who changed it. mysql root@localhost.information_schema>show variables like 'query%' limit 4; +------------------------------+---------+ | Variable_name | Value | +------------------------------+---------+ | query_alloc_block_size | 8192 | | query_cache_limit | 1048576 | | query_cache_min_res_unit | 4096 | | query_cache_size | 0 | +------------------------------+---------+ 15/54
  • 16. 1 - Introduction to the MySQL architecture Status variables •Dynamic counters about server activity mysql root@localhost.information_schema>show status like 'qc%'; +-------------------------+-------+ | Variable_name | Value | +-------------------------+-------+ | Qcache_free_blocks | 0 | | Qcache_free_memory | 0 | | Qcache_hits | 0 | | Qcache_inserts | 0 | | Qcache_lowmem_prunes | 0 | | Qcache_not_cached | 0 | | Qcache_queries_in_cache | 0 | +-------------------------+-------+ 16/54
  • 17. 1 - MySQL architecture Log Files Slow query log: can be enabled to record log running queries long_query_time=N (0 to 10) General log: can be enabled to record all server activity. general_log = 'ON' Error log: start, stop and error messages. file hostname.err by default can be changed with log_error=file.log in my.cnf 17/54
  • 18. 1 - MySQL architecture Security Uses standard GRANT/REVOKE commands Privileges per host/user/database/table/column grant select on employees.* to you@'desktop' identified by pwd; Data stored on mysql database: user/db/*_priv tables 18/54
  • 19. 1 - MySQL architecture Locking and transactions Lock handling: specific of the storage engine InnoDB – row level MyISAM – table level Transactions? • autocommit enabled by default outside transactions • default tx_isolation is REPEATABLE-READ • READ_COMMITED does not work with binlog mode STATEMENT 19/54
  • 20. 1 - MySQL architecture Locking and transactions What happens if the server crashes? • InnoDB has auto recovery (using ib_logfiles) • MyISAM does not, need manual intervention (myisamchk, repair table) Some parameters needs to be adjusted if using InnoDB and replication: • InnoDB_flush_log_at_trx_commit • sync_binlog • innodb_support_xa 20/54
  • 21. AGENDA 1 – Brief Intro to main MySQL architectural components 2 – Comparison Oracle vs MySQL 3 – Installation and Upgrades 4 – Security & auditing 5 – Performance management 6 – Backup & Recovery 7 – Designing for High Availability 21/54
  • 22. 2 - Comparison with Oracle architecture Which database flavor? • Standard? Enterprise? Exadata? Big data appliance? • There are different implementation decisions in every detail • Initially created for different purposes Focus on Standard Edition, some picks: • Processes handling • Optimizer features • Locking • Memory management Pick one Oracle functionality, look for that in MySQL. 22/54
  • 23. 2 - Comparison with Oracle SQL Some SQL differences: •No need for dual. Select without FROM clause works. •Dual exists just for compatibility •No sequences. autoincrement clause at column definition •last_insert_id() can show the autoincrement value of last insert •procedures, but no packages and user defined types •multi-record insert •insert delayed •select into outfile / load data file •drop table if exists •partial indexes (column(N)) looks like function based index, but they do not exists 23/54
  • 24. 2 - Comparison with Oracle SQL Case insensitive char comparison mysql root@localhost.employees>select * from employees where first_name='JAANA' limit 3; +--------+------------+------------+-----------------+--------+------------+ | emp_no | birth_date | first_name | last_name | gender | hire_date | +--------+------------+------------+-----------------+--------+------------+ | 52681 | 1956-03-28 | Jaana | Besselaar | M | 1986-09-26 | | 53990 | 1960-05-26 | Jaana | Cunliffe | M | 1995-07-09 | | 54450 | 1954-02-24 | Jaana | Ranon | F | 1988-08-23 | +--------+------------+------------+-----------------+--------+------------+ 8 rows in set (0.01 sec) 24/54
  • 25. 2 - Comparison with Oracle SQL Silent conversions mysql root@localhost.employees>create table pru (name varchar(10)); Query OK, 0 rows affected (0.19 sec) mysql root@localhost.employees>insert into pru values ('Jhon'),('Lindenbaumgreen'); Query OK, 2 rows affected, 1 warning (0.16 sec) Records: 2 Duplicates: 0 Warnings: 1 mysql root@localhost.employees>show warnings; +---------+------+-------------------------------------------+ | Level | Code | Message | +---------+------+-------------------------------------------+ | Warning | 1265 | Data truncated for column 'name' at row 2 | +---------+------+-------------------------------------------+ 1 row in set (0.00 sec) 25/54
  • 26. 2 - Comparison with Oracle SQL mysql root@localhost.employees>select * from pru; +------------+ | name | +------------+ | Jhon | | Lindenbaum | +------------+ 2 rows in set (0.00 sec) with SQL_MODE this can be changed: Mysql> set SQL_MODE=strict_all_tables; Query OK, 0 rows affected (0.00 sec) Mysql> insert into pru values ('Jhon'),('Lindenbaumgreen'); ERROR 1406 (22001): Data too long for column 'name' at row 2 NOTE: this works because SET uses SESSION scope by default 26/54
  • 27. 2 - Comparison with Oracle SQL Many other behaviors can be changed to something Oracle-like: • SQL_MODE=ORACLE Equivalent to PIPES_AS_CONCAT, ANSI_QUOTES, IGNORE_SPACE, NO_KEY_OPTIONS, NO_TABLE_OPTIONS, NO_FIELD_OPTIONS, NO_AUTO_CREATE_USER. • SQL_MODE=TRADITIONAL Equivalent to STRICT_TRANS_TABLES, STRICT_ALL_TABLES, NO_ZERO_IN_DATE, NO_ZERO_DATE, ERROR_FOR_DIVISION_BY_ZERO, NO_AUTO_CREATE_USER, and NO_ENGINE_SUBSTITUTION. • Warning: changing SQL_MODE can hurt tools that expect classic behavior • Great reference for going deeper on this: "MySQL Idiosyncrasies that BITE" by Ronald Bradford. 27/54
  • 28. MySQL Tools Console – mysql – mysqladmin – mysqldump – InnoDB Hot Backup: licensed – Third parties Percona Toolkit (former maatkit): many useful script utilities OpenArk: more Percona XtraBackup: OpenSource non locking transactional backup – http://forge.mysql.com/tools/ 28/54
  • 29. MySQL Tools GUI tools • MySQL Workbench • Data modeling, SQL development, database management, forward and reverse engineering, change management. • Merge and improvement of old tools from MySQL AB. • Community edition under GPL • MySQL Enterprise Monitor • Real time alerting and monitoring solution • With support contract 29/54
  • 30. AGENDA 1 – Brief Intro to main MySQL architectural components 2 – Comparison Oracle vs MySQL 3 – Installation and Upgrades 4 – Security & auditing 5 – Performance management 6 – Backup & Recovery 7 – Designing for High Availability 30/54
  • 31. 3 - Installation and Upgrade • Fresh install: rpm -Ivh mysql-server • Customization? •defaults are for a single installation, single instance per server. /var/lib/mysql /etc/my.cnf /var/log/mysql/mysqld.log ... • We can create and use our own custom deploy, just to not miss OFA: /u01? /u02/mysql/data 31/54
  • 32. 3 - Installation Default installation •no root user password. Should be used mysql_secure_installation Autocommit is enabled. If we want to change it: mysql root@localhost.employees>set autocommit=off; Query OK, 0 rows affected (0.00 sec) mysql root@localhost.employees>show variables like '%autocommit%'; +---------------+-------+ | Variable_name | Value | +---------------+-------+ | autocommit | OFF | +---------------+-------+ 1 row in set (0.00 sec) 32/54
  • 33. 3 - Installation Do not forget about GLOBAL/SESSION variables: mysql root@localhost.employees>show global variables like 'autocommit%'; +---------------+-------+ | Variable_name | Value | +---------------+-------+ | autocommit | ON | +---------------+-------+ 1 row in set (0.01 sec) mysql root@localhost.employees>set global autocommit=off; Query OK, 0 rows affected (0.00 sec) mysql root@localhost.employees>show global variables like 'autocommit%'; +---------------+-------+ | Variable_name | Value | +---------------+-------+ | autocommit | OFF | +---------------+-------+ 1 row in set (0.00 sec) 33/54
  • 34. 3 - Installation Also, variables are not persistent when changed with SET: oraculo:/var/lib/mysql # service mysql restart Restarting service MySQL Shutting down service MySQL done Starting service MySQL done mysql root@localhost.(none)>show global variables like '%autocommit%'; +---------------+-------+ | Variable_name | Value | +---------------+-------+ | autocommit | ON | +---------------+-------+ 1 row in set (0.00 sec) => It needs to be changed through startup options, in my.cnf file 34/54
  • 35. 3 - Upgrade Just run rpm -Uvh? • First on development environments • Review changes in the new version, looking for: • new reserved words that could be in use by our existing tables • parameters in use deprecated/renamed • data conversion needed for some of our columns? • known issues 35/54
  • 36. 3 - Upgrade Effect of upgrading binaries with RPM -Uvh (minor version) oraculo:~ # service mysql start Will update MySQL now, if you encounter any problems, please read following file: /usr/share/doc/packages/mysql-community-server/README.SuSE Log files inconsistency, please merge following files manually: /var/log/mysql/mysqld.log /var/lib/mysql/mysqld.log Running protected MySQL... Upgrading MySQL... Looking for 'mysql' as: /usr/bin/mysql Looking for 'mysqlcheck' as: /usr/bin/mysqlcheck Running 'mysqlcheck' with connection arguments: '--port=3306' '--socket=/var/run/my Running 'mysqlcheck' with connection arguments: '--port=3306' '--socket=/var/run/my SUELDOS.PARAMETROS_REPORTES OK ... Running 'mysql_fix_privilege_tables'... OK Starting service MySQL done 36/54
  • 37. 3 - Upgrade Version after the upgrade: oraculo:~ # mysql --version mysql Ver 14.14 Distrib 5.5.21, for Linux (x86_64) using readline 6.1 Worked without issues during last versions (on OpenSUSE 11.4) 5.5.18-73.1 5.5.18-74.1 5.5.20-75.1 5.5.20-78 5.5.20-80.1 5.5.21-81.1 37/54
  • 38. AGENDA 1 – Brief Intro to main MySQL architectural components 2 – Comparison Oracle vs MySQL 3 – Installation and Upgrades 4 – Security & auditing 5 – Performance management 6 – Backup & Recovery 7 – Designing for High Availability 38/54
  • 39. 4 - MySQL Security & auditing • Privilege ALL includes SUPER, which allows to administer the MySQL server. Follow least needed principle, and also avoid using %: GRANT SELECT (col1), INSERT (col1,col2) ON employees.employee TO 'you'@'desk'; GRANT select on employees.* to you@'%' identified by pwd; GRANT select on *.* to you@'%'; GRANT ALL on *.* to you@'%'; • Each user/host combination defines a unique user • Vanilla is not possible to block connections to specific users • Log analysis to have proper auditing in place? • heavily used servers should use replica, TCP or OS mechanisms. 39/54
  • 40. 4 - MySQL Security & auditing Auditing • No built in functionality • Can be implemented with triggers, sames as with Oracle • TIMESTAMP datatype has automatic updating and initialization, no triggers needed col_name TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP 40/54
  • 41. AGENDA 1 – Brief Intro to main MySQL architectural components 2 – Comparison Oracle vs MySQL 3 – Installation and Upgrades 4 – Security & auditing 5 – Performance management 6 – Backup & Recovery 7 – Designing for High Availability 41/54
  • 42. 5 - Performance Management NOs: • way of modify/cheat optimizer statistics as in Oracle • historical repository like AWR – Enterprise Monitor with support contract • limits on server CPU/IO usages • ability to rewrite queries on the fly Can: • configure many internal memory areas and number of client threads • use hints to force index usage • use external home made solution for query rewrite 42/54
  • 43. 5 - Performance Management • classical unix tools outside the database vmstat / oprofile / strace / top gdb – poor man's profiler • inside database • mytop / innotop utilities • explain / explain extended • before MySQL 5.6.3, subqueries in the FROM clause are executed • status variables • com_*, innodb_*, connections • information_schema • show engine status / processlist • profiles 43/54
  • 44. 5 - Performance Management mysql >set profiling=1; mysql >show profile for query 1; Query OK, 0 rows affected (0.00 sec) +----------------------+----------+ | Status | Duration | mysql >select count(1) From employees; +----------------------+----------+ +----------+ | starting | 0.000142 | | count(1) | | checking permissions | 0.000017 | +----------+ | Opening tables | 0.140542 | | 10000 | | System lock | 0.000039 | +----------+ | init | 0.000022 | 1 row in set (0.21 sec) | optimizing | 0.000008 | | statistics | 0.000011 | mysql >show profiles; | preparing | 0.000009 | +----------+------------+--------------------------------+ | executing | 0.000005 | | Query_ID | Duration | Query | | Sending data | 0.075795 | +----------+------------+--------------------------------+ | end | 0.000018 | | 1 | 0.21665250 | select count(1) From employees | | query end | 0.000007 | +----------+------------+--------------------------------+ | closing tables | 0.000012 | 1 row in set (0.00 sec) | freeing items | 0.000020 | | logging slow query | 0.000003 | | cleaning up | 0.000005 | 44/54
  • 45. AGENDA 1 – Brief Intro to main MySQL architectural components 2 – Comparison Oracle vs MySQL 3 – Installation and Upgrades 4 – Security & auditing 5 – Performance management 6 – Backup & Recovery 7 – Designing for High Availability 45/54
  • 46. 6 - Backup & Recovery mysqldump – logical backup, engine independent full, database or table locking based on storage engine used XtraBackup – open-source hot backup / non-locking tool from Percona Hotbackup with InnoDB hotbackup: mysqldump --single-transaction --master-data XtraBackup: innobackupex /data/backups Needs an extra step to prepare prior to use in recovery www.percona.com/doc/percona-xtrabackup/ 46/54
  • 47. AGENDA 1 – Brief Intro to main MySQL architectural components 2 – Comparison Oracle vs MySQL 3 – Installation and Upgrades 4 – Security & auditing 5 – Performance management 6 – Backup & Recovery 7 – Designing for High Availability 47/54
  • 48. 7 - Designing for High Availability Replication – built in: • Transfer and apply binary log from master to slaves. • Simple to setup. • Flexible to create cascade configurations. • Can be partial, filtering by DB, tables, and combined. • Asynchronous. Semi-sync in 5.5. • Easy to break. Needs periodical consistency checks. • No conflict resolution. Needs manual intervention when detected. • Not automated failover for HA. • Apply single threaded until 5.6. • Can be configured as circular, but it needs application level coding to avoid inconsistencies. 48/54
  • 49. 7 - Designing for High Availability MySQL Cluster • Different distribution and binaries from MySQL 5.5 • Shared nothing architecture: Data nodes, SQL nodes and Manager. • Data is stored redundant among Data nodes • Online operations: backup, upgrade, node provisioning • Memory usage tied to data handled and #nodes in the cluster • 7.2 recent in production with many improvements Other solutions • SAN/DRBD: Protection from server failures • Pacemaker: Cluster resource manager. Automation of HA among servers. • Galera: Synchronous replication as server plugin. Community and Enterprise. • Tungsten: MultiMaster replication at application level. Community and Enterprise. 49/54
  • 50. Last remarks • MySQL addresses the same problems as Oracle Database. • Do not look for same functionality, but ACID and performance. • Some specific task can be easier (example: Partitioning). • Need to develop custom scripts for admin tasks, using standard OS tools. • Big community of users. • Being FOSS software, source code is available. This allows to overcome lack of specialized tools for specific issues, and depending on your skills you can fix your own problems, and benefit the community. • Many improvements by other companies (as Percona and Facebook). 50/54
  • 51. Questions? nelson.calero@gmail.com 51/54
  • 52. Tip: Better command line prompt Command line could be tuned similar to sqlplus with glogin script? oracle@oraculo:~> sqlplus / as sysdba SQL*Plus: Release 11.2.0.2.0 Production on Tue Feb 28 22:09:00 2012 Copyright (c) 1982, 2011, Oracle. All rights reserved. Connected to: Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production 22:09:01 SYS@XE> oracle@oraculo:~> tail $ORACLE_HOME/sqlplus/admin/glogin.sql set pagesize 200 set linesize 120 SET TIME ON TIMING ON SET SQLPROMPT '&_user@&_connect_identifier>' 52/54
  • 53. Tip: Better command line prompt Add PROMPT parameter to /etc/my.cnf [mysql] no-auto-rehash prompt=mysql u@h.d> oraculo:~ # mysql Welcome to the MySQL monitor. Commands end with ; or g. Your MySQL connection id is 7 Server version: 5.5.21-log Source distribution Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or 'h' for help. Type 'c' to clear the current input statement. mysql root@localhost.(none)>use information_schema Database changed mysql root@localhost.information_schema> 53/54
  • 54. 54/54