MySQL Cluster??δ??????????????
?????webmaster ???????[ 2017/6/6 15:22:29 ] ????????????? MySQL
???????????
????MySQL Cluster???????е?Disk Data objects??????????
????Tablespaces???????????????Disk Data objects????????
????Undo log files???洢??????л?????????????????????undo log files??????log files group??????log file group?????????tablespaces??
????Data files????????洢???е??????data file????????tablespaces??
??????????????????undo log files??data files???????????????????????ndb_node_id_fs??????£???·??????MySQL Cluster??config.ini????DataDir??????node_id??data node??node ID????????·?????????·?????undo log????data file??·????tablespaces??log file group?????????????
?????????????????е?Disk Data Object?????????洢????????????????????????????ζ?????Disk Data Object??????????
????????????????
????MySQL Cluster????????????????????????????
????2.1?????????log file group?????????????undo log files????????????(undo log file????? undofile)?????undo log file???????????????????????????ndb???????????????
????2.2?????????tablespaces?????????log file group???????????data files?????檔
????2.3??????tablespaces????????????洢?????
??????????????????
????2.4??????log file group??
?????????????????lg_cloudstor??log file group??????cloudstor_undo_1.log??cloudstor_undo_2.log????undo log file???????С????200M??100M(????undo log file??????С?128M)???????????log file group????д?????С(????8M)???????????????20M??????log file group????????????undo log file??????????£?
????
CREATE LOGFILE GROUP lg_cloudstor
ADD UNDOFILE 'cloudstor_undo_1.log'
INITIAL_SIZE 200M
UNDO_BUFFER_SIZE 20M
ENGINE NDBCLUSTER;
?????????????????????ERROR 1064 (42000)????????????????????????????????У?set character_set_client=latin1; ????У?
????????μ?undo log file??
ALTER LOGFILE GROUP lg_cloudstor
ADD UNDOFILE 'cloudstor_undo_2.log'
INITIAL_SIZE 100M
ENGINE NDBCLUSTER;
????2.5??????tablespace
??????????????????tablespace??????tablespace??????????log file group????洢undo log??????????????data file??tablespace???????????????????????data file??tablespace???????????????????log file group?lg_cloudstor??? ts_cloudstore???????????????cloudstore_data_1.dbf??cloudstore_data_2.dbf????data file???????С?100M(????128M)?????????10M??
????
CREATE TABLESPACE ts_cloudstore
ADD DATAFILE 'cloudstore_data_1.dbf'
USE LOGFILE GROUP lg_cloudstor
INITIAL_SIZE 100M
AUTOEXTEND_SIZE 10M
ENGINE NDBCLUSTER;
????????μ?datafile
????
ALTER TABLESPACE ts_cloudstore
ADD DATAFILE 'cloudstore_data_2.dbf'
INITIAL_SIZE 100M
AUTOEXTEND_SIZE 10M
ENGINE NDBCLUSTER;
?????????????????????????Щ????????????????????????
????2.6???????????
???????????????????????????д洢?????ts_cloudstore???????
????
create table Disktable
(
id int auto_increment primary key??
c1 varchar(50) not null??
c2 varchar(30) default null??
c3 date default null??
index(c1)
)
TABLESPACE ts_cloudstore STORAGE DISK
ENGINE NDBCLUSTER;
????????????c2??c3?????????洢????????id??c1?????????洢??????У?????????????????в???洢???????????????????????????????????????
????log file group??tablespaces??Disk Data tables?????????????????У??????Щ???????????????????????????κα??????log file group???log file group????????????京???κ?data files????????????????Data files?????κα????????????????????????????
????2.7??????????
????
drop table Disktable;
????2.8????????????
????????б?????????????????????????????data files??
????
alter tablespace ts_cloudstore
drop datafile 'cloudstore_data_1.dbf'
engine ndbcluster;
alter tablespace ts_cloudstore
drop datafile 'cloudstore_data_2.dbf'
engine ndbcluster;ER;
????2.9?????????
????
drop tablespace ts_cloudstore
engine ndbcluster;
????2.10??????????
????
drop logfile group lg_cloudstor
engine ndbcluster;
????????????????????????????
??????????INFORMATION_SCHEMA??????е?FILES???в????????????
????2.11??????????
???????????????У?TEXT??BLOB?е??256bytes?洢??????У????????洢??????????????е??????????????д洢8bytes???????????????????????????--initial???????????????????????????????????????????????
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11