--MySQL 5.7 CLUSTER NDB 7.5
--Create the undo logfile Group
Create logfile Group lg_1
ADD undofile ' Undo_1.log '
Initial_size 1024M
Undo_buffer_size 8M
ENGINE Ndbcluster;
--Increase logfile
ALTER LogFile Group lg_1
ADD undofile ' Undo_2.log '
Initial_size 1024M
ENGINE Ndbcluster;
--Create Tablespace
CREATE tablespace Ts1
ADD datafile ' Data_1.dat '
Use LOGFILE GROUP lg_1
Initial_size 1024M
ENGINE Ndbcluster;
--Expansion Tablespace
ALTER tablespace Ts_1
ADD datafile ' Data_2.dat '
Initial_size 1024M
ENGINE Ndbcluster;
--Create Disk table
CREATE TABLE dt_1 (
member_id INT UNSIGNED not NULL auto_increment PRIMARY KEY,
Last_Name VARCHAR () not NULL,
First_Name VARCHAR () not NULL,
Dob DATE not NULL,
Joined DATE not NULL,
INDEX (last_name, first_name)
)
Tablespace ts_1 STORAGE DISK
ENGINE Ndbcluster;
--Delete Table
mysql> DROP TABLE dt_1;
mysql> ALTER tablespace ts_1
DROP datafile ' Data_2.dat '
ENGINE Ndbcluster;
mysql> ALTER tablespace ts_1
DROP datafile ' Data_1.dat '
ENGINE Ndbcluster;
mysql> DROP tablespace ts_1
ENGINE Ndbcluster;
mysql> DROP LOGFILE GROUP lg_1
ENGINE Ndbcluster;
--Modify the memory table as a disk table
ALTER TABLE TableName Tablespace
Ts_1 STORAGE DISK engine=ndb;
MySQL 5.7 CLUSTER NDB 7.5 Create disk table undo LogFile Group tablespace Memory table modified to disk table