SlideShare a Scribd company logo
1 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
MySQL Cluster 7.3リリース記念!!
5分で作るMySQL Cluster環境
日本オラクル株式会社
山崎 由章 / MySQL Senior Sales Consultant,
Asia Pacific and Japan
2 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
 外部キー
 Connection Thread Scalability
 MySQL 5.6との統合
 Auto-Installer
 NoSQL API : JavaScript
for node.js
New!!
3 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
MySQL Cluster: Overview
• 自動シャーディング、マルチマスター
• ACID 準拠のトランザクション, OLTP + Real-Time Analytics
読込み/書込み処理
に対する高い拡張性
• シェアードナッシング、単一障害点無し
• 自動修復 + オンラインオペレーション
99.999% の高可用性
• オープンソース + 商用版
• コモディディハードウェア + 充実した管理ツール、監視ツール
低い TCO
• Key/Value + SQL の柔軟性
• SQL + Memcached + JavaScript + Java + JPA + HTTP/REST & C++
SQL + NoSQL
• インメモリデータベース + ディスクデータ
• 非常に低いレイテンシ、短いアクセス時間
リアルタイム
4 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Who’s Using MySQL Cluster?
5 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
MySQL Cluster Connection Thread Scalability
• DBT2 Benchmark
– Single MySQL Server
– Single Data Node
– 128 client connections
8.5x
6 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
MySQL Cluster 7.3: Auto-Installer
• 素早く設定可能
• リソースを自動検出
• ワークロードに合わせた最適化
• 再現可能なベストプラクティス
• MySQL Cluster 7.2 + 7.3 で
使用可能
Specify
Workload
Auto-
Discover
Define
TopologyDeploy
7 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
MySQL Cluster 7.3: Auto-Installer
• マルチホストサポート
• リモートサーバへもデプロイ
可能
• 簡単に実行可能:
– bin/ndb_setup
– setup.bat
MySQL Cluster Auto-Installer
8 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Auto-Installerを使って、MySQL Clusterの
テスト環境を5分で作成してみよう
1.MySQL Cluster7.3をダウンロードする
2.Auto-Installerを起動して、各種設定を行う
3.Auto-InstallerからDeployする
4.稼働確認
9 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
MySQL Cluster7.3をダウンロードする
• http://dev.mysql.com/downloads/cluster/ へアクセス
• 環境に応じたモジュールをダウンロード
– 今回は、
Linux - Generic (glibc 2.5) (x86, 64-bit), Compressed TAR Archive
(mysql-cluster-gpl-7.3.2-linux-glibc2.5-x86_64.tar.gz)
をダウンロード
10 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Auto-Installerを起動して、各種設定を行う
• TARファイルを解凍
– cd /usr/local
– tar xvzf /<<ファイルパス>>/mysql-cluster-gpl-7.3.2-linux-glibc2.5-x86_64.tar.gz
– mv mysql-cluster-gpl-7.3.2-linux-glibc2.5-x86_64 mysql-cluster
• mysqlユーザ作成
– groupadd -g 502 mysql
– useradd -u 502 -g mysql -d /home/mysql -s /bin/bash mysql
• Auto-Installerを起動(mysqlユーザで実行)
– /usr/local/mysql-cluster/bin/ndb_setup.py
11 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Auto-Installerを起動して、各種設定を行う
• 「Create New MySQL Cluster」をクリック後、
「Next」をクリックし続ける
– 設定を変更したい場合は、設定を変更後、「Next」をクリック
12 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Auto-Installerを起動して、各種設定を行う
13 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Auto-Installerを起動して、各種設定を行う
14 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Auto-Installerを起動して、各種設定を行う
15 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Auto-Installerを起動して、各種設定を行う
16 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Auto-Installerを起動して、各種設定を行う
17 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Auto-Installerを起動して、各種設定を行う
18 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Auto-InstallerからDeployする
• 「Deploy and start cluster」をクリック
19 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Auto-InstallerからDeployする
20 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Auto-InstallerからDeployする
21 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Auto-InstallerからDeployする
22 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Auto-InstallerからDeployする
23 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
稼働確認
• SQLノード1に接続
– mysql -u root --port=3306 --socket=/home/mysql/MySQL_Cluster/53/mysql.socket
• SQLノード2に接続
– mysql -u root --port=3307 --socket=/home/mysql/MySQL_Cluster/54/mysql.socket
24 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
稼働確認
• SQLノード1から実行
– InnoDBとNDBでテーブルを作成し、データをinsert
• use test;
• create table t_ndb (id int auto_increment, col1 char(20), primary key(id)) engine=ndb;
• create table t_innodb (id int auto_increment, col1 char(20), primary key(id)) engine=innodb;
• insert into t_innodb(col1) values('InnoDB');
• insert into t_ndb(col1) values('NDB');
– データを確認
• show tables;
• select * from t_innodb;
• select * from t_ndb;
25 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
稼働確認
• SQLノード2から実行
– データを確認(NDBのテーブルのみが確認できる)
• use test;
• show tables;
• select * from t_innodb;
• select * from t_ndb;
– NDBのテーブルにデータをinsert
• insert into t_ndb(col1) values('NDB_Node2');
– データを確認
• select * from t_ndb;
26 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
稼働確認
• SQLノード1から実行
– データを確認(SQLノード2から INSERT したデータも確認できる)
• select * from t_ndb;
27 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
テスト環境はできたので、
後は奥野さんの本を片手に
MySQL Clusterを触りましょう!!
(http://gihyo.jp/book/にて、電子書籍版もあり)
※各種パラメータは、必要に応じて変更しましょう。
特に、以下の設定は、すぐに容量不足になりデータを挿入できなくなるので要注意!!
- DataMemory=1M
- IndexMemory=1M
28 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
29 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 29

More Related Content

PPTX
MySQL5.6でGTIDを試してそっと閉じた
PPTX
MCCT20130926 tsakuradac
PDF
カジュアルにMySQL Clusterを使ってみよう@MySQL Cluster Casual Talks 2013.09
PDF
MySQL Clusterのトラブル事例
PDF
SQL+NoSQL!? それならMySQL Clusterでしょ。
PDF
No sql with mysql cluster (MyNA・JPUG合同DB勉強会)
PDF
Tritonn (MySQL5.0.87+Senna)からの mroonga (MySQL5.6) 移行体験記
ODP
MySQl 5.6新機能解説@第一回 中国地方DB勉強会
MySQL5.6でGTIDを試してそっと閉じた
MCCT20130926 tsakuradac
カジュアルにMySQL Clusterを使ってみよう@MySQL Cluster Casual Talks 2013.09
MySQL Clusterのトラブル事例
SQL+NoSQL!? それならMySQL Clusterでしょ。
No sql with mysql cluster (MyNA・JPUG合同DB勉強会)
Tritonn (MySQL5.0.87+Senna)からの mroonga (MySQL5.6) 移行体験記
MySQl 5.6新機能解説@第一回 中国地方DB勉強会

What's hot (19)

PDF
MySQL Cluster 7.4で楽しむスケールアウト @DB Tech Showcase 2015/06
PPTX
MySQL Clusterを運用して10ヶ月間
PDF
逝くぞ最新版、罠の貯蔵は十分か
PDF
MySQL 5.7の次のMySQLは
PDF
MySQL 5.6への完全移行を実現したTritonnからMroongaへの移行体験記
PPTX
AWSのRedHatにMySQL最速インストール
PDF
正式リリースされた.Net coreに少し触れ合ってみる
PDF
[C21] MySQL Cluster徹底活用術 by Mikiya Okuno
PDF
What's New in MySQL 5.7 InnoDB
PPTX
最近始めたあなたも今日から語れるようになるMySQLの{概要と最新情報}入門@
PDF
Art of MySQL Replication.
PDF
Mysql toranomaki
PDF
MySQL Cluster 解説 & MySQL Cluster 7.3 最新情報
PDF
お金が無いときのMySQL Cluster頼み
PPTX
OSC2017 Hokkaido. MySQL今こそインストールを極めよう~改めて考える環境構築~
PDF
MySQLの冗長化 2013-01-24
PPTX
Osc spring 20220311
PDF
WindowsでMySQL入門
PDF
mikasafabric for MySQL
MySQL Cluster 7.4で楽しむスケールアウト @DB Tech Showcase 2015/06
MySQL Clusterを運用して10ヶ月間
逝くぞ最新版、罠の貯蔵は十分か
MySQL 5.7の次のMySQLは
MySQL 5.6への完全移行を実現したTritonnからMroongaへの移行体験記
AWSのRedHatにMySQL最速インストール
正式リリースされた.Net coreに少し触れ合ってみる
[C21] MySQL Cluster徹底活用術 by Mikiya Okuno
What's New in MySQL 5.7 InnoDB
最近始めたあなたも今日から語れるようになるMySQLの{概要と最新情報}入門@
Art of MySQL Replication.
Mysql toranomaki
MySQL Cluster 解説 & MySQL Cluster 7.3 最新情報
お金が無いときのMySQL Cluster頼み
OSC2017 Hokkaido. MySQL今こそインストールを極めよう~改めて考える環境構築~
MySQLの冗長化 2013-01-24
Osc spring 20220311
WindowsでMySQL入門
mikasafabric for MySQL
Ad

Similar to 5分で作るMySQL Cluster環境 (20)

PDF
A13 MySQL & NoSQL~Best of both world~ by Philip Antoniades & Ryusuke Kajiyama
PDF
MySQLインストールのお作法
PDF
MySQL Cluster7.3 GAリリース記念セミナー! MySQL & NoSQL 圧倒的な進化を続けるMySQLの最新機能!
PDF
MySQL 5.7 & 最新開発状況 @ オープンソースカンファレンス20
PDF
20150920 中国地方db勉強会
PPTX
MySQL Technology Cafe #14 MySQL Shellを使ってもっと楽をしようの会
PPTX
[中国地方DB勉強会] 第22回 Webアプリ開発をデータベース側から変革していく - MySQL 8.0新機能
PDF
Windows環境でのMySQL
PPTX
20140518 JJUG MySQL Clsuter as NoSQL
PDF
MySQL 5.7 Technical Update (日本語)
PDF
20190530 osc hokkaido_public
PDF
第九回中国地方DB勉強会 in 米子 MySQL 5.7+
PPTX
[OSC 2017 Tokyo/Fall] OSSコンソーシアム DB部会 MySQL 8.0
PDF
MySQL InnoDB Clusterによる高可用性構成(DB Tech Showcase 2017)
PDF
20150131 ChugokuDB-Shimane-MySQL
PDF
20220914_MySQLでDevOps!
PDF
SCALR OSS版のインストール手順のご紹介 20131204 01
PDF
201312 scalr[oss] installation_idcf
PDF
MySQLとオープンソースビジネスの10年、そして未来へ
PPTX
Web App for Containers + MySQLでコンテナ対応したRailsアプリを作ろう!
A13 MySQL & NoSQL~Best of both world~ by Philip Antoniades & Ryusuke Kajiyama
MySQLインストールのお作法
MySQL Cluster7.3 GAリリース記念セミナー! MySQL & NoSQL 圧倒的な進化を続けるMySQLの最新機能!
MySQL 5.7 & 最新開発状況 @ オープンソースカンファレンス20
20150920 中国地方db勉強会
MySQL Technology Cafe #14 MySQL Shellを使ってもっと楽をしようの会
[中国地方DB勉強会] 第22回 Webアプリ開発をデータベース側から変革していく - MySQL 8.0新機能
Windows環境でのMySQL
20140518 JJUG MySQL Clsuter as NoSQL
MySQL 5.7 Technical Update (日本語)
20190530 osc hokkaido_public
第九回中国地方DB勉強会 in 米子 MySQL 5.7+
[OSC 2017 Tokyo/Fall] OSSコンソーシアム DB部会 MySQL 8.0
MySQL InnoDB Clusterによる高可用性構成(DB Tech Showcase 2017)
20150131 ChugokuDB-Shimane-MySQL
20220914_MySQLでDevOps!
SCALR OSS版のインストール手順のご紹介 20131204 01
201312 scalr[oss] installation_idcf
MySQLとオープンソースビジネスの10年、そして未来へ
Web App for Containers + MySQLでコンテナ対応したRailsアプリを作ろう!
Ad

More from yoyamasaki (20)

PDF
MySQL 8.0で強化されたGIS機能のご紹介と周辺ツールとの連携について
PDF
MySQLドキュメントストアとCTE
PDF
MySQL 8.0で強化されたGIS機能のご紹介+α:「FOSS4G Tokai 2018 」での発表資料
PDF
MySQL最新情報
PDF
MySQL 8.0で強化されたGIS機能のご紹介:「FOSS4G 2018 Hokkaido」での発表資料
PDF
ついにリリース!! MySQL 8.0 最新情報
PDF
MySQLの公式GUIツール MySQL Workbench
PDF
MySQL 開発最新動向
PDF
MySQL最新情報  ※2016年12月
PDF
20160929 inno db_fts_jp
PDF
MySQL 5.7 InnoDB 日本語全文検索(その2)
PDF
MySQL 5.7 InnoDB 日本語全文検索
PDF
MySQL最新情報 ※2015年9月5日「第1回 関西DB勉強会」での発表資料
PDF
DrupalとMySQL
PDF
Mysql+Mroongaで全文検索
PDF
MySQL Workbench 6.1 の紹介
PDF
MySQL製品概要
PDF
[D14] MySQL 5.6時代のパフォーマンスチューニング *db tech showcase 2013 Tokyo
PDF
早くなったのか? MySQL5.5から5.6へのアップグレード事例
PDF
States of Dolphin - MySQL最新技術情報2013秋 -
MySQL 8.0で強化されたGIS機能のご紹介と周辺ツールとの連携について
MySQLドキュメントストアとCTE
MySQL 8.0で強化されたGIS機能のご紹介+α:「FOSS4G Tokai 2018 」での発表資料
MySQL最新情報
MySQL 8.0で強化されたGIS機能のご紹介:「FOSS4G 2018 Hokkaido」での発表資料
ついにリリース!! MySQL 8.0 最新情報
MySQLの公式GUIツール MySQL Workbench
MySQL 開発最新動向
MySQL最新情報  ※2016年12月
20160929 inno db_fts_jp
MySQL 5.7 InnoDB 日本語全文検索(その2)
MySQL 5.7 InnoDB 日本語全文検索
MySQL最新情報 ※2015年9月5日「第1回 関西DB勉強会」での発表資料
DrupalとMySQL
Mysql+Mroongaで全文検索
MySQL Workbench 6.1 の紹介
MySQL製品概要
[D14] MySQL 5.6時代のパフォーマンスチューニング *db tech showcase 2013 Tokyo
早くなったのか? MySQL5.5から5.6へのアップグレード事例
States of Dolphin - MySQL最新技術情報2013秋 -

5分で作るMySQL Cluster環境

  • 1. 1 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. MySQL Cluster 7.3リリース記念!! 5分で作るMySQL Cluster環境 日本オラクル株式会社 山崎 由章 / MySQL Senior Sales Consultant, Asia Pacific and Japan
  • 2. 2 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.  外部キー  Connection Thread Scalability  MySQL 5.6との統合  Auto-Installer  NoSQL API : JavaScript for node.js New!!
  • 3. 3 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. MySQL Cluster: Overview • 自動シャーディング、マルチマスター • ACID 準拠のトランザクション, OLTP + Real-Time Analytics 読込み/書込み処理 に対する高い拡張性 • シェアードナッシング、単一障害点無し • 自動修復 + オンラインオペレーション 99.999% の高可用性 • オープンソース + 商用版 • コモディディハードウェア + 充実した管理ツール、監視ツール 低い TCO • Key/Value + SQL の柔軟性 • SQL + Memcached + JavaScript + Java + JPA + HTTP/REST & C++ SQL + NoSQL • インメモリデータベース + ディスクデータ • 非常に低いレイテンシ、短いアクセス時間 リアルタイム
  • 4. 4 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Who’s Using MySQL Cluster?
  • 5. 5 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. MySQL Cluster Connection Thread Scalability • DBT2 Benchmark – Single MySQL Server – Single Data Node – 128 client connections 8.5x
  • 6. 6 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. MySQL Cluster 7.3: Auto-Installer • 素早く設定可能 • リソースを自動検出 • ワークロードに合わせた最適化 • 再現可能なベストプラクティス • MySQL Cluster 7.2 + 7.3 で 使用可能 Specify Workload Auto- Discover Define TopologyDeploy
  • 7. 7 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. MySQL Cluster 7.3: Auto-Installer • マルチホストサポート • リモートサーバへもデプロイ 可能 • 簡単に実行可能: – bin/ndb_setup – setup.bat MySQL Cluster Auto-Installer
  • 8. 8 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Auto-Installerを使って、MySQL Clusterの テスト環境を5分で作成してみよう 1.MySQL Cluster7.3をダウンロードする 2.Auto-Installerを起動して、各種設定を行う 3.Auto-InstallerからDeployする 4.稼働確認
  • 9. 9 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. MySQL Cluster7.3をダウンロードする • http://dev.mysql.com/downloads/cluster/ へアクセス • 環境に応じたモジュールをダウンロード – 今回は、 Linux - Generic (glibc 2.5) (x86, 64-bit), Compressed TAR Archive (mysql-cluster-gpl-7.3.2-linux-glibc2.5-x86_64.tar.gz) をダウンロード
  • 10. 10 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Auto-Installerを起動して、各種設定を行う • TARファイルを解凍 – cd /usr/local – tar xvzf /<<ファイルパス>>/mysql-cluster-gpl-7.3.2-linux-glibc2.5-x86_64.tar.gz – mv mysql-cluster-gpl-7.3.2-linux-glibc2.5-x86_64 mysql-cluster • mysqlユーザ作成 – groupadd -g 502 mysql – useradd -u 502 -g mysql -d /home/mysql -s /bin/bash mysql • Auto-Installerを起動(mysqlユーザで実行) – /usr/local/mysql-cluster/bin/ndb_setup.py
  • 11. 11 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Auto-Installerを起動して、各種設定を行う • 「Create New MySQL Cluster」をクリック後、 「Next」をクリックし続ける – 設定を変更したい場合は、設定を変更後、「Next」をクリック
  • 12. 12 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Auto-Installerを起動して、各種設定を行う
  • 13. 13 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Auto-Installerを起動して、各種設定を行う
  • 14. 14 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Auto-Installerを起動して、各種設定を行う
  • 15. 15 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Auto-Installerを起動して、各種設定を行う
  • 16. 16 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Auto-Installerを起動して、各種設定を行う
  • 17. 17 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Auto-Installerを起動して、各種設定を行う
  • 18. 18 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Auto-InstallerからDeployする • 「Deploy and start cluster」をクリック
  • 19. 19 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Auto-InstallerからDeployする
  • 20. 20 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Auto-InstallerからDeployする
  • 21. 21 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Auto-InstallerからDeployする
  • 22. 22 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Auto-InstallerからDeployする
  • 23. 23 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 稼働確認 • SQLノード1に接続 – mysql -u root --port=3306 --socket=/home/mysql/MySQL_Cluster/53/mysql.socket • SQLノード2に接続 – mysql -u root --port=3307 --socket=/home/mysql/MySQL_Cluster/54/mysql.socket
  • 24. 24 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 稼働確認 • SQLノード1から実行 – InnoDBとNDBでテーブルを作成し、データをinsert • use test; • create table t_ndb (id int auto_increment, col1 char(20), primary key(id)) engine=ndb; • create table t_innodb (id int auto_increment, col1 char(20), primary key(id)) engine=innodb; • insert into t_innodb(col1) values('InnoDB'); • insert into t_ndb(col1) values('NDB'); – データを確認 • show tables; • select * from t_innodb; • select * from t_ndb;
  • 25. 25 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 稼働確認 • SQLノード2から実行 – データを確認(NDBのテーブルのみが確認できる) • use test; • show tables; • select * from t_innodb; • select * from t_ndb; – NDBのテーブルにデータをinsert • insert into t_ndb(col1) values('NDB_Node2'); – データを確認 • select * from t_ndb;
  • 26. 26 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 稼働確認 • SQLノード1から実行 – データを確認(SQLノード2から INSERT したデータも確認できる) • select * from t_ndb;
  • 27. 27 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. テスト環境はできたので、 後は奥野さんの本を片手に MySQL Clusterを触りましょう!! (http://gihyo.jp/book/にて、電子書籍版もあり) ※各種パラメータは、必要に応じて変更しましょう。 特に、以下の設定は、すぐに容量不足になりデータを挿入できなくなるので要注意!! - DataMemory=1M - IndexMemory=1M
  • 28. 28 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 29. 29 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 29