MySQL changes the storage engine of database tables
MySQL changes the storage engine of database tables
1. view the original storage engine of the table
Show create table user;
'User', 'create TABLE 'user' (\ n' id' int (11) not null default \ '0 \ ', \ n' num' int (8) default null, \ n 'name' varchar (20) default null, \ n 'sex' varchar (10) default null, \ n 'age' int (3) default null, \ n'phone' varchar (11) default null, \ n'address' varchar (100) not null, \ n primary key ('id') \ n) ENGINE = InnoDB default charset = utf8'
2. Modify the storage engine
Alter table user engine = MyISAM;
3. view the modified storage engine
'User', 'create TABLE 'user' (\ n' id' int (11) not null default \ '0 \ ', \ n' num' int (8) default null, \ n 'name' varchar (20) default null, \ n 'sex' varchar (10) default null, \ n 'age' int (3) default null, \ n'phone' varchar (11) default null, \ n'address' varchar (100) not null, \ n primary key ('id') \ n) ENGINE = MyISAM default charset = utf8'