Last active
December 15, 2015 22:00
-
-
Save sakama/5330135 to your computer and use it in GitHub Desktop.
MySQL Cluster起動手順
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#管理ノードで実行 | |
ndb_mgmd -f /var/lib/mysql-cluster/config.ini --initial | |
#データノードで実行 | |
ndbmtd --initial(シングルスレッド版で起動する場合はndbd --initial) | |
#SQLノードで実行 | |
service mysql start | |
/usr/bin/mysql_secure_installation | |
#権限テーブルがMyISAMのため、ndbclusterエンジンに変更する | |
mysql -uroot -p < /usr/share/mysql/ndb_dist_priv.sql | |
#MySQLにログイン後 | |
mysql > use mysql; | |
mysql > CALL mysql_cluster_move_privileges(); | |
mysql > use information_schema; | |
mysql> select table_name,engine from tables where table_schema='mysql'; | |
+---------------------------+------------+ | |
| table_name | engine | | |
+---------------------------+------------+ | |
| user | ndbcluster | | |
+---------------------------+------------+ | |
#管理ノードで実行 | |
> ndb_mgm | |
> show | |
Connected to Management Server at: localhost:1186 | |
Cluster Configuration | |
--------------------- | |
[ndbd(NDB)] 2 node(s) | |
id=2 @192.168.1.1 (mysql-5.5.30 ndb-7.2.12, Nodegroup: 0, Master) | |
id=3 @192.168.1.2 (mysql-5.5.30 ndb-7.2.12, Nodegroup: 0) | |
[ndb_mgmd(MGM)] 1 node(s) | |
id=1 @192.168.1.1 (mysql-5.5.30 ndb-7.2.12) | |
[mysqld(API)] 2 node(s) | |
id=50 @192.168.1.1 (mysql-5.5.30 ndb-7.2.12) | |
id=51 @192.168.1.2 (mysql-5.5.30 ndb-7.2.12) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment