mysql5.7版本的6种

发布时间:2022-12-11 21:16:14   来源:文档文库   
字号:
拥有的6Tablespaces1.systemtablespaceTheInnoDBsystemtablespacecontainstheInnoDBdatadictionary(metadataforInnoDB-relatedobjectsandisthestorageareaforthedoublewritebuffer,thechangebuffer,andundologs.Thesystemtablespacealsocontainstableandindexdataforanyuser-createdtablesthatarecreatedinthesystemtablespace.Thesystemtablespaceisconsideredasharedtablespacesinceitissharedbymultipletables.Thesystemtablespaceisrepresentedbyoneormoredatafiles.Bydefault,onesystemdatafile,namedibdata1,iscreatedintheMySQLdatadirectory.Thesizeandnumberofsystemdatafilesiscontrolledbytheinnodb_data_file_pathstartupoption.增大系统表空间TheeasiestwaytoincreasethesizeoftheInnoDBsystemtablespaceistoconfigureitfromthebeginningtobeauto-extending.Specifytheautoextendattributeforthelastdatafileinthetablespacedefinition.ThenInnoDBincreasesthesizeofthatfileautomaticallyin64MBincrementswhenitrunsoutofspace.Theincrementsizecanbechangedbysettingthevalueoftheinnodb_autoextend_incrementsystemvariable,whichismeasuredinmegabytesYoucanexpandthesystemtablespacebyadefinedamountbyaddinganotherdatafile:1.ShutdowntheMySQLserver.2.Ifthepreviouslastdatafileisdefinedwiththekeywordautoextend,change
itsdefinitiontouseafixedsize,basedonhowlargeithasactuallygrown.Checkthesizeofthedatafile,rounditdowntotheclosestmultipleof1024×1024bytes(=1MB,andspecifythisroundedsizeexplicitlyininnodb_data_file_path.3.Addanewdatafiletotheendofinnodb_data_file_path,optionallymakingthatfilethelastdatafileintheinnodb_data_file_pathcanbespecifiedasautoextending.4.StarttheMySQLserveragain.Forexample,thistablespacehasjustoneauto-extendingdatafileibdata1:innodb_data_home_dir=innodb_data_file_path=/ibdata/ibdata1:10M:autoextendSupposethatthisdatafile,overtime,hasgrownto988MB.Hereistheconfigurationlineaftermodifyingtheoriginaldatafiletouseafixedsizeandaddinganewauto-extendingdatafile:innodb_data_home_dir=innodb_data_file_path=/ibdata/ibdata1:988M;/disk2/ibdata2:50M:autoextendWhenyouaddanewdatafiletothesystemtablespaceconfiguration,makesurethatthefilenamedoesnotrefertoanexistingfile.InnoDBcreatesandinitializesthefilewhenyourestarttheserver.缩小系统表空间逻辑备份,导出导入。2.file-per-tabletablespacesHistorically,allInnoDBtablesandindexeswerestoredinthesystemtablespace.Thismonolithic

本文来源:https://www.2haoxitong.net/k/doc/c3f00861864769eae009581b6bd97f192279bfc0.html

《mysql5.7版本的6种.doc》
将本文的Word文档下载到电脑,方便收藏和打印
推荐度:
点击下载文档

文档为doc格式