在配置hibernate.cfg.xml中,如果配置了使用hibernate创建表,则会出现type=mylsam错误,主要为引擎错误
错误操作:
hibernate.cfg.xml配置了下面语句后:
自动创建表(不建议使用)
<property name="hibernate.hbm2ddl.auto">update</property>
创建表
<property name="dialect">org.hibernate.dialect.MySQLDialect</property>
而且你使用的mysql是5.x,那么会报错: type=MyISAM
解决方法是:
配置改成:
<property name="hibernate.dialect">org.hibernate.dialect.MySQL5Dialect</property>
如图:
![在这里插入图片描述](https://img-blog.csdnimg.cn/20181123160359818.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3h1ZGFpbG9uZ19ibG9n,size_16,color_FFFFFF,t_70)
个人网站:http://xudailong.cc
关注「蛇崽网盘教程资源」公众号 ,在微信后台回复「领取资源」,获取IT资源200G干货大全。
更多资源请访问:
超详细图文搭建个人免费博客
关注「蛇崽网盘教程资源」公众号 ,在微信后台回复「领取资源」,获取IT资源200G干货大全。
在微信后台回复「130个小程序」,即可免费领取享有导入就能跑的微信小程序
![在这里插入图片描述](https://img-blog.csdnimg.cn/20181106111014905.png)