mysql no windows
DESCRIPTION
Por que MySQL no Windows?Ambiente de desenvolvimento em 5 minutosMySQL com alta-disponibilidade no WindowsTRANSCRIPT
![Page 1: MySQL no Windows](https://reader034.vdocuments.net/reader034/viewer/2022052212/5560c1add8b42a033c8b567b/html5/thumbnails/1.jpg)
<Insert Picture Here>
Marcos Trujillo [email protected]
Airton Lastori [email protected]
nov-2011
MySQL no Windows
![Page 2: MySQL no Windows](https://reader034.vdocuments.net/reader034/viewer/2022052212/5560c1add8b42a033c8b567b/html5/thumbnails/2.jpg)
Agenda
• Por que MySQL no Windows?
• Ambiente de desenvolvimento em 5 minutos
• MySQL com alta-disponibilidade no Windows
![Page 3: MySQL no Windows](https://reader034.vdocuments.net/reader034/viewer/2022052212/5560c1add8b42a033c8b567b/html5/thumbnails/3.jpg)
Por que MySQL no Windows?
![Page 4: MySQL no Windows](https://reader034.vdocuments.net/reader034/viewer/2022052212/5560c1add8b42a033c8b567b/html5/thumbnails/4.jpg)
Alguns clientes
![Page 5: MySQL no Windows](https://reader034.vdocuments.net/reader034/viewer/2022052212/5560c1add8b42a033c8b567b/html5/thumbnails/5.jpg)
fonte: alexa.com/topsites 17-ago-2011
Top websites
![Page 6: MySQL no Windows](https://reader034.vdocuments.net/reader034/viewer/2022052212/5560c1add8b42a033c8b567b/html5/thumbnails/6.jpg)
Quem usa MySQL – Top 10 Websites
1.Google
2.Facebook
3.Youtube
4.Yahoo!
5.Blogger.com
6.Baidu.com
7.Wikipedia
8.Windows Live
9.Twitter
10.QQ.com
fonte: alexa.com/topsites 17-ago-2011
![Page 7: MySQL no Windows](https://reader034.vdocuments.net/reader034/viewer/2022052212/5560c1add8b42a033c8b567b/html5/thumbnails/7.jpg)
Foco MySQL – Áreas
![Page 8: MySQL no Windows](https://reader034.vdocuments.net/reader034/viewer/2022052212/5560c1add8b42a033c8b567b/html5/thumbnails/8.jpg)
Investimento Oracle no MySQL Inovação Acelerada
Fazer o MySQL um Melhor MySQL • #1 BD Open Source para Web Applications
• LAMP Stack mais completo do mercado
• Telecom, Embedded & Windows
Desenvolver, Promover e Suportar o MySQL • Melhorias na Engenharia, Suporte e Consultoria
• Suporte Oracle 24x7 de alto-nível
MySQL Community Edition • Releases do código-fonte e binários
• GPL
![Page 9: MySQL no Windows](https://reader034.vdocuments.net/reader034/viewer/2022052212/5560c1add8b42a033c8b567b/html5/thumbnails/9.jpg)
Cross-Platform
Lower TCO Performance
Ease of Use
4 motivos para investir MySQL+Windows
![Page 10: MySQL no Windows](https://reader034.vdocuments.net/reader034/viewer/2022052212/5560c1add8b42a033c8b567b/html5/thumbnails/10.jpg)
MySQL vs Microsoft SQL Server
- Term: 3 Years
- Users: Unlimited (web)
- Servers: 4
- Hardware: Intel x86
- CPUs/Server: 4
- Cores/CPU: 4
- MySQL: MySQL Enterprise Edition
- Microsoft: SQL Server Enterprise Edition
![Page 11: MySQL no Windows](https://reader034.vdocuments.net/reader034/viewer/2022052212/5560c1add8b42a033c8b567b/html5/thumbnails/11.jpg)
MySQL 5.5 on Windows
MySQL 5.1.50
(InnoDB built-in)
MySQL 5.1.50
(InnoDB Plug-in)
MySQL 5.5.6
(New InnoDB)
SysBench Benchmark
Intel x86_64
4 CPU x 2 Cores/CPU
3.166 GHz, 8GB RAM
Windows Server 2008
540% performance gain
for MySQL 5.5 over 5.1.50; at scale
![Page 12: MySQL no Windows](https://reader034.vdocuments.net/reader034/viewer/2022052212/5560c1add8b42a033c8b567b/html5/thumbnails/12.jpg)
MySQL 5.5 on Windows
MySQL 5.1.50
(InnoDB built-in)
MySQL 5.1.50
(InnoDB Plug-in)
MySQL 5.5.6
(New InnoDB)
SysBench Benchmark
Intel x86_64
4 CPU x 2 Cores/CPU
3.166 GHz, 8GB RAM
Windows Server 2008
1560% performance gain
for MySQL 5.5 over 5.1.50; at scale
![Page 13: MySQL no Windows](https://reader034.vdocuments.net/reader034/viewer/2022052212/5560c1add8b42a033c8b567b/html5/thumbnails/13.jpg)
Flexibilidate Multi-Plataforma MySQL
• Suporte para 20+ plataformas
• Sem lock-in de fornecedores
• Permite uso de LAMP stack em aplicações Web
• OEM/ISVs embarcando MySQL em mais mercados
com mais flexibilidade para o usuário final
http://mysql.com/support/supportedplatforms/database.html
![Page 14: MySQL no Windows](https://reader034.vdocuments.net/reader034/viewer/2022052212/5560c1add8b42a033c8b567b/html5/thumbnails/14.jpg)
Facilidade de Uso & Administração
• Desenhado para ser fácil de usar (ex. regra 15min)
• Mais de 2.000 OEM/ISVs distribuem o MySQL como
“BD Embarcado Zero Admin”
• Integração com ambiente Windows nos RDBMS,
conectores e ferramentas
• Tipicamente não requer time exclusivo de DBAs
• Popularidade do MySQL: conhecimento disseminado
• Suporte e Ferramentas Enterprise:
• MySQL Workbench SE
• MySQL Enterprise Monitor
• MySQL Query Analyzer
• MySQL Enterprise Backup
![Page 15: MySQL no Windows](https://reader034.vdocuments.net/reader034/viewer/2022052212/5560c1add8b42a033c8b567b/html5/thumbnails/15.jpg)
Subscrições MySQL V
alo
r A
gre
gad
o
Cluster
Enterprise +
• Cluster Manager
Enterprise
Edition
Standard +
• Plug-Ins
• Enterprise Monitor
• Enterprise Backup
Standard
Edition
• MySQL Database
• Premier Support
• Workbench SE
![Page 16: MySQL no Windows](https://reader034.vdocuments.net/reader034/viewer/2022052212/5560c1add8b42a033c8b567b/html5/thumbnails/16.jpg)
Subscrições MySQL V
alo
r A
gre
gad
o
Cluster
Enterprise +
• Cluster Manager
Enterprise
Edition
Standard +
• Plug-Ins
• Enterprise Monitor
• Enterprise Backup
Standard
Edition
• MySQL Database
• Premier Support
• Workbench SE
![Page 17: MySQL no Windows](https://reader034.vdocuments.net/reader034/viewer/2022052212/5560c1add8b42a033c8b567b/html5/thumbnails/17.jpg)
Oracle Suporte para o MySQL
* MySQL Premier Support – 5 anos, começando pelo GA
![Page 18: MySQL no Windows](https://reader034.vdocuments.net/reader034/viewer/2022052212/5560c1add8b42a033c8b567b/html5/thumbnails/18.jpg)
Suporte Consultivo MySQL
DBA e
Desenvolvedores
![Page 19: MySQL no Windows](https://reader034.vdocuments.net/reader034/viewer/2022052212/5560c1add8b42a033c8b567b/html5/thumbnails/19.jpg)
![Page 20: MySQL no Windows](https://reader034.vdocuments.net/reader034/viewer/2022052212/5560c1add8b42a033c8b567b/html5/thumbnails/20.jpg)
![Page 21: MySQL no Windows](https://reader034.vdocuments.net/reader034/viewer/2022052212/5560c1add8b42a033c8b567b/html5/thumbnails/21.jpg)
Subscrições MySQL V
alo
r A
gre
gad
o
Cluster
Enterprise +
• Cluster Manager
Enterprise
Edition
Standard +
• Plug-Ins
• Enterprise Monitor
• Enterprise Backup
Standard
Edition
• MySQL Database
• Premier Support
• Workbench SE
![Page 22: MySQL no Windows](https://reader034.vdocuments.net/reader034/viewer/2022052212/5560c1add8b42a033c8b567b/html5/thumbnails/22.jpg)
Extensões Comerciais
• Enterprise Security • Plug-In: MySQL External Authentication
• Enterprise Scalability • Plug-In: MySQL Thread Pool
![Page 23: MySQL no Windows](https://reader034.vdocuments.net/reader034/viewer/2022052212/5560c1add8b42a033c8b567b/html5/thumbnails/23.jpg)
Windows Authentication: Exemplo
Connector
Connect as
1. MyDomain\joe faz login
na aplicação com senha
Windows
Connected
Authenticate
CREATE USER win_joe
IDENTIFIED WITH authentication_windows
AS ‘joe';
App
LDAP/AD Windows
Auth
Connect as
2. MyDomain\joe é
autenticado via
LDAP/AD Connect as
4. Tokens são verificados, o
usuário win_joe é autenticado
com Windows login, porém
com privilégios do MySQL.
Connect as
3. A aplicação conecta-se
ao MySQL com usuário
win_joe.
![Page 24: MySQL no Windows](https://reader034.vdocuments.net/reader034/viewer/2022052212/5560c1add8b42a033c8b567b/html5/thumbnails/24.jpg)
Com Thread Pooling Habilitado
Sysbench OLTP: Read Only
Performance
0
2000
4000
6000
8000
10000
12000
14000
16000
16 32 64 128 256 512 1,0242,0484,096
Simultaneous Database Connections
Tra
nsacti
on
s P
er
Seco
nd
Without Thead Pool
With Thead Pool
• MySQL 5.5.7
• Oracle Linux 5, Unbreakable Kernel
2.6.32
• 4 sockets, 48 cores, 4 X 12-core
AMD Opteron 6172 “Magny-Cours”
2.1GHz CPUs
• 64 GB DDR2 RAM
• 2 X Intel X25E SSD Drives
![Page 25: MySQL no Windows](https://reader034.vdocuments.net/reader034/viewer/2022052212/5560c1add8b42a033c8b567b/html5/thumbnails/25.jpg)
Com Thread Pooling Habilitado
Sysbench OLTP: Read / Write
Performance
0
2000
4000
6000
8000
10000
16 32 64 128 256 512 1,0242,0484,096
Simultaneous Database Connections
Tra
nsacti
on
s P
er
Seco
nd
Without Thead Pool
With Thead Pool
• MySQL 5.5.7
• Oracle Linux 5, Unbreakable Kernel
2.6.32
• 4 sockets, 48 cores, 4 X 12-core
AMD Opteron 6172 “Magny-Cours”
2.1GHz CPUs
• 64 GB DDR2 RAM
• 2 X Intel X25E SSD Drives
![Page 26: MySQL no Windows](https://reader034.vdocuments.net/reader034/viewer/2022052212/5560c1add8b42a033c8b567b/html5/thumbnails/26.jpg)
• Visão única e consolidada em todo o ambiente MySQL
• Auto-descoberta dos servidores MySQL, topologias de replicação
• Regras personalizáveis de monitorização e alertas
• Identificação de problemas antes que eles ocorram
• Reduz o risco de inatividade
• Facilita “scale out” sem exigir mais DBAs
Assistente virtual do DBA MySQL!
MySQL Enterprise Monitor
http://mysql.com/trials/
![Page 27: MySQL no Windows](https://reader034.vdocuments.net/reader034/viewer/2022052212/5560c1add8b42a033c8b567b/html5/thumbnails/27.jpg)
MySQL Enterprise Monitor: Query Analyzer
![Page 28: MySQL no Windows](https://reader034.vdocuments.net/reader034/viewer/2022052212/5560c1add8b42a033c8b567b/html5/thumbnails/28.jpg)
MySQL Enterprise Backup
• Anteriormente “InnoDB Hot Backup”
• Online, non-locking backup & recovery • Tables, Indexes
• Server, database, ou object-level
• Backups Lógico e Físico
• Backups Completos ou Incrementais
• Point-in-time recovery
• Backups Comprimidos
• Também oferece backup e recuperação para MyISAM
• Multi-plataforma (Windows, Linux, Unix)
http://mysql.com/trials/
![Page 29: MySQL no Windows](https://reader034.vdocuments.net/reader034/viewer/2022052212/5560c1add8b42a033c8b567b/html5/thumbnails/29.jpg)
Backups
Backups são até 3.5x mais rápidos do que mysqldump
![Page 30: MySQL no Windows](https://reader034.vdocuments.net/reader034/viewer/2022052212/5560c1add8b42a033c8b567b/html5/thumbnails/30.jpg)
Restores
Restore é até 16x mais rápido do que mysqldump
- mysqldump performance não é linear (mais tables/indexes impacta na performance)
- MySQL Enterprise performance é quase linear
![Page 31: MySQL no Windows](https://reader034.vdocuments.net/reader034/viewer/2022052212/5560c1add8b42a033c8b567b/html5/thumbnails/31.jpg)
Compressão do Backup
O tamanho do Backup é reduzido de 65% até 93%
![Page 32: MySQL no Windows](https://reader034.vdocuments.net/reader034/viewer/2022052212/5560c1add8b42a033c8b567b/html5/thumbnails/32.jpg)
Subscrições MySQL V
alo
r A
gre
gad
o
Cluster
Enterprise +
• Cluster Manager
Enterprise
Edition
Standard +
• Plug-Ins
• Enterprise Monitor
• Enterprise Backup
Standard
Edition
• MySQL Database
• Premier Support
• Workbench SE
![Page 33: MySQL no Windows](https://reader034.vdocuments.net/reader034/viewer/2022052212/5560c1add8b42a033c8b567b/html5/thumbnails/33.jpg)
Como o MySQL Cluster Manager Ajuda?
Examplo: Upgrade do MySQL Cluster 6.3 to 7.1
• 1 x verificação preliminar do estado do Cluster
• 8 x comandos ssh por servidor
• 8 x comandos stop por processo
• 4 x edições dos arquivos de configuaração (2 x
mgmd & 2 x mysqld)
• 8 x comandos start por processo
• 8 x verificações do processo start e re-joined
• 8 x verificações de processos completos
• 1 x verificação de todo o cluster.
• Reedição manual de cada arquivo de configuração.
Total: 46 comandos – 2h30min. de interação
Sem MySQL Cluster Manager Com MySQL Cluster Manager
upgrade cluster --package=7.1 mycluster;
Total: 1 Comando
Resultados Redução de overhead e simplificação de
administração.
Reduz risco de downtime por erro do
administrador.
![Page 34: MySQL no Windows](https://reader034.vdocuments.net/reader034/viewer/2022052212/5560c1add8b42a033c8b567b/html5/thumbnails/34.jpg)
Ambiente de
desenvolvimento em
5 minutos
![Page 35: MySQL no Windows](https://reader034.vdocuments.net/reader034/viewer/2022052212/5560c1add8b42a033c8b567b/html5/thumbnails/35.jpg)
dev.mysql.com/downloads
MySQL Installer
![Page 36: MySQL no Windows](https://reader034.vdocuments.net/reader034/viewer/2022052212/5560c1add8b42a033c8b567b/html5/thumbnails/36.jpg)
![Page 37: MySQL no Windows](https://reader034.vdocuments.net/reader034/viewer/2022052212/5560c1add8b42a033c8b567b/html5/thumbnails/37.jpg)
![Page 38: MySQL no Windows](https://reader034.vdocuments.net/reader034/viewer/2022052212/5560c1add8b42a033c8b567b/html5/thumbnails/38.jpg)
Plataformas Windows para MySQL
Arquitetura x86 32 & 64 bit:
• Windows 2008
• Windows 2008 RC
• Windows 7
• Windows Vista
• Windows 2003 Server
• Windows XP
![Page 39: MySQL no Windows](https://reader034.vdocuments.net/reader034/viewer/2022052212/5560c1add8b42a033c8b567b/html5/thumbnails/39.jpg)
Windows Connectors
Desenvolvidos pela Oracle
• Connector/NET ADO.NET
• Connector/ODBC ODBC
• Connector/J JDBC
• Connector/C C API
• Connector/C++ C++ API
Comunidade
• PHP
• Perl
• Python
• Ruby
Suporte à diversas linguagens
www.mysql.com/products/connector
![Page 40: MySQL no Windows](https://reader034.vdocuments.net/reader034/viewer/2022052212/5560c1add8b42a033c8b567b/html5/thumbnails/40.jpg)
Windows Connectors
Desenvolvidos pela Oracle
• Connector/NET ADO.NET
• Connector/ODBC ODBC
• Connector/J JDBC
• Connector/C C API
• Connector/C++ C++ API
Comunidade
• PHP
• Perl
• Python
• Ruby
Suporte Windows
www.mysql.com/products/connector
![Page 41: MySQL no Windows](https://reader034.vdocuments.net/reader034/viewer/2022052212/5560c1add8b42a033c8b567b/html5/thumbnails/41.jpg)
MySQL Connector/ODBC
![Page 42: MySQL no Windows](https://reader034.vdocuments.net/reader034/viewer/2022052212/5560c1add8b42a033c8b567b/html5/thumbnails/42.jpg)
Connector/NET
• Crie aplicações .NET facilmente
• C#,
• ASP.NET
• VB.net
• Connector/Net
• Implementa interfaces ADO.NET
• Integra com ferramentas ADO.NET aware
• Driver ADO.NET totalmente gerenciado
• Open Source, escrito 100% em C#
![Page 43: MySQL no Windows](https://reader034.vdocuments.net/reader034/viewer/2022052212/5560c1add8b42a033c8b567b/html5/thumbnails/43.jpg)
Integração Visual Studio + MySQL
![Page 44: MySQL no Windows](https://reader034.vdocuments.net/reader034/viewer/2022052212/5560c1add8b42a033c8b567b/html5/thumbnails/44.jpg)
Tables Views
Columns Stored Procs & Functions
Indexes Triggers
Foreign Keys User-Defined Functions (UDF)
Column & Table Properties Cloning Database Objects
Using ADO.NET Entity Framework
MySQL SQL Editor
DDL T4 Template Macro MySQL Website Configuration Tool
Integração Visual Studio + MySQL
editando objetos do BD
![Page 45: MySQL no Windows](https://reader034.vdocuments.net/reader034/viewer/2022052212/5560c1add8b42a033c8b567b/html5/thumbnails/45.jpg)
Links Connector/NET
• Visual Studio integration http://dev.mysql.com/doc/refman/5.5/en/connector-net-visual-studio.html
• Connector/NET download http://www.mysql.com/downloads/connector/net/
• Exploring MySQL in the Microsoft .NET Environment http://dev.mysql.com/tech-resources/articles/dotnet/index.html
• Using MySQL With .NET/C#/Visual Basic/Powershell http://dev.mysql.com/usingmysql/dotnet/
![Page 46: MySQL no Windows](https://reader034.vdocuments.net/reader034/viewer/2022052212/5560c1add8b42a033c8b567b/html5/thumbnails/46.jpg)
MySQL para DBAs SQL Server
MySQL Users, Databases & Schemas são gerenciados
de modo similar ao SQL Server
Particionamento e outros recursos avançados
presentes tanto na edição Community quanto Enterprise
Replicação e alta-disponibilidade em poucos minutos
para implementar e com fácil manutenção
![Page 47: MySQL no Windows](https://reader034.vdocuments.net/reader034/viewer/2022052212/5560c1add8b42a033c8b567b/html5/thumbnails/47.jpg)
MySQL para DBAs SQL Server
Online “Hot” Backup com MySQL Enterprise Backup
Data Types & Stored Procedures
Datatypes
![Page 48: MySQL no Windows](https://reader034.vdocuments.net/reader034/viewer/2022052212/5560c1add8b42a033c8b567b/html5/thumbnails/48.jpg)
MySQL com
alta-disponibilidade no
Windows
![Page 49: MySQL no Windows](https://reader034.vdocuments.net/reader034/viewer/2022052212/5560c1add8b42a033c8b567b/html5/thumbnails/49.jpg)
% 9 9 9 9 35 dias 4 days 50 min 5 min 8 horas
Replicação
Clustering &
Virtualização
Clustering &
Redundância
Geográfica
ISPs &
Corporativo
On-Line
Services
eCommerce
Telecoms
Militar
. 9 .
4 dias
Cu
sto
& C
om
ple
xid
ad
e
Alta disponibilidade
![Page 50: MySQL no Windows](https://reader034.vdocuments.net/reader034/viewer/2022052212/5560c1add8b42a033c8b567b/html5/thumbnails/50.jpg)
% 9 9 9 9 35 dias 4 days 50 min 5 min 8 horas
Replicação
ISPs &
Corporativo
On-Line
Services
eCommerce
Telecoms
Militar
.
Replication
9 . 4 dias
Cu
sto
& C
om
ple
xid
ad
e
Alta disponibilidade
![Page 51: MySQL no Windows](https://reader034.vdocuments.net/reader034/viewer/2022052212/5560c1add8b42a033c8b567b/html5/thumbnails/51.jpg)
Writes & Reads Reads Reads
• Escreva para 1 Master
• Leia de vários Slaves, adicione mais quando necessário
• Perfeito para aplicações de leitura intensiva
Aplicação
Replicação MySQL
Load Balancer
Replicação possibilita escalabilidade
![Page 52: MySQL no Windows](https://reader034.vdocuments.net/reader034/viewer/2022052212/5560c1add8b42a033c8b567b/html5/thumbnails/52.jpg)
% 9 9 9 9 35 dias 4 days 50 min 5 min 8 horas
Clustering &
Redundância
Geográfica
ISPs &
Corporativo
On-Line
Services
eCommerce
Telecoms
Militar
. 9 .
4 dias
Cu
sto
& C
om
ple
xid
ad
e
Alta disponibilidade
![Page 53: MySQL no Windows](https://reader034.vdocuments.net/reader034/viewer/2022052212/5560c1add8b42a033c8b567b/html5/thumbnails/53.jpg)
MySQL Cluster
Alta Performance escalabilidade de escrita & baixíssima latência
Disponibilidade 99,999%
Flexibilidade vários métodos de acesso à dados (SQL+NoSQL)
Baixo TCO open source + hardware commodity
![Page 54: MySQL no Windows](https://reader034.vdocuments.net/reader034/viewer/2022052212/5560c1add8b42a033c8b567b/html5/thumbnails/54.jpg)
Data Nodes
Node Group 1
F1
F3
F3
F1
No
de
1
No
de
2
Node Group 2
F2
F4
F4
F2
No
de
3
No
de
4
Application Nodes
Cluster
Mgmt
Cluster
Mgmt
LDAP REST
MySQL Cluster Application Nodes
NDB API
Arquitetura MySQL Cluster
![Page 55: MySQL no Windows](https://reader034.vdocuments.net/reader034/viewer/2022052212/5560c1add8b42a033c8b567b/html5/thumbnails/55.jpg)
Data Nodes
Node Group 1
F1
F3
F3
F1
No
de
1
No
de
2
Node Group 2
F2
F4
F4
F2
No
de
3
No
de
4
Application Nodes
Cluster
Mgmt
Cluster
Mgmt
LDAP REST
MySQL Cluster Application Nodes
NDB API
Arquitetura MySQL Cluster
![Page 56: MySQL no Windows](https://reader034.vdocuments.net/reader034/viewer/2022052212/5560c1add8b42a033c8b567b/html5/thumbnails/56.jpg)
MySQL Cluster 7.1 Benchmarks
Performance +4 Milhões de Queries por Segundo! • 8 servidores Intel commodity
• CPU 2.93GHz, 6 core Intel
• 24GB RAM cada
• 2 Data Nodes por servidor
Escalabilidade horizontal em hardware commodity • Com 16 servidores, chegou-se a
6,82 Milhões QPS
• baixo TCO
Resultados confirmados • mikaelronstrom.blogspot.com
• Iniciativa independente
• 2 dias de testes
![Page 57: MySQL no Windows](https://reader034.vdocuments.net/reader034/viewer/2022052212/5560c1add8b42a033c8b567b/html5/thumbnails/57.jpg)
% 9 9 9 9 35 dias 4 days 50 min 5 min 8 horas
Clustering &
Virtualização
ISPs &
Corporativo
On-Line
Services
eCommerce
Telecoms
Militar
. 9 .
4 dias
Cu
sto
& C
om
ple
xid
ad
e
Alta disponibilidade
![Page 58: MySQL no Windows](https://reader034.vdocuments.net/reader034/viewer/2022052212/5560c1add8b42a033c8b567b/html5/thumbnails/58.jpg)
App
Virtual IP
Data Bin
Slave App App
Vote
MySQL e Windows Clustering
![Page 59: MySQL no Windows](https://reader034.vdocuments.net/reader034/viewer/2022052212/5560c1add8b42a033c8b567b/html5/thumbnails/59.jpg)
Pré-requisitos
• MySQL 5.5 & InnoDB devem
ser usados como BD (MyISAM
não é crash-safe e o failover
pode resultar em um BD
corrompido)
• Windows Server 2008 R2
• Conexões de rede
reduntantes para hosts e
storage
• WSFC cluster validation
deve passar com sucesso
• iSCSI ou FCAL SAN deve
ser usado como storage
compartilhado
![Page 60: MySQL no Windows](https://reader034.vdocuments.net/reader034/viewer/2022052212/5560c1add8b42a033c8b567b/html5/thumbnails/60.jpg)
Passo 1/7
Configure iSCSI via software (opcional)
![Page 61: MySQL no Windows](https://reader034.vdocuments.net/reader034/viewer/2022052212/5560c1add8b42a033c8b567b/html5/thumbnails/61.jpg)
Passo 2/7
Habilite a opção Windows Failover
Clustering
![Page 62: MySQL no Windows](https://reader034.vdocuments.net/reader034/viewer/2022052212/5560c1add8b42a033c8b567b/html5/thumbnails/62.jpg)
Passo 3/7
Instale o MySQL como serviço em
ambos servidores
![Page 63: MySQL no Windows](https://reader034.vdocuments.net/reader034/viewer/2022052212/5560c1add8b42a033c8b567b/html5/thumbnails/63.jpg)
Passo 4/7
Migre binários MySQL binaries &
dados para shared storage
1. Pare os serviços MySQL
2. Modifique as pastas no arquivo de configuração
3. Copie os dados e binários para o drive compartilhado
De Para
C:\Program Files\MySQL\MySQL Server 5.5 F:\MySQL Server 5.5
C:\ProgramData\MySQL\MySQL Server 5.5\data F:\MySQL Data
![Page 64: MySQL no Windows](https://reader034.vdocuments.net/reader034/viewer/2022052212/5560c1add8b42a033c8b567b/html5/thumbnails/64.jpg)
Passo 5/7
Crie o Windows Failover Cluster
![Page 65: MySQL no Windows](https://reader034.vdocuments.net/reader034/viewer/2022052212/5560c1add8b42a033c8b567b/html5/thumbnails/65.jpg)
Passo 6/7
Crie Cluster de MySQL Servers com
Windows Cluster
![Page 66: MySQL no Windows](https://reader034.vdocuments.net/reader034/viewer/2022052212/5560c1add8b42a033c8b567b/html5/thumbnails/66.jpg)
Passo 7/7
Teste o Windows Cluster
1. conecte a aplicação
pelo Virtual IP Address
2. durante a migração ou
failover, o WSFC vai
alternar o Virtual IP
entre os servidores
3. a aplicação deve
gerenciar a falha das
transações em curso
ws3 ws1
ws2
slave
192.168.2.4
192.168.2.6
192.168.5.1
192.168.2.6
192.168.2.4
192.168.2.1
192.168.5.3
192.168.5.2
VIP 192.168.2.1
8
192.168.2.1
![Page 67: MySQL no Windows](https://reader034.vdocuments.net/reader034/viewer/2022052212/5560c1add8b42a033c8b567b/html5/thumbnails/67.jpg)
Links MySQL + Windows Clustering
• MySQL with Windows Server 2008 R2 Failover Clustering www.clusterdb.com/mysql/mysql-with-windows-server-2008-r2-failover-
clustering
• White-paper Windows Failover Clustering www.mysql.com/why-mysql/white-
papers/mysql_wp_windows_failover_clustering.php
![Page 68: MySQL no Windows](https://reader034.vdocuments.net/reader034/viewer/2022052212/5560c1add8b42a033c8b567b/html5/thumbnails/68.jpg)
Mais sobre MySQL
![Page 69: MySQL no Windows](https://reader034.vdocuments.net/reader034/viewer/2022052212/5560c1add8b42a033c8b567b/html5/thumbnails/69.jpg)
MySQL Treinamento e Certificação
MySQL Boot Camp
Accelerated
MySQL Performance
Tuning Boot Camp
Accelerated
MySQL for Begginers
MySQL for Database
Administrators
MySQL Performance
Tuning
MySQL High
Availability
MySQL Cluster
MySQL DBA
MySQL Boot Camp
Accelerated
MySQL for Developers
MySQL Performance
Tuning Boot Camp
Accelerated
MySQL for Begginers
MySQL and PHP
Developing Dynamic
Web Applicationg
MySQL Advanced
Stored Procedures
MySQLDeveloper
http://education.oracle.com
Treinamentos
Certificações
Opcional
Necessário
![Page 70: MySQL no Windows](https://reader034.vdocuments.net/reader034/viewer/2022052212/5560c1add8b42a033c8b567b/html5/thumbnails/70.jpg)
07-dez-2011
Registre-se: http://bit.ly/usLQoD
![Page 71: MySQL no Windows](https://reader034.vdocuments.net/reader034/viewer/2022052212/5560c1add8b42a033c8b567b/html5/thumbnails/71.jpg)
Conclusão
• Windows é uma plataforma estratégica para
Oracle/MySQL.
• MySQL Server 5.5 provê alta-performance, escalabilidade,
flexibilidade, facilidade de uso, baixo custo e é uma ótima
alternativa ao SQL Server ou MS-Access.
• MySQL Cluster 7.1 também é suportado no Windows.
• Linhas de produtos MySQL suportam os desenvolvedores
Windows:
• Windows Installer (Server + Workbench + Connectors & Drivers);
• Monitoramento, Tunning Performance, otimização de Queries;
• Backup & Recovery;
• Cluster Manager.
• Windows Cluster certificado para Win2008 R2.
![Page 72: MySQL no Windows](https://reader034.vdocuments.net/reader034/viewer/2022052212/5560c1add8b42a033c8b567b/html5/thumbnails/72.jpg)
Obrigado!
Time MySQL Brasil
[email protected] [email protected] [email protected] [email protected]
@MySQLBR meetup.com/MySQL-BR