MySQLCluster7.2.15 installation and deployment performance test_mysql

Source: Internet
Author: User
MySQLCluster7.2.15 install and deploy performance test bitsCN.com
1 Download the cluster tar.gz
Wget http://dev.mysql.com/get/Downloads/MySQL-Cluster-7.2/mysql-cluster-gpl-7.2.15.tar.gz

MySQL Cluster 7.2.15
Select Version: Select 7.2.15 from the drop-down list.
Select Platform: Select Linux Generic from the drop-down list.
Then select the following connection column:
Linux-Generic 2.6 (x86, 64-bit), Compressed TAR Archive
(Mysql-cluster-gpl-7.2.15-linux2.6-x86_64.tar.gz)

2 cp to other 3 host
Scp mysql-cluster-gpl-7.2.15-linux2.6-x86_64.tar.gz 10.88.49.124:/root
10.88.49.119
10.88.49.122
10.88.49.123
10.88.49.124

3 install management node
Tar-xvf mysql-cluster-gpl-7.2.15-linux2.6-x86_64.tar.gz


3.1 install the directory of install
Mkdir-p/usr/local/mysql/bin
Mkdir-p/usr/local/mysql/ndbdata


3.2 set the path of file run
The [root @ mysql mysql-cluster-gpl-7.2.15-linux2.6-x86_64] # vi ~ /. Bash_profile
PATH = $ PATH: $ HOME/bin:/usr/local/mysql/bin


3.3 copy the run files
Cd mysql-cluster-gpl-7.2.15-linux2.6-x86_64
Cp bin/ndb_mgmd/usr/local/mysql/bin
Cp bin/ndb_mgm/usr/local/mysql/bin


3.4 create the file of log file store
Mkdir-p/var/lib/mysql-cluster

3.5 create the config file and reset it
Mkdir-p/usr/local/mysql/cluster-conf
Vi/usr/local/mysql/cluster-conf/config. ini
[Ndbd default]
# TotalSendBufferMemory = 256 M
NoOfReplicas = 2
DataMemory = 2500 M
IndexMemory = 500 M
DataDir =/var/lib/mysql-cluster
# FileSystemPath =/data/dbdata
# Redolog
FragmentLogFileSize = 32 M
InitFragmentLogFiles = SPARSE
NoOfFragmentLogFiles = 8
RedoBuffer = 1024 M
StringMemory = 25
LockPagesInMainMemory = 1
MaxNoOfTables = 4096
MaxNoOfOrderedIndexes = 2048
MaxNoOfUniqueHashIndexes = 1024
MaxNoOfAttributes = 24576
MaxNoOfTriggers = 14336
ODirect = 1


MaxNoOfConcurrentTransactions = 10000
MaxNoOfConcurrentOperations = 50000
MaxNoOfLocalOperations = 55000
TimeBetweenGlobalCheckpoints = 1000
Time betweenepochs = 100
TimeBetweenWatchdogCheckInitial = 60000
TransactionBufferMemory = 10 M
DiskCheckpointSpeed = 10 M
DiskCheckpointSpeedInRestart = 100 M
TimeBetweenLocalCheckpoints = 20
SchedulerSpinTimer = 400
SchedulerExecutionTimer = 100
RealTimeScheduler = 1
BackupMaxWriteSize = 1 M
BackupDataBufferSize = 16 M
BackupLogBufferSize = 4 M
BackupMemory = 20 M


MaxNoOfExecutionThreads = 4
TransactionDeadLockDetectionTimeOut = 10000
BatchSizePerLocalScan = 512
### Increasing the LongMessageBufferb/c of a bugs (20090903)
LongMessageBuffer = 8 M
### Heartbeating
HeartbeatIntervalDbDb = 15000
HeartbeatIntervalDbApi = 15000
[Mgm default]
PortNumber: 1186
DataDir:/var/lib/mysql-cluster1
[Tcp default]
SendBufferMemory: 64 M


#######################################
# Change HOST1 to the name of the NDB_MGMD host
# Change HOST8 to the name of the NDBD host
# Change HOST9 to the name of the NDBD host
#######################################
[NDB_MGMD]
NodeId: 1
HostName: 10.88.49.119
ArbitrationRank: 1
[NDBD]
NodeId: 4
HostName: 10.88.49.124


######################################## ##############
# Note: The following can be MySQLDconnections or #
# Ndb api application connecting to thecluster #
######################################## ##############
[API]
NodeId: 10
HostName: 10.88.49.122
ArbitrationRank: 2


[API]
NodeId: 11
HostName: 10.88.49.123
ArbitrationRank: 2


4 install data node (10.88.49.124)
4.1 install the directory of install
Mkdir-p/usr/local/mysql/bin
Mkdir-p/usr/local/mysql/ndbdata


4.2 copy the run command file
Cd mysql-cluster-gpl-7.2.15-linux2.6-x86_64
Cp./bin/ndbd/usr/local/mysql/bin
Chown-R mysql: mysql/usr/local/mysql


4.3 set the path
Vim ~ /. Bash_profile
PATH = $ PATH: $ HOME/bin:/usr/local/mysql/bin


4.4 set the config file
Vim/etc/mycluster. cnf
[Mysql_cluster]

4.5 configure a data node connection management node
Ndb-connectstring = 10.88.49.119

5 install SQL node (10.88.49.122, 10.88.49.123)
Compress the tar.gz file
Tar-zxvf mysql-cluster-gpl-7.2.15-linux2.6-x86_64.tar.gz

5.1 copy the directory
Music mysql-cluster-gpl-7.2.15-linux2.6-x86_64/usr/local/mysqlndb

5.2 add mysql accounts
Group add mysql
Useradd-g mysql

5.3 add the permission
Chown-R mysql: mysql/usr/local/mysqlndb

5.4 copy the config file
Cp/usr/local/mysqlndb/my. cnf/etc/my. cnf

5.5 init the database
Cd/usr/local/mysqlndb
Scripts/mysql_install_db -- basedir =/usr/local/mysqlndb/-- datadir =/data/-- defaults-file =/etc/myndb. cnf -- user = mysql
[Root @ localhost mysqlndb] # scripts/mysql_install_db -- user = mysql
Installing MySQL system tables...
01:55:16 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use -- explicit_defaults_for_timestamp server option (see documentation for more details ).

Installation of system tables failed! Examine the logs in
/App/mysql for more information.

You can try to start the mysqld daemon:

Shell>/usr/local/mysql5615/bin/mysqld -- skip-grant &

And use the command line tool/usr/local/mysql5615/bin/mysql
To connect to the mysql database and look at the grant tables:

Shell>/usr/local/mysql5615/bin/mysql-u root mysql
Mysql> show tables

Try 'mysqld -- help' if you have problems with paths. Using -- log
Gives you a log in/app/mysql that may be helpful.

Please consult the MySQL manual section
'Problems running mysql_install_db ', and the manual section that
Describes problems on your OS. Another information source are
MySQL email archives available at http://lists.mysql.com /.

Please check all of the above before mailing us! And remember, if
You do mail us, you MUST use the/usr/local/mysql5615/scripts/mysqlbug script!


[] Full path/usr/local/mysqlndb/scripts/mysql_install_db must be used. Otherwise, it will be automatically called as the original initialization path.
[Root @ localhost mysqlndb] # cp/etc/myndb. cnf/usr/local/mysqlndb/my. cnf
[Root @ localhost mysqlndb] #/usr/local/mysqlndb/scripts/mysql_install_db -- defaults-file =/usr/local/mysqlndb/my. cnf -- user = mysql
Installing MySQL system tables...
OK
Filling help tables...
OK


To start mysqld at boot time you have to copy
Support-files/mysql. server to the right place for your system


Please remember to set a password for the MySQL root USER!
To do so, start the server, then issue the following commands:


/Usr/local/mysqlndb // bin/mysqladmin-u root password 'new-password'
/Usr/local/mysqlndb // bin/mysqladmin-u root-h localhost password 'new-password'


Alternatively you can run:
/Usr/local/mysqlndb // bin/mysql_secure_installation


Which will also give you the option of removing the test
Databases and anonymous user created by default. This is
Stronugly recommended for production servers.


See the manual for more instructions.


You can start the MySQL daemon:
Cd/usr/local/mysqlndb/;/usr/local/mysqlndb // bin/mysqld_safe &


You can test the MySQL daemon with mysql-test-run.pl
Cd/usr/local/mysqlndb // mysql-test; perl mysql-test-run.pl


Please report any problems with the/usr/local/mysqlndb // scripts/mysqlbug script!



5.7 copy the protect process
Cp/usr/local/mysqlndb/support-files/mysql. server/etc/init. d/ndbdsql
Configure the daemon
Chkconfig -- add ndbdsql
Chkconfig -- level 35 ndbdsql on
Add execution file path
Vim ~ /. Bash_profile
PATH = $ PATH: $ HOME/bin:/usr/local/mysqlndb/bin
Change configuration file
Vim/etc/my. cnf
Edit the following information:
[Mysqld] # configure the connection between an SQL node and a management node
Port = 3307
Socket =/tmp/mysql. sock
Ndbcluster
Ndb-connectstring = 10.88.49.119

[Root @ localhost mysqlndb] #/etc/init. d/mysqldndbd status
ERROR! MySQL is not running, but lock file (/var/lock/subsys/mysql) exists
[Root @ localhost mysqlndb] #/etc/init. d/mysqldndbd status
ERROR! MySQL is not running, but lock file (/var/lock/subsys/mysql) exists
[Root @ localhost mysqlndb] # mv/var/lock/subsys/mysql. bak
[Root @ localhost mysqlndb] #/etc/init. d/mysqldndbd start
Starting MySQL... SUCCESS!

6 start the cluster
6.1 start the management node
Ndb_mgmd-f/usr/local/mysql/cluster-conf/config. ini

[Root @ mysql ~] # Ndb_mgmd-f/usr/local/mysql/cluster-conf/config. ini
MySQL Cluster Management Server mysql-5.5.35 ndb-7.2.15
2014-02-25 18:57:04 [MgmtSrvr] ERROR -- at line 1: Value specified outside section
2014-02-25 18:57:04 [MgmtSrvr] ERROR -- at line 1: cocould not parse name-value pair in config file.
18:57:04 [MgmtSrvr] ERROR -- cocould not load configuration from '/usr/local/mysql/cluster-conf/config. ini'
18:57:04 [MgmtSrvr] ERROR -- cocould not determine which nodeid to use for this node. Specify it with -- ndb-nodeid = On command line


Check that some spaces are invalid when copying from window to liux.
Modify/usr/local/mysql/cluster-conf/config. ini and replace [NDBDDEFAULT] with [ndbd default]. a space is missing.




6.2 start the data node
Ndbd

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.