Home >Database >Mysql Tutorial >MYSQL CLUSTER 7.2+5.5创建磁盘表和内存表_MySQL

MYSQL CLUSTER 7.2+5.5创建磁盘表和内存表_MySQL

WBOY
WBOYOriginal
2016-06-01 13:39:26930browse

bitsCN.com
MYSQL CLUSTER 7.2+5.5创建磁盘表和内存表 在建好的MYSQL CLUSTER上创建内存表和磁盘表方法:     创建内存表CREATE TABLE `City` (  `ID` int(11) NOT NULL auto_increment,  `Name` char(35) NOT NULL default '',  `CountryCode` char(3) NOT NULL default '',  `District` char(20) NOT NULL default '',  `Population` int(11) NOT NULL default '0',  PRIMARY KEY  (`ID`)) ENGINE=NDBCLUSTER DEFAULT CHARSET=latin1; 磁盘表有所不同,需要创建UNDO 表空间,和表空间 创建LOGFILE GROUPcreate logfile group LGGP1_NDB ADD UNDOFILE 'NDB_UNDO_01.dbf' INITIAL_SIZE=1073741824 ENGINE=NDBCLUSTER;alter logfile group LGGP1_NDB ADD UNDOFILE 'NDB_UNDO_02.dbf'  INITIAL_SIZE=1073741824 ENGINE=NDBCLUSTER;     创建数据表空间组64mb -->1024*8create tablespace TBS01_NDB ADD DATAFILE 'TBS01_DF_02.dbf '  USE LOGFILE GROUP LGGP1_NDB  EXTENT_SIZE =67108864 INITIAL_SIZE = 8589934592 AUTOEXTEND_SIZE = 67108864  ENGINE = NDBCLUSTER; alter tablespace TBS01_NDB ADD DATAFILE 'TBS01_DF_02.dbf'  INITIAL_SIZE=8589934592 ENGINE=NDBCLUSTER;.....alter tablespace TBS01_NDB ADD DATAFILE 'TBS01_DF_10.dbf.dbf'   INITIAL_SIZE=8589934592 ENGINE=NDBCLUSTER; 添加数据文件大小单位为m时遇到bug,在7.2+5.5时出现的,*1024*1024后解决数据添加之后可以进行建表,分区表不支持     CREATE TABLE `City` (  `ID` int(11) NOT NULL auto_increment,  `Name` char(35) NOT NULL default '',  `CountryCode` char(3) NOT NULL default '',  `District` char(20) NOT NULL default '',  `Population` int(11) NOT NULL default '0',  PRIMARY KEY  (`ID`)) TABLESPACE TBS01_NDB STORAGE DISK  ENGINE=ndbcluster DEFAULT CHARSET=latin1  bitsCN.com

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn