windows安装版配置文件路径 C:\ProgramData\MySQL 原配置: innodb_buffer_pool_size=8M innodb_buffer_pool_instances=8 修改成: innodb_buffer_pool_size=2G innodb_buffer_pool_instances=1
这个数值的设定不是固定,理论上越大越好。甚至可以设置为物理内存的80%,当然要根据操作系统而定,通常不要超过物理内存的50%。
在用mybatis执行多个语句用分号分开如下:
<update id="clearTable" >
truncate table `table1`;
truncate table `table2`;
truncate table `table3`;
truncate table `table3`;
</update>
通常会报语法错误,这是在连接字符串后添加 &allowMultiQueries=true