MySQL 5.7 CLUSTER NDB 7.5 Create disk table undo LogFile Group tablespace Memory table modified to disk table

Source: Internet
Author: User



--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

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.