Tải bản đầy đủ (.pdf) (214 trang)

MySql High Availability Class Part 1

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (2.32 MB, 214 trang )

Unauthorized reproduction or distribution prohibited Copyright© 2010, Oracle and/or its affiliates

le
b
a
fer

ly
c
a
J

ns
a
r
t
n
o
an
s
ha de
)
om Gui
c
ng dent
i
p
p Stu
o
h
s his


@
t
g
n
e
a
s
MySQL
zh to uHigh Availability
c
a
j
(
Revision 2.1
se
g
n
n
e
a
c
li
h
nZ
PRESENTED BY

SUN MICROSYSTEMS, INC.
MYSQL TRAINING SERVICES

/>

STUDENT GUIDE
© Sun Microsystems, Inc. 2008


Unauthorized reproduction or distribution prohibited Copyright© 2010, Oracle and/or its affiliates

lyn

Jac
ble
era
nsf
-tra
non
sa
) ha de
com t Gui
n
ng
ppi ude
sho is St
ng@ e th
zha o us
(jac e t
ng licens
Zha


MySQL High Availability


MySQL High Availability

Unauthorized reproduction or distribution prohibited Copyright© 2010, Oracle and/or its affiliates

This is the training guide for the MySQL High Availability training course. This training guide was developed using the
MySQL 6.2 Cluster Carrier Grade edition.
Sun Microsystems would like to thank the many individuals that played a part in bringing this training material to the
numerous students who will benefit from the knowledge and effort that each of these contributors put into the training. Even
though there were a large number of contributions from many Sun Microsystems (formerly MySQL) personnel, the following
list of contributors played a vital role in developing this material and ensuring that its contents were accurate, timely and
most of all presented in a way that would benefit those that are utilizing it for the benefit of improving their skills with
MySQL.

Harrison Fisk, Course Designer, Subject Matter Expert
Max Mether, Lead Project Manager, Subject Matter Expert
Lars Thalmann, Subject Matter Expert

le
b
a
fer

ns
a
r
t
n
Bernhard Ocklin, Subject Matter Expert
o
an

s
Morgan Tocker, Subject Matter Expert
ha de
)
om Gui
Jeff Gorton, Course Editor
c
ng dent
i
p
MySQL High Availability Training Guide
p Stu
o
h
Copyright © 2008 by Sun Microsystems, Inc.
s his
@
g
n guideusshall
e tbe reproduced, stored in a retrieval system, or transmitted by any
a
All rights reserved. No part of thish
training
z
means, electronic, mechanical, c
or otherwise, without the written permission of Sun Microsystems,
torecording,
a photocopying,
j
e

(
Inc. No patent liability is assumed
with
respect
to
the
use
information contained herein. Although every precaution has
s training guide, ofSunthe Microsystems
g
n
n
been taken in the
preparation
of
this
and the associated contributors assume no
e
lic Nor is any liability assumed for damages
haerrors or omissions.
responsibilityZfor
resulting from the use of the information
n
contained
herein.
y
acl
JFirst
Printing: August 2008
Mikael Ronström, Subject Matter Expert


Trademarks
The copyright to this training guide is owned by Sun Microsystems. MySQL® and the MySQL logo are registered
trademarks of the Sun Microsystems MySQL product. Other trademarks and registered trademarks referred to in this manual
are the property of their respective owners, and are used for identification purposes only.
Warning and Disclaimers
Every effort has been made to make this training guide as complete and accurate as possible to meet the needs of the training
herein, but no warranty or fitness is implied. The information provided is on an “as is” basis.

i


Unauthorized reproduction or distribution prohibited Copyright© 2010, Oracle and/or its affiliates

MySQL High Availability

le
b
a
fer

ns
a
r
t
n
o
an
s
ha de

)
om Gui
c
ng dent
i
p
p Stu
o
h
s his
@
t
g
n
e
a
s
zh to u
c
a
j
(
se
g
n
n
e
lic
ha
Z

n

ly
c
a
J

ii


MySQL High Availability

Unauthorized reproduction or distribution prohibited Copyright© 2010, Oracle and/or its affiliates

Conventions Used in This Training Guide
This training guide uses certain typographical conventions:
• TEXT IN THIS STYLE is used for SQL statements; database, table, and column names; program listings and
source code; and environment variables. Example: “To reload the grant tables, use the FLUSH PRIVILEGES
statement.”
• Text in this style indicates input that you type in examples.
• Text in this style indicates the names of executable programs and scripts, examples being mysql (the MySQL
command line client program) and mysqld (the MySQL server executable).
• Text in this style is used for variable input for which you should substitute a value of your own
choosing.
• Filenames and directory names are written like this: “The global my.cnf file is located in the /etc directory.”
• Character sequences are written like this: “To specify a wildcard, use the '%' character.”
• Text in this style is used for emphasis.
When commands are shown that are meant to be executed from within a particular program, the prompt shown preceding
the command indicates which command to use. For example, shell> indicates a command that you execute from your
login shell, and mysql> indicates a statement that you execute from the mysql client program:

shell> type a shell command here
mysql> type a mysql statement here
The “shell” is your command interpreter. On Linux, this is typically a program such as sh, csh, or bash. On Windows, the
equivalent program is command.com or cmd.exe, typically run in a console window.
When you enter a command or statement shown in an example, do not type the prompt shown in the example.
Database, table, and column names must often be substituted into statements. To indicate that such substitution is
necessary, this manual uses db_name, tbl_name, and col_name. For example, you might see a statement like this:
mysql> SELECT col_name FROM db_name.tbl_name;
This means that if you were to enter a similar statement, you would supply your own database, table, and column names,
perhaps like this:
mysql> SELECT author_name FROM biblio_db.author_list;
SQL keywords are not case sensitive and may be written in any lettercase. This training guide uses uppercase.
In syntax descriptions, square brackets ('[' and ']') indicate optional words or clauses. For example, in the following
statement, IF EXISTS is optional:
DROP TABLE [IF EXISTS] tbl_name
When a syntax element consists of a number of alternatives, the alternatives are separated by vertical bars ('|'). When one
member from a set of choices may be chosen, the alternatives are listed within square brackets ('[' and ']'):
TRIM([[BOTH | LEADING | TRAILING] [remstr] FROM] str)
When one member from a set of choices must be chosen, the alternatives are listed within braces ('{' and '}'):
{DESCRIBE | DESC} tbl_name [col_name | wild]
An ellipsis (...) indicates the omission of a section of a statement, typically to provide a shorter version of more
complex syntax. For example, INSERT ... SELECT is shorthand for the form of INSERT statement that is followed
by a SELECT statement.
An ellipsis can also indicate that the preceding syntax element of a statement may be repeated. In the following example,
multiple reset_option values may be given, with each of those after the first preceded by commas:
RESET reset_option [,reset_option] ...
Commands for setting shell variables are shown using Bourne shell syntax. For example, the sequence to set the CC
environment variable and run the configure command looks like this in Bourne shell syntax:
shell> CC=gcc ./configure
If you are using csh or tcsh, you must issue commands somewhat differently:

shell> setenv CC gcc and shell> ./configure

le
b
a
fer

ns
a
r
t
n
o
an
s
ha de
)
om Gui
c
ng dent
i
p
p Stu
o
h
s his
@
t
g
n

e
a
s
zh to u
c
a
j
(
se
g
n
n
e
lic
ha
Z
n

ly
c
a
J

iii


MySQL High Availability

Supporting Images Used in This Training Guide
The following is a summary of the standard images used in this manual to support the instruction:


Unauthorized reproduction or distribution prohibited Copyright© 2010, Oracle and/or its affiliates

IMAGE

NAME

DESCRIPTION

Preparation

This image is used to describe the
steps required to be completed prior
to performing a hands-on exercise.

Written Exam

This image is used to identify that
the student is going to be tested
upon the material previously
presented in the instructional
material.

le
b
a
fer

ly
c

a
J

ns
a
r
t
n
o
an
s
ha de
)
i is used to convey to
mThis image
Further Practice
u
o
c
G
that there is a final
Lab
ntstudentto complete
ng dethe
i
exercise
prior to the
p
p
u

completion
of
the
chapter.
t
ho is S
s
@ Notes
th
gStudent
This image identifies an area on a
n
e
a
s
h
u
page designated for students to
z
o
c
t
write notes associated with the
a
j
e
(
s
class.
g

n
n lice
a
h
nZ
This image is used throughout the
Slide Number
123

InLine Lab

Throughout the course the instructor
will conduct labs in line with the
instruction, which are designed to
help you to understand the “nuts
and bolts” (inner-workings) of the
topic.

Boxes

course guide to indicate the
existence and number of a
corresponding instruction slide.

iv


MySQL High Availability

COURSE OBJECTIVES

5

Unauthorized reproduction or distribution prohibited Copyright© 2010, Oracle and/or its affiliates

This course is designed for experienced database administrators and system architects that want to analyze and form
a basis of understanding different high availability options, including clustering and replication solutions within
MySQL. This course will provide the tools required to make the decision of what high availability solution is
appropriate and how to implement a system with the correct design.
At the completion of this course, you should be able to:


Examine the design and limitations of MySQL replication



Describe the design and limitations around a shared-disk fail over solution



Analyze the design and limitations of MySQL cluster



Understand the differences with third-party clustering solutions, such as m/cluster



Develop a plan to implement the appropriate high availability solution

le

b
a
fer

6

ns
a
r
t
n
o
• Describe the future development path of the different solutions
an
s
• Discuss the different fail over solutions inherit in a high availability
hadesign
)
de
i
m
u
o
c
• Understand different cluster setups depending upon operating
system
G choices, such as LVM, Windows
t
n
Cluster Agent, Veritas Cluster Agent, etc. ing

p tude
p
o
Son highly available solutions
• Explore the impact of different backup
sh solutions
s
i
@
h
t tasks and how to maintain high availability while performing
g maintenance
n
e
• Identify the effects ofadifferent
s
these operations
zh to u
c
a
j
(
se
g
n
n
e
lic
ha
Z

n


Analyze the performance impact of a high availability decision



Recognize the business decision side of the solutions, such as cost and risk

ly
c
a
J

v


Unauthorized reproduction or distribution prohibited Copyright© 2010, Oracle and/or its affiliates

lyn

Jac
ble
era
nsf
-tra
non
sa
) ha de
com t Gui

n
ng
ppi ude
sho is St
ng@ e th
zha o us
(jac e t
ng licens
Zha


MySQL High Availability

Table

of

Contents

INTRODUCTION ................................................................................................................................................... 1-1
1.1
Learning Objectives ................................................................................................................................... 1-1
1.2
The MySQL Overview .............................................................................................................................. 1-2
1.2.1
MySQL Partners ................................................................................................................................ 1-3
1.3
MySQL Products ....................................................................................................................................... 1-4
1.3.1
MySQL Database Products................................................................................................................ 1-4

1.3.2
MySQL GUI Tools ............................................................................................................................ 1-6
1.3.3
Other MySQL Tools .......................................................................................................................... 1-6
1.3.4
MySQL Drivers ................................................................................................................................. 1-7
1.3.5
Solutions for Embedding MySQL ..................................................................................................... 1-7
1.4
MySQL Services........................................................................................................................................ 1-8
1.4.1
MySQL Training................................................................................................................................ 1-8
1.4.2
MySQL Certification ......................................................................................................................... 1-8
1.4.3
MySQL Consulting............................................................................................................................ 1-8
1.4.4
MySQL Support................................................................................................................................. 1-8
1.5
Community vs. Enterprise ......................................................................................................................... 1-9
1.6
Supported Operating Systems.................................................................................................................. 1-11
1.7
MySQL Certification Program ................................................................................................................ 1-12
1.8
Training Curriculum Paths....................................................................................................................... 1-13
1.9
MySQL Website ...................................................................................................................................... 1-15
1.9.1
MySQL Community Web Page ....................................................................................................... 1-16

1.10 Installing MySQL .................................................................................................................................... 1-18
1.11 Installing the "world" database ................................................................................................................ 1-22
1.12 Chapter Summary .................................................................................................................................... 1-23
2 INTRODUCTION TO MYSQL HIGH AVAILABILITY............................................................................................... 2-1
2.1
Overview.................................................................................................................................................... 2-1
2.2
What is High Availability? ........................................................................................................................ 2-2
2.2.1
Availability defined ........................................................................................................................... 2-2
2.2.2
Downtime........................................................................................................................................... 2-4
2.2.3
Scheduled vs. Unplanned Downtime ................................................................................................. 2-5
2.2.4
Business Impact ................................................................................................................................. 2-6
2.3
Overview of Availability Terminology...................................................................................................... 2-7
2.3.1
Asynchronous vs. Synchronous ......................................................................................................... 2-7
2.3.2
Replication vs. Clustering .................................................................................................................. 2-7
2.3.3
Shared-nothing vs. Shared-disk ......................................................................................................... 2-8
2.4
Third Party Software.................................................................................................................................. 2-9
2.4.1
Linux-HA........................................................................................................................................... 2-9
2.4.2
Windows Clustering........................................................................................................................... 2-9

2.4.3
Veritas Cluster Agent......................................................................................................................... 2-9
2.4.4
Red Hat Cluster Suite......................................................................................................................... 2-9
2.5
Heartbeat.................................................................................................................................................. 2-10
2.5.1
Configuration ................................................................................................................................... 2-10
2.5.2
Hardware.......................................................................................................................................... 2-10
2.6
Summary.................................................................................................................................................. 2-11
3 MYSQL REPLICATION ........................................................................................................................................ 3-1
3.1
Overview.................................................................................................................................................... 3-1
3.2
Basic architecture....................................................................................................................................... 3-2
3.3
Binary logging ........................................................................................................................................... 3-2
3.3.1
Statement Based Binary Logging ...................................................................................................... 3-5
3.3.2
Row based binary logging ................................................................................................................. 3-5
3.3.3
Row Based vs. Statement Based Binary Logging.............................................................................. 3-6
3.4
Replication threads and files...................................................................................................................... 3-9
3.4.1
Replication threads............................................................................................................................. 3-9
3.4.2

Replication files ................................................................................................................................. 3-9
3.5
Setting up MySQL Replication................................................................................................................ 3-10

Unauthorized reproduction or distribution prohibited Copyright© 2010, Oracle and/or its affiliates

1

le
b
a
fer

ns
a
r
t
n
o
an
s
ha de
)
om Gui
c
ng dent
i
p
p Stu
o

h
s his
@
t
g
n
e
a
s
zh to u
c
a
j
(
se
g
n
n
e
lic
ha
Z
n

ly
c
a
J

TOC-i



Unauthorized reproduction or distribution prohibited Copyright© 2010, Oracle and/or its affiliates

MySQL High Availability

3.6
Monitoring MySQL Replication.............................................................................................................. 3-13
3.6.1
Error Log.......................................................................................................................................... 3-14
3.6.2
Replication Slave I/O Thread States ................................................................................................ 3-15
3.6.3
Replication Slave SQL Thread States .............................................................................................. 3-16
3.7
Advantages and Disadvantages of MySQL Replication .......................................................................... 3-20
3.8
Advanced Replication Topologies ........................................................................................................... 3-21
3.8.1
Two-way Replication....................................................................................................................... 3-21
3.8.2
Circular Replication ......................................................................................................................... 3-24
3.9
Other Uses of Replication........................................................................................................................ 3-26
3.9.1
Controlled Switchover ..................................................................................................................... 3-26
3.9.2
Online Schema Changes .................................................................................................................. 3-26
3.9.3
Software Upgrades........................................................................................................................... 3-27

3.10 Replication Optimization ......................................................................................................................... 3-29
3.10.1 Different Storage Engines................................................................................................................ 3-29
3.10.2 Different Startup Variables .............................................................................................................. 3-29
3.10.3 Different Logical Structure .............................................................................................................. 3-30
3.10.4 Different Hardware .......................................................................................................................... 3-30
3.11 Summary.................................................................................................................................................. 3-33
4 MYSQL CLUSTER .............................................................................................................................................. 4-1
4.1
Overview.................................................................................................................................................... 4-1
4.2
Architecture ............................................................................................................................................... 4-2
4.2.1
Introduction........................................................................................................................................ 4-2
4.2.2
Node types ......................................................................................................................................... 4-2
4.2.3
Data storage ....................................................................................................................................... 4-3
4.2.4
High Availability ............................................................................................................................... 4-3
4.2.5
Limitations of MySQL Cluster .......................................................................................................... 4-6
4.2.6
Common use cases............................................................................................................................. 4-6
4.3
Setup of MySQL Cluster ........................................................................................................................... 4-8
4.3.1
Cluster Configuration......................................................................................................................... 4-8
4.3.1.1 Other Configuration Files ............................................................................................................ 4-10
4.3.2
Starting the Cluster .......................................................................................................................... 4-12

4.4
Managing the Cluster............................................................................................................................... 4-13
4.4.1
Logging............................................................................................................................................ 4-15
4.5
Cluster Asynchronous Replication........................................................................................................... 4-18
4.6
Cluster Pros and Cons.............................................................................................................................. 4-19
4.7
Summary.................................................................................................................................................. 4-22
5 SHARED DISK CLUSTERING ................................................................................................................................ 5-1
5.1
Overview.................................................................................................................................................... 5-1
5.2
Shared Disk Clustering Overview.............................................................................................................. 5-2
5.2.1
Active-Active vs. Active-Passive ...................................................................................................... 5-2
5.3
Active-Passive Setups................................................................................................................................ 5-3
5.4
Active-Active Clustering ........................................................................................................................... 5-4
5.5
Usage cases................................................................................................................................................ 5-8
5.5.1
Pros and Cons .................................................................................................................................... 5-8
5.5.2
Combining with Replication .............................................................................................................. 5-9
5.6
Summary.................................................................................................................................................. 5-10
6 OTHER CLUSTERING ........................................................................................................................................... 6-1

6.1
Learning Objectives ................................................................................................................................... 6-1
6.2
Continuent uni/cluster® Product Architecture........................................................................................... 6-2
6.2.1
Application Overview........................................................................................................................ 6-2
6.2.2
Access Continuent uni/cluster with MySQL...................................................................................... 6-2
6.2.3
Inside the controller ........................................................................................................................... 6-3
6.3
DRBD Details ............................................................................................................................................ 6-5
6.3.1
DRBD Compared to Other Technologies .......................................................................................... 6-5
6.3.2
Configuring DRBD for MySQL ........................................................................................................ 6-7

le
b
a
fer

ns
a
r
t
n
o
an
s

ha de
)
om Gui
c
ng dent
i
p
p Stu
o
h
s his
@
t
g
n
e
a
s
zh to u
c
a
j
(
se
g
n
n
e
lic
ha

Z
n

ly
c
a
J

TOC-ii


Unauthorized reproduction or distribution prohibited Copyright© 2010, Oracle and/or its affiliates

MySQL High Availability

6.4
DRBD and Heartbeat ................................................................................................................................. 6-9
6.4.1
Configuring DRBD and Heartbeat..................................................................................................... 6-9
6.4.2
Example failover scenarios .............................................................................................................. 6-10
6.4.3
Node Fencing and STONITH devices ............................................................................................. 6-11
6.5
Other DRBD Benefits .............................................................................................................................. 6-11
6.6
Additional Resources............................................................................................................................... 6-12
6.7
Summary.................................................................................................................................................. 6-17
7 SYSTEM MAINTENANCE IMPACTS....................................................................................................................... 7-1

7.1
Overview.................................................................................................................................................... 7-1
7.2
Introduction................................................................................................................................................ 7-2
7.3
Backups...................................................................................................................................................... 7-3
7.3.1
mysqldump......................................................................................................................................... 7-4
7.3.2
Storage engine specific tools.............................................................................................................. 7-5
7.3.3
Cold backup ....................................................................................................................................... 7-6
7.3.4
File system snapshots......................................................................................................................... 7-7
7.3.5
Summary of full backup options....................................................................................................... 7-8
7.3.6
Incremental Backups.......................................................................................................................... 7-9
7.4
Table Reorganization ............................................................................................................................... 7-11
7.5
Schema Alterations .................................................................................................................................. 7-13
7.6
Index Optimizations................................................................................................................................. 7-14
7.7
Conclusions.............................................................................................................................................. 7-16
7.8
Summary.................................................................................................................................................. 7-17
8 HIGH AVAILABILITY CONCLUSIONS ................................................................................................................... 8-1
8.1

Overview.................................................................................................................................................... 8-1
8.2
Overview of Availability Tools ................................................................................................................. 8-2
8.2.1
Replication ......................................................................................................................................... 8-2
8.2.2
MySQL Cluster.................................................................................................................................. 8-2
8.2.3
Shared Disk Clustering ...................................................................................................................... 8-3
8.2.4
DRBD ................................................................................................................................................ 8-3
8.2.5
High Availability Overview............................................................................................................... 8-4
8.3
Combinations ............................................................................................................................................. 8-5
8.4
Summary.................................................................................................................................................... 8-7
9 CONCLUSION ...................................................................................................................................................... 9-2
9.1
Course Objectives ...................................................................................................................................... 9-2
9.2
Training and Certification Website........................................................................................................... 9-3
9.3
Course Evaluation...................................................................................................................................... 9-5
9.4
THANK YOU! ......................................................................................................................................... 9-6
9.5
Q&A Session ............................................................................................................................................. 9-7

le

b
a
fer

ns
a
r
t
n
o
an
s
ha de
)
om Gui
c
ng dent
i
p
p Stu
o
h
s his
@
t
g
n
e
a
s

zh to u
c
a
j
(
se
g
n
n
e
lic
ha
Z
n

ly
c
a
J

Appendix A
Appendix B
Appendix C
Appendix D
Appendix E

Introduction to Linux ................................................................................................................... A-1
Basic vi commands .......................................................................................................................B-1
Test Question Keys .......................................................................................................................C-1
Further Practice Lab Solutions ..................................................................................................... D-1

Sequoia Clustering ........................................................................................................................E-1

TOC-iii


Unauthorized reproduction or distribution prohibited Copyright© 2010, Oracle and/or its affiliates

lyn

Jac
ble
era
nsf
-tra
non
sa
) ha de
com t Gui
n
ng
ppi ude
sho is St
ng@ e th
zha o us
(jac e t
ng licens
Zha


Unauthorized reproduction or distribution prohibited Copyright© 2010, Oracle and/or its affiliates


MySQL High Availability

CHAPTER 1
ns
a
r
t
n
o
an
s
ha de
)
om Gui
c
ng dent
i
p
p Stu
o
h
s his
@
t
g
n
e
a
s

zh to u
c
a
j
(
se
g
n
n
e
lic
ha
Z
n

le
b
a
fer

INTRODUCTION

ly
c
a
J


Unauthorized reproduction or distribution prohibited Copyright© 2010, Oracle and/or its affiliates


lyn

Jac
ble
era
nsf
-tra
non
sa
) ha de
com t Gui
n
ng
ppi ude
sho is St
ng@ e th
zha o us
(jac e t
ng licens
Zha


MySQL High Availability

1
8

INTRODUCTION

1.1


Learning Objectives

Unauthorized reproduction or distribution prohibited Copyright© 2010, Oracle and/or its affiliates

This chapter introduces you to MySQL products and services. In this chapter, you will learn:


The origin and status of the MySQL company



The MySQL products and professional services that are available



The definition of MySQL Enterprise and MySQL Community and their differences



Which operating systems are currently supported



What is available through the MySQL Community web page



What is the MySQL Certification program




Which courses are available to you after this course



How to install the MySQL Cluster Carrier Grade server on a Linux operating system

le
b
a
fer

ns
a
r
t
n
o
an
s
ha de
)
om Gui
c
ng dent
i
p
p Stu
o

h
s his
@
t
g
n
e
a
s
zh to u
c
a
j
(
se
g
n
n
e
lic
ha
Z
n

ly
c
a
J

_________________________________________________________________________________________________

_________________________________________________________________________________________________
_________________________________________________________________________________________________
Page 1-1


MySQL High Availability

1.2

MySQL is a Relational Database Management System
(RDBMS) that was originally developed by ‘MySQL
AB’. It was (and continues to be) developed and marketed
as a family of high performance, affordable database
servers and tools. Contributing to building the missioncritical, high-volume systems and products worldwide is
what makes MySQL the world’s most popular open
source database, as well as its reliability, excellent
performance and ease of use.

9

Unauthorized reproduction or distribution prohibited Copyright© 2010, Oracle and/or its affiliates

The MySQL Overview

MySQL is not only the world’s most popular open source
database. It is also the fastest growing database in the
industry, with up to 60,000 downloads per day, ranging
from large corporations to specialized embedded
applications.


MySQL is installed on every
continent in the world
le
b
a
(Yes, even Antarctica!)
fer

ns
a
r
t
n
o
an
s
ha de
)
om Gui
Sun Acquisition:
c
ng denInc.,t giving the MySQL product line the
i
In early 2008, MySQL AB was acquired by SunpMicrosystems,
p Together,
considerable resources of a formidable company.
tu Sun and MySQL will now provide global
o
h
S

s
enterprise-class support 24x7x365. Our enterprise-class
customers
worldwide can now take advantage of our
s
i of hardware, operating
@
h
t
market-leading open source database
on their choice
system and language with up to a
g
n
e
a
s
90%
lower
total
cost
of
ownership
than many traditional
h to u database solutions.
z
c
(ja nse
g
n lice

MySQL has always been, and will continue to be, a strong
a
h
supporter of the open source philosophy and the open source
Z
n
community, and strives to work with partners who share the
y
l
MySQL AB was founded in Sweden by two Swedes and
a Finn: David Axmark, Allan Larsson and Michael
"Monty" Widenius who have worked together since the
80's. MySQL AB (Swedish for “Inc.”) was the sole owner of the MySQL server source code, the MySQL
trademark and the mysql.com domain worldwide.

10

Jac

same values and mindset. This will be no different within Sun.
Sun is a world-leader in open source, with products and technologies such as Java, OpenSolaris, Open Office,
NetBeans, OpenSparc and many more.
The MySQL mission is still the same...
Make superior database software available and affordable to all!

_________________________________________________________________________________________________
_________________________________________________________________________________________________
_________________________________________________________________________________________________
Page 1-2



MySQL High Availability

1.2.1

Unauthorized reproduction or distribution prohibited Copyright© 2010, Oracle and/or its affiliates

11

MySQL Partners
MySQL has had the privilege of forming alliances with excellent partners and attracting some of the most
impressive customers in the industry! When you join our ranks, you are joining a winning team with a wide
variety of MySQL implementations. It never ceases to amaze us, the innovative and powerful ways in which
our tools are being used. To name only a few;
Education
• AUF (Agence Universitaire de la
Francophonie)
• University of California,
Berkeley
World Wide Web
• Yahoo!
• Wikipedia

le
b
a
fer

Finance
• Chicago Mercantile Exchange

• HypoVereinsbank

ns
a
r
t
n
o
Healthcare
an
• Finnish National Public Health Institute
s
• UNICEF
ha de
)
om Gui
c
Manufacturing
Technology
nt
ng • dApple
• Yamaha
i
e
p
p Stu• Motorola
• Epson
o
h
s his

@
Media
t Telecom
g
n
e
a
s
• BBC
• AT&T Wireless
h to u
z
c
• The Weather
Channel
• Nokia
a se
j
(
(Weather.com)
ng licen
a
h
Open Source Projects
Transport
nZ

ly
c
a

J

• PHProjekt
• eGroupWare

Retail
• Axfood AB
• Macy’s

• AXS Marine
• Viasuisse

Travel
• Continental Airlines
• Orbitz

"We have used MySQL far more than anyone expected. We went from experimental to mission-critical in a couple of
months."
Jeremy Zawodny--MySQL Database Expert Yahoo! Finance

_________________________________________________________________________________________________
_________________________________________________________________________________________________
_________________________________________________________________________________________________
Page 1-3


MySQL High Availability

1.3


MySQL Products

1.3.1

MySQL Database Products
Sun provides MySQL database products to meet the needs of ISV/OEM, Enterprise, and Community Server
users. MySQL database products are recognized for superior ease of use, performance, and reliability.

12

Unauthorized reproduction or distribution prohibited Copyright© 2010, Oracle and/or its affiliates

• MySQL Enterprise Server
o

The most reliable, secure and up-to-date version of the world's most popular open source database
for cost-effectively delivering E-commerce, Online Transaction Processing (OLTP), and multiterabyte Data Warehousing applications. (Available only with the MySQL Enterprise subscription).

• MySQL Community Server
o

The MySQL database server for open source developers and technology
enthusiasts who want to get started with MySQL. Supported by the large
MySQL open source community. Under the General Public License
(GPL), benefits to the open source community include a commercialgrade framework that is free of charge.

• MySQL Embedded Database

le
b

a
fer

ns
a
r
t
n
• MySQL Cluster
o
a navailable mission-critical
o A fault tolerant database clustering architecture for deployingshighly
database applications.
ha de
)
om Gui
c
ng dent
i
p
p Stu
o
h
s his
@
t
g
n
e
a

s
zh to u
c
a
j
(
se
g
n
n
e
lic
ha
Z
n
o

The most popular choice for OEMs/ISVs who want to cost-effectively embed or bundle a reliable
and high-performance relational database.

ly
c
a
J

_________________________________________________________________________________________________
_________________________________________________________________________________________________
_________________________________________________________________________________________________
Page 1-4



MySQL High Availability
MySQL Enterprise
13
A comprehensive set of enterprise-grade software, support and services to ensure the
highest levels of reliability, security and uptime. As a proactive service that helps you
eliminate problems before they occur, it gives you everything you need in a single, unified
offering to successfully develop and deploy business critical applications using MySQL.

Unauthorized reproduction or distribution prohibited Copyright© 2010, Oracle and/or its affiliates

• MySQL Enterprise Server
o The most reliable, secure and up-to-date version of the world's most popular open source
database for cost-effectively delivering E-commerce, Online Transaction Processing (OLTP),
and multi-terabyte Data Warehousing applications.
• MySQL Enterprise Monitor
o Services to ensure the maximum quality, uptime, and performance of MySQL Enterprise
systems.
• Production Support

le
b
a
fer

o Around-the-clock support for the MySQL Enterprise server, along with consulting services and
self-help knowledge resources.

ns
a

r
t
n
o
an
s
ha de
)
om Gui
c
ng dent
i
p
p Stu
o
h
s his
@
t
g
n
e
a
s
zh to u
c
a
j
(
se

g
n
n
e
lic
ha
Z
n

14

• Network Enterprise Dashboard:

ly
c
a
J

_________________________________________________________________________________________________
_________________________________________________________________________________________________
_________________________________________________________________________________________________
Page 1-5


MySQL High Availability

1.3.2
15

MySQL GUI Tools

The MySQL GUI Tools form a comprehensive graphical user interface to your MySQL database. These easy to
use graphical tools enable database Developers and Database Administrators
(DBAs) to be more productive.

Unauthorized reproduction or distribution prohibited Copyright© 2010, Oracle and/or its affiliates

• MySQL Migration Toolkit
o

Using a wizard-driven interface, the MySQL Migration
Toolkit implements a proven methodology and walks you through
the necessary steps to successfully complete a database migration
project.

• MySQL Administrator
o A powerful graphical administration console that enables you to easily administer your MySQL
environment and gain significantly better visibility into how your databases are operating.
• MySQL Query Browser

le
b
a
fer

o An extremely user-friendly graphical tool for creating, executing, and optimizing SQL queries
for your MySQL Database Server.

ns
a
r

t
- from the MySQL
The MySQL graphical user interface (GUI) tools discussed here come bundled together when downloaded
n
o
website.
an
s
ha de
)
om Gui
1.3.3 Other MySQL Tools
c
ng dent
i
p
16
MySQL has also developed additional tools to assist
p in theSusetuof the MySQL server:
o
h
s his
• MySQL Workbench
@
t
g
n
e
o MySQL Workbench
is a visual

database design tool developed by MySQL. It is
a
s
h tosuccessor
u application of the DBDesigner4 project. MySQL
the highly
zanticipated
c
a
j
Workbench
is
currently
available
for Microsoft Windows in a GPL licensed open
( editionnsasewell as a low-priced
g
source
n time saving
efeatures for professionals. standard edition which includes additional
a
c
i
l
h
n Z • MySQL Proxy
y
l
Jac
o MySQL Proxy is a simple program that sits between your

Bundled Tools

client and MySQL server(s) that can monitor, analyze or
transform their communication. Its flexibility allows for
unlimited uses; common ones include: load balancing;
failover; query analysis; query filtering and modification;
and many more.

_________________________________________________________________________________________________
_________________________________________________________________________________________________
_________________________________________________________________________________________________
Page 1-6


MySQL High Availability

1.3.4
17

MySQL Drivers
MySQL Connectors are database drivers, providing database client connectivity for a wide range of
programming languages. MySQL provides the following connectors:
• MySQL C API

Unauthorized reproduction or distribution prohibited Copyright© 2010, Oracle and/or its affiliates

o Our native client library (libmysql), which can be wrapped by other languages.
• MySQL Connector/ODBC
o Connect to a MySQL database server using the Open Database Connectivity (ODBC) API on all
Microsoft Windows and most Unix-like platforms. The ODBC driver builds on the client/server

protocol implementation provided by libmysql.
• MySQL Connector/J
o A JDBC (Java Database Connectivity) 4.0 driver for Java 1.4 and higher. Provides a java native
implementation of the MySQL client/server protocol.
• MySQL Connector/Net

le
b
a
fer

ns
a
r
t
n
o
• MySQL Connector/PHP
an
s
o Provides MySQL connectivity for PHP programs. Currently
MySQL specific PHP
hatheredareetwo
extensions available that use libmysql: the mysql) and mysqli
extensions.
There is also
i
u
om (PDO)
MySQL support for the generic PHP Databasecobjects

extension.
In
addition
there is the
G in the mysqli extension.
t
g
can
replace
libmysql
PHP native driver called mysqlnd which
n
in de
p
p
1.3.5 Solutions for Embedding MySQL
ho is Stu
s
@ clienttside
h connectivity, MySQL also provides libraries to embed a
gprovide
18
Apart from these Connectors that
n
e
a
MySQL database server within
h a program.
usCurrently the following solutions can be used to embed MySQL:
z

o
c
t
(ja nse
• libmysqld
g
no The embedded
e edition of the mysqld server program wrapped in a shared library. Allows the
a
c
i
l
h
MySQL Server to be embedded in C programs.
nZ
y
l
c
Ja
• MySQL MX/J
o A fully managed ADO.NET provider for the .NET framework (version 1.1 and 2.0). Provides a
.NET implementation of the MySQL client/server protocol.

o A jar wrapper around mysqld binaries. This allows java programs and J2EE environments to
instantiate (and install) a MySQL server.

_________________________________________________________________________________________________
_________________________________________________________________________________________________
_________________________________________________________________________________________________
Page 1-7



MySQL High Availability

1.4
1.4.1

MySQL Training
Sun Microsystems offers a comprehensive set of MySQL training courses that give you a competitive edge in
building world-class database solutions.

19

Unauthorized reproduction or distribution prohibited Copyright© 2010, Oracle and/or its affiliates

MySQL Services

• Courses can be chosen individually, as part of a bundle, and/or following our suggested curriculum
path for Developers and Database Administrators (DBAs).

1.4.2

MySQL Certification
MySQL Certification Program is a high quality certification program that provides Developers and DBAs with
the credentials to prove they have the knowledge, experience and skills to use and manage MySQL Server.
With MySQL personal certifications, you get to show that you are among the best-of-breed MySQL users and
lay the foundation for becoming a trusted and valuable resource for your company and customers.

1.4.3


MySQL Consulting

le
b
a
fer

ns
a
r
t
n
o
n will help you deliver
Using industry best practices and proven methodologies, your MySQL certified consultant
a
s
on-time and on-budget.
ha de
)
om Gui
c
1.4.4 MySQL Support
g ent
nTechnical
i
p
We also offer a full range of support options. MySQL
is designed to save you time and to
dandSupport

p
u
t
o
ensure you achieve the highest levels of performance,
reliability,
uptime.
sh his S
@
• Community support
g se t
n
a
o Mailing Lists
zh to u
c
a
j
o Forums
)
e
( (http:/
s/ forums.mysql.com/
g
n
n
e
lic Articles (http:/ / dev.mysql.com/ tech-resources/ articles)
haoo Community
Z

Bugs Database (http:/ / bugs.mysql.com/ )
yn
l
c
o No direct access to support engineers
Ja
o PlanetMySQL Blogs (http:/ / www.planetmysql.org/ )

We offer a full range of consulting services. Whether you are starting a new project, needing to optimize an
existing MySQL application, or migrating from a proprietary database to MySQL, we have an affordable
solution for you.

o MySQL Reference Manuals (http:/ / dev.mysql.com/ doc)
o MySQLForge (http:/ / forge.mysql.com/ )
• Purchased support
o Enterprise subscription
o Support for MySQL Cluster
o Support for MySQL Embedded (OEM/ISV)
o Online Knowledge Base

_________________________________________________________________________________________________
_________________________________________________________________________________________________
_________________________________________________________________________________________________
Page 1-8


MySQL High Availability

1.5


20

Community vs. Enterprise
There are many things to consider when choosing between using the Community server versus the Enterprise server
subscription. The following charts summarize the uses and requirements for each and do a comparison to assist in
understanding the differences.

Unauthorized reproduction or distribution prohibited Copyright© 2010, Oracle and/or its affiliates

How does the MySQL Community work?

MySQL Community

Open Source
Database
Server

New Ideas

le
b
a
fer

ns
a
r
t
n
o

n
a Bug
Constant Source
s
Code Drops
ha deReports…
)
om Gui Help, Forums…
Free Mgmt
c
Tools/Connectors
ng dent
i
p
p Stu
o
h
Help, Forums…
s his
Spread MySQL
@
t
Goodwill…
g
n
e
a
s
zh to u
c

a
j
(
sewhat MySQL provides to the user community. On the right side, is what our user
The left side
of
this chart shows
g
n
n
e
c to us, and to the entire community.
community
ha providesliback
Z
yn
l
c
a
Minimum Two
Binaries/Year
Fixes/Feature

Code
Contributions…

J

_________________________________________________________________________________________________
_________________________________________________________________________________________________

_________________________________________________________________________________________________
Page 1-9


21

MySQL High Availability
How does the MySQL Enterprise work?

Unauthorized reproduction or distribution prohibited Copyright© 2010, Oracle and/or its affiliates

Community /
Third Party
Development

MySQL
Community Server

Many Ideas /
Submissions

Selected Submissions
Become Features

Design/Development

Community Purpose




Community
Recommendations





Community Server Code
Contributions - Direct



MySQL
Enterprise Server



Delivery of Community
and Customer
Recommendations
Acceptance/Rejection of
Community Code
Contributions

Mature Features
Only

Enterprise Grade




Selected Feature Set for
Enterprise Installations



Predictable Service
Pack Schedule



Strong Internal Quality
Assurance Testing



External Quality
Assurance Testing

le
b
a
fer

ns
a
r
t
n
• Third party contributions

o
• Certified
• “As Needed” Release
a n for Popular
s
and
Schedule, including Bug
ha Platforms
e
Applications
Fixes and New Features )
id Technical Support
om G•uFormal
c
ng dent
i
p
p Stu
o
h
The above chart shows the progression of code
into the MySQL Enterprise Server; from user
s featurehiimplementation
sto further improvements
@
input, to MySQL Community Server g
placement/testing,
which are placed in the MySQL
t
n

e
Enterprise Server product.
a
h to us
z
c
(ja nse
g
n lice
a
h
nZ
y
l
ac
Community Code
Contributions – MySQL
Forge



Community Testing and
Validation

J

_________________________________________________________________________________________________
_________________________________________________________________________________________________
_________________________________________________________________________________________________
Page 1-10



MySQL High Availability
22

1.6

Supported Operating Systems

Unauthorized reproduction or distribution prohibited Copyright© 2010, Oracle and/or its affiliates

MySQL runs on more than 20 platforms, giving users the kind of flexibility that
puts them in control. Windows, Linux and Solaris are the most popular operating
systems for running MySQL. Versions of MySQL are currently available for the
following operating systems:
• Windows (multiple)

• Mac OS/X

• Open BSD

• Linux (multiple)

• HP-UX

• Solaris

• IBM AIX

• SGI Irix

• Novell NetWare

• FreeBSD

• QNX

This list is continually being updated. For the most current information, please check our website:
http:/ / www.mysql.com . Source code and special builds are also available.

le
b
a
fer

ns
a
r
t
n
o
an
s
ha de
)
om Gui
c
ng dent
i
p
p Stu

o
h
s his
@
t
g
n
e
a
s
zh to u
c
a
j
(
se
g
n
n
e
lic
ha
Z
n

ly
c
a
J


_________________________________________________________________________________________________
_________________________________________________________________________________________________
_________________________________________________________________________________________________
Page 1-11


×