MySQL 5.5 creates a linear Hash Partition Table and distributes the table files to different physical disks. Data on different servers must be merged. Considering that the game zone group server will be added continuously in the future, therefore, use the linear hash partition of mysql5.5. When the added Block Partition exceeds the hash partition, add the partition again. When the maintenance is stopped, distribute the newly added Partition Table files to other physical partitions. under www.2cto.com, the SQL DROP TABLE IF EXISTS gyyx_middle is created. 'wd _ char_info '; tudou @ GyyxCREATE TABLE gyyx_middle. 'wd _ char_info '('dist' int (11) not null default '0', 'account' varchar (32) not null default 'Player account ', 'name' varchar (32) not null default '', 'create _ d Ate 'int (11) not null default '0', 'create _ time' datetime not null default '2017-00-00 00:00:00 ', 'First _ login_ip' INT (11) not null default 0, 'gender' tinyint (11) not null default '0', 'last _ login_date 'INT (11) not null default '0 ', 'Last _ login_time 'datetime not null default '2017-00-00 00:00:00', 'last _ login_ip 'int (11) not null default 0, 'Glory' int (11) not null default '0', 'level' mediumint (11) not null default '0', 'Tao' int (11) not null default '0', 'cash' int (11) not null default '0 ', 'Nice 'int (11) not null default '0', 'reputation' int (11) not null default '0 ') ENGINE = MyISAM default charset = latin1PARTITION by linear hash ('dist') PARTITIONS 500; distribute the table files with an even number of partition files to another physical partition www.2cto.com #! /Bin/shFILEDIR = "/data/mysql5_5_20/data/gyyx_middle/" MVDIR = "/data1/mysql5_5_20/data/gyyx_middle/" for I in 'seq 0 249 'doi = $ [I * 2] mv $ {FILEDIR} "wd_char_info # P # p" $ {I }". MYI "$ {MVDIR}" wd_char_info # P # p "$ {I }". MYI "mv $ {FILEDIR}" wd_char_info # P # p "$ {I }". MYD "$ {MVDIR}" wd_char_info # P # p "$ {I }". MYD "done creates a soft link in the original directory #! /Bin/shFILEDIR = "/data1/mysql5_5_20/data/gyyx_middle/" LNDIR = "/data/mysql5_5_20/data/gyyx_middle/" FILELIST = 'ls $ filedir' for FILENAME $ FILELISTdoln-s $ {FILEDIR }$ {FILENAME }$ {LNDIR }$ {FILENAME} done