1.linux下默认存储引擎为 MyISAM,windows为InnoDB,
查看默认引擎
show variables like ‘%storage_engine%’;
2.修改/etc/my.cnf
vi /etc/my.cnf
在【mysqld】下加下面语句,重要,加错地方无法修改
default-storage-engine=InnoDB
3.重启mysql服务
service mysqld restart
4.登录,验证
show variables like ‘%storage_engine%’;