mysql里的ibtmp1 文件过大,导致服务器磁盘占满

1,000 阅读1分钟

为防止数据丢失一定要提前备份数据。

1,修改my.cnf配置文件:

innodb_temp_data_file_path = ibtmp1:12M:autoextend:max:5G

2. 停止链接到mysql的项目

3. 重启mysql(重启前一定要备份数据库,防止无法重启,导致数据丢失)

参考:

解决办法:

1,修改my.cnf配置文件:

innodb_temp_data_file_path = ibtmp1:12M:autoextend:max:5G

2,设置innodb_fast_shutdown参数

SET GLOBAL innodb_fast_shutdown = 0; #InnoDB does a slow shutdown, a full purge and a change buffer merge before shutting down

3,关闭mysql服务

4,删除ibtmp1文件

5,启动mysql服务