MySQL Errcode: 17

服务器安装的MySQL总是会在一段时间之后停止服务。如果只是从表现来看,很难定位问题。最好的办法是查看日志。打开err文件,发现每过一段时间,就会打印一条错误信息:

\bin\mysqld-nt: Can't create/write to file 'C:\WINDOWS\TEMP\ib88' (Errcode: 17)

InnoDB: Error: unable to create temporary file; errno: 17

看来是InnoDB在创建临时文件的时候出现了错误。但这个目录的权限设置是没有问题的,当前用户可以对其进行读写。

MySQL的官方网站这样解决这个问题:

If you get an error of the following type for some queries, it means that MySQL cannot create a temporary file for the result set in the temporary directory:

Can't create/write to file '\\sqla3fe_0.ism'.

The preceding error is a typical message for Windows; the Unix message is similar.

One fix is to start mysqld with the --tmpdir option or to add the option to the [mysqld] section of your option file. For example, to specify a directory of C:\temp, use these lines:

[mysqld]
tmpdir=C:/temp

The C:\temp directory must exist and have sufficient space for the MySQL server to write to. See Section 4.2.3.3, “Using Option Files”.

Another cause of this error can be permissions issues. Make sure that the MySQL server can write to the tmpdir directory.

时间紧迫,我也没有闲情去琢磨发生此问题的原因了。在另一个盘下创建了temp临时目录,并在my.ini中添加:

[mysqld]
tmpdir=e:/temp

已经运行了12个小时,MySQL没有出现类似错误。或许,问题已经解决。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值