如何将大型 mysql 数据库(innodb、myisam 表)导入 MySQL NDB 集群

如何将大型 mysql 数据库(innodb、myisam 表)导入 MySQL NDB 集群

使用的 Mysqlcluster:- GA 7.4,Centos 7

我在 2 个数据节点上各有 30GB 的物理内存,每个 SSD 有 200GB,但数据库大小(属于的多个数据库的累计大小free radius)约为 55GB。是否可以将我的 mysql 数据库(myisam/innodb 混合表)迁移到 ndb 集群?我很感激任何有用的链接建议。

以下是我的 config.ini

[NDBD DEFAULT]
NoOfReplicas=2
ServerPort=2200
Datadir=/data/mysqlcluster/
FileSystemPathDD=/data/mysqlcluster/
BackupDataDir=/data/mysqlcluster/backup/
#FileSystemPathUndoFiles=/data/mysqlcluster/
#FileSystemPathDataFiles=/data/mysqlcluster/
DataMemory=25165M
IndexMemory=1271M
LockPagesInMainMemory=1

MaxNoOfConcurrentOperations=100000
MaxNoOfConcurrentTransactions=16384

StringMemory=25
MaxNoOfTables=4096
MaxNoOfOrderedIndexes=2048
MaxNoOfUniqueHashIndexes=512
MaxNoOfAttributes=24576
MaxNoOfTriggers=14336

### Params for REDO LOG 
FragmentLogFileSize=256M
InitFragmentLogFiles=SPARSE
NoOfFragmentLogFiles=40
RedoBuffer=64M

TransactionBufferMemory=8M

TimeBetweenGlobalCheckpoints=1000
TimeBetweenEpochs=100

TimeBetweenEpochsTimeout=0

### Params for LCP 
MinDiskWriteSpeed=10M
MaxDiskWriteSpeed=20M
MaxDiskWriteSpeedOtherNodeRestart=50M
MaxDiskWriteSpeedOwnRestart=200M
TimeBetweenLocalCheckpoints=20

### Heartbeating 
HeartbeatIntervalDbDb=15000
HeartbeatIntervalDbApi=15000

### Params for setting logging 
MemReportFrequency=30
BackupReportFrequency=10
LogLevelStartup=15
LogLevelShutdown=15
LogLevelCheckpoint=8
LogLevelNodeRestart=15

### Params for BACKUP 
BackupMaxWriteSize=1M
BackupDataBufferSize=24M
BackupLogBufferSize=16M
BackupMemory=40M

### Params for ODIRECT 
#Reports indicates that odirect=1 can cause io errors (os err code 5) on some systems. You must test.
#ODirect=1

### Watchdog 
TimeBetweenWatchdogCheckInitial=60000

### TransactionInactiveTimeout  - should be enabled in Production 
TransactionInactiveTimeout=60000
### New 7.1.10 redo logging parameters 
RedoOverCommitCounter=3
RedoOverCommitLimit=20
### REALTIME EXTENSIONS 
#RealTimeScheduler=1
### REALTIME EXTENSIONS FOR 6.3 ONLY
#SchedulerExecutionTimer=80
#SchedulerSpinTimer=40

### DISK DATA 
SharedGlobalMemory=20M
DiskPageBufferMemory=64M
BatchSizePerLocalScan=512
[NDBD]
NodeId=2
Hostname=10.10.10.20

### REALTIME ASPECTS - THREAD BINDING 
### READ http://johanandersson.blogspot.com/2008/02/mysql-cluster-features-what-they-are.html#realtime
#LockExecuteThreadToCPU=X
#LockMaintThreadsToCPU=Y

[NDBD]
NodeId=3
Hostname=10.10.10.21

### REALTIME ASPECTS - THREAD BINDING 
### READ http://johanandersson.blogspot.com/2008/02/mysql-cluster-features-what-they-are.html#realtime
#LockExecuteThreadToCPU=X
#LockMaintThreadsToCPU=Y

[MYSQLD DEFAULT]
DefaultOperationRedoProblemAction=QUEUE
BatchSize=512
#BatchByteSize=2048K
#MaxScanBatchSize=2048K

[MYSQLD]
NodeId=4
[MYSQLD]
NodeId=5
[MYSQLD]
NodeId=6
[MYSQLD]
NodeId=7

[MYSQLD]
NodeId=8
[MYSQLD]
NodeId=9
[MYSQLD]
NodeId=10
[MYSQLD]
NodeId=11

[MYSQLD]
[MYSQLD]
[MYSQLD]
[MYSQLD]
### SLOTS (one for each ndb_mgmd) FOR HELPER APPLICATIONS SUCH AS ndb_show_tables etc
[MYSQLD]
Hostname=10.10.10.10
### SLOT FOR CMON
[MYSQLD]
Hostname=10.10.10.10

答案1

是的,这是可能的。但这真的是你想要的吗?这个问题听起来像是你发现了一些新奇而酷炫的 NDB 集群,并想在没有任何深入了解的情况下使用它。NDB 是存储引擎,你知道你可以对数据库结构进行所有必要的修改吗?

相关内容