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'