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: 下拉框选择 7.2.15
Select Platform: 下拉框选择 Linux Generic
然后再下面连接一栏里面选择:
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
[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= 256M
NoOfReplicas=2
DataMemory=2500M
IndexMemory=500M
DataDir=/var/lib/mysql-cluster
#FileSystemPath=/data/dbdata
#Redolog
FragmentLogFileSize=32M
InitFragmentLogFiles=SPARSE
NoOfFragmentLogFiles=8
RedoBuffer=1024M
StringMemory=25
LockPagesInMainMemory=1
MaxNoOfTables=4096
MaxNoOfOrderedIndexes=2048
MaxNoOfUniqueHashIndexes=1024
MaxNoOfAttributes=24576
MaxNoOfTriggers=14336
ODirect=1
MaxNoOfConcurrentTransactions=10000
MaxNoOfConcurrentOperations=50000
MaxNoOfLocalOperations=55000
TimeBetweenGlobalCheckpoints=1000
TimeBetweenEpochs=100
TimeBetweenWatchdogCheckInitial=60000
TransactionBufferMemory=10M
DiskCheckpointSpeed=10M
DiskCheckpointSpeedInRestart=100M
TimeBetweenLocalCheckpoints=20
SchedulerSpinTimer=400
SchedulerExecutionTimer=100
RealTimeScheduler=1
BackupMaxWriteSize=1M
BackupDataBufferSize=16M
BackupLogBufferSize=4M
BackupMemory=20M
MaxNoOfExecutionThreads=4
TransactionDeadLockDetectionTimeOut=10000
BatchSizePerLocalScan=512
###Increasing the LongMessageBufferb/c of a bug (20090903)
LongMessageBuffer=8M
###Heartbeating
HeartbeatIntervalDbDb=15000
HeartbeatIntervalDbApi=15000
[MGM DEFAULT]
PortNumber:1186
DataDir:/var/lib/mysql-cluster1
[TCP DEFAULT]
SendBufferMemory:64M
#######################################
#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 配置数据节点连接管理节点
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
mv mysql-cluster-gpl-7.2.15-linux2.6-x86_64 /usr/local/mysqlndb
5.2 add mysql accounts
group add mysql
useradd -g mysql 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...
2014-02-27 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 with:
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 the
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!
[]必须使用全路径/usr/local/mysqlndb/scripts/mysql_install_db,不然识别,就会自动调用为原来的初始化路径。
[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
strongly recommended for production servers.
See the manual for more instructions.
You can start the MySQL daemon with:
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
配置守护进程
chkconfig --add ndbdsql
chkconfig --level 35 ndbdsql on
添加执行文件路径
vim ~/.bash_profile
PATH=$PATH:$HOME/bin:/usr/local/mysqlndb/bin
更改配置文件
vim /etc/my.cnf
分别编辑如下信息:
[mysqld]#配置SQL节点与管理节点连接
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 /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: Could not parse name-value pair in config file.
2014-02-25 18:57:04 [MgmtSrvr] ERROR -- Could not load configuration from '/usr/local/mysql/cluster-conf/config.ini'
2014-02-25 18:57:04 [MgmtSrvr] ERROR -- Could not determine which nodeid to use for this node. Specify it with --ndb-nodeid=
检查是从window下copy到liux下,某些空格失效了。
修改/usr/local/mysql/cluster-conf/config.ini,将[NDBDDEFAULT]换成[NDBD DEFAULT],中间少了一个空格。
6.2 start the data node
ndbd

In diesem Artikel wird die Optimierung von MySQL -Speicherverbrauch in Docker untersucht. Es werden Überwachungstechniken (Docker -Statistiken, Leistungsschema, externe Tools) und Konfigurationsstrategien erörtert. Dazu gehören Docker -Speichergrenzen, Tausch und CGroups neben

Dieser Artikel befasst sich mit MySQLs Fehler "Die freigegebene Bibliotheksfehler". Das Problem ergibt sich aus der Unfähigkeit von MySQL, die erforderlichen gemeinsam genutzten Bibliotheken (.SO/.dll -Dateien) zu finden. Lösungen beinhalten die Überprüfung der Bibliotheksinstallation über das Paket des Systems m

In dem Artikel werden mithilfe der Änderungstabelle von MySQL Tabellen, einschließlich Hinzufügen/Löschen von Spalten, Umbenennung von Tabellen/Spalten und Ändern der Spaltendatentypen, erläutert.

Dieser Artikel vergleicht die Installation von MySQL unter Linux direkt mit Podman -Containern mit/ohne phpmyadmin. Es beschreibt Installationsschritte für jede Methode und betont die Vorteile von Podman in Isolation, Portabilität und Reproduzierbarkeit, aber auch

Dieser Artikel bietet einen umfassenden Überblick über SQLite, eine in sich geschlossene, serverlose relationale Datenbank. Es beschreibt die Vorteile von SQLite (Einfachheit, Portabilität, Benutzerfreundlichkeit) und Nachteile (Parallelitätsbeschränkungen, Skalierbarkeitsprobleme). C

In diesem Handbuch wird die Installation und Verwaltung mehrerer MySQL -Versionen auf macOS mithilfe von Homebrew nachgewiesen. Es betont die Verwendung von Homebrew, um Installationen zu isolieren und Konflikte zu vermeiden. Der Artikel Details Installation, Starten/Stoppen von Diensten und Best PRA

In Artikel werden die Konfiguration der SSL/TLS -Verschlüsselung für MySQL, einschließlich der Erzeugung und Überprüfung von Zertifikaten, erläutert. Das Hauptproblem ist die Verwendung der Sicherheitsauswirkungen von selbstsignierten Zertifikaten. [Charakterzahl: 159]

In Artikel werden beliebte MySQL -GUI -Tools wie MySQL Workbench und PhpMyAdmin beschrieben, die ihre Funktionen und ihre Eignung für Anfänger und fortgeschrittene Benutzer vergleichen. [159 Charaktere]


Heiße KI -Werkzeuge

Undresser.AI Undress
KI-gestützte App zum Erstellen realistischer Aktfotos

AI Clothes Remover
Online-KI-Tool zum Entfernen von Kleidung aus Fotos.

Undress AI Tool
Ausziehbilder kostenlos

Clothoff.io
KI-Kleiderentferner

AI Hentai Generator
Erstellen Sie kostenlos Ai Hentai.

Heißer Artikel

Heiße Werkzeuge

EditPlus chinesische Crack-Version
Geringe Größe, Syntaxhervorhebung, unterstützt keine Code-Eingabeaufforderungsfunktion

Dreamweaver Mac
Visuelle Webentwicklungstools

ZendStudio 13.5.1 Mac
Leistungsstarke integrierte PHP-Entwicklungsumgebung

SublimeText3 Mac-Version
Codebearbeitungssoftware auf Gottesniveau (SublimeText3)

mPDF
mPDF ist eine PHP-Bibliothek, die PDF-Dateien aus UTF-8-codiertem HTML generieren kann. Der ursprüngliche Autor, Ian Back, hat mPDF geschrieben, um PDF-Dateien „on the fly“ von seiner Website auszugeben und verschiedene Sprachen zu verarbeiten. Es ist langsamer und erzeugt bei der Verwendung von Unicode-Schriftarten größere Dateien als Originalskripte wie HTML2FPDF, unterstützt aber CSS-Stile usw. und verfügt über viele Verbesserungen. Unterstützt fast alle Sprachen, einschließlich RTL (Arabisch und Hebräisch) und CJK (Chinesisch, Japanisch und Koreanisch). Unterstützt verschachtelte Elemente auf Blockebene (wie P, DIV),
