Test the configuration of mysql_cluster in Ubuntu 12.04

Source: Internet
Author: User

Testing in Ubuntu 12.04
Possible missing library libaio1

  1. Tar xvf Downloads/mysql-cluster-gpl-7.1.3-Linux-x86_64-glibc23.tar.gz
  2. Ln-s mysql-cluster-gpl-7.1.3-Linux-x86_64-glibc23/usr/mysqlc

Mkdir my_cluster/ndb_data my_cluster/conf

1. mgm Configuration

Mgm configuration file conf/config. ini:

  1. [Ndb_mgmd]
  2. Hostname =192.168.1.30
  3. Datadir =/home/ddh/my_cluster/ndb_data
  4. NodeId =1
  5. [NdbdDefault]
  6. # Ndb?
  7. NoOfReplicas =1
  8. DataMemory =344245094
  9. IndexMemory =122122547
  10. Datadir =/home/ddh/my_cluster/ndb_data
  11. # BackupDataDir =/app/ndb/data/backup
  12. # LockPagesInMainMemory =1
  13. # TimeBetweenLocalCheckpoints =20
  14. # TimeBetweenGlobalCheckpoints =1000
  15. # TimeBetweenEpochs =100
  16. # TimeBetweenWatchdogCheckInitial =60000
  17. StringMemory =20
  18. MaxNoOfTables =1024
  19. MaxNoOfOrderedIndexes =2048
  20. MaxNoOfUniqueHashIndexes =512
  21. MaxNoOfAttributes =20480
  22. MaxNoOfTriggers =10240
  23. # DiskCheckpointSpeedInRestart = 100 M
  24. # FragmentLogFileSize = 256 M
  25. # NoOfFragmentLogFiles =16
  26. RedoBuffer = 64 M
  27. # MaxNoOfConcurrentOperations =500000
  28. # TransactionInactiveTimeout =50000
  29. # MaxNoOfExecutionThreads =8
  30. # BatchSizePerLocalScan =512
  31. ### Disk storage
  32. SharedGlobalMemory = 20 M
  33. DiskPageBufferMemory = 80 M
  34. [Ndbd]
  35. Hostname =192.168.1.114
  36. Datadir =/var/my_cluster/ndb_data
  37. NodeId =4
  38. [Mysqld]
  39. NodeId =50
  40. [Mysqld]
  41. [Mysqld]
  42. [Mysqld]
  43. [Mysqld]

2. ndb only needs to be started.

  1. ./Ndbd-c localhost:1186
  2. ./Ndbd-c localhost:1186

Start two. Why?

3. mysql Configuration

Mysql configuration file conf/my. cnf:

  1. [Mysqld]
  2. Ndbcluster
  3. User = root
  4. Datadir =/home/ddh/my_cluster/mysqld_data
  5. Basedir =/home/ddh/mysqlc
  6. Ndb-connectstring = localhost
  7. Port =3307
  8. # [Mysql_cluster]
  9. # Ndb-connectstring =192.168.1.30

 

  1. [Mysqld]
  2. Ndbcluster
  3. User = root
  4. Datadir =/var/my_cluster/mysqld_data
  5. Basedir =/usr/local/mysqlc
  6. Ndb-connectstring =192.168.1.30
  7. Port =3307
  8. # [Mysql_cluster]
  9. # Ndb-connectstring =192.168.1.30

Install mysql database
Cd mysqlc
Scripts/mysql_install_db -- no-defaults -- datadir = $ HOME/my_cluster/mysqld_data/
/Usr/local/mysqlc/bin/mysqladmin -- defaults-file =/var/my_cluster/conf/my. cnf-u root password root

  • 1
  • 2
  • Next Page

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.