MySQL Errcode: 17

本文涉及的产品
云数据库 RDS MySQL Serverless,0.5-2RCU 50GB
简介:

服务器安装的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没有出现类似错误。或许,问题已经解决。






本文转自wayfarer51CTO博客,原文链接:http://blog.51cto.com/wayfarer/537096,如需转载请自行联系原作者

相关实践学习
基于CentOS快速搭建LAMP环境
本教程介绍如何搭建LAMP环境,其中LAMP分别代表Linux、Apache、MySQL和PHP。
全面了解阿里云能为你做什么
阿里云在全球各地部署高效节能的绿色数据中心,利用清洁计算为万物互联的新世界提供源源不断的能源动力,目前开服的区域包括中国(华北、华东、华南、香港)、新加坡、美国(美东、美西)、欧洲、中东、澳大利亚、日本。目前阿里云的产品涵盖弹性计算、数据库、存储与CDN、分析与搜索、云通信、网络、管理与监控、应用服务、互联网中间件、移动服务、视频服务等。通过本课程,来了解阿里云能够为你的业务带来哪些帮助     相关的阿里云产品:云服务器ECS 云服务器 ECS(Elastic Compute Service)是一种弹性可伸缩的计算服务,助您降低 IT 成本,提升运维效率,使您更专注于核心业务创新。产品详情: https://www.aliyun.com/product/ecs
相关文章
|
9月前
|
关系型数据库 MySQL
|
5月前
|
关系型数据库 MySQL
mysql 错误代码:1293
mysql 错误代码:1293
|
10月前
|
存储 设计模式 缓存
详解MySQL Error Log
Error Log是MySQL的一个非常重要的日志,主要用来记录mysqld的启动和关闭,以及mysqld启动,关闭以及运行期间的诊断信息。本文主要对Error Log的初始化以及写入过程做一个详细的介绍。以下介绍基于MySQL 8.0.28。初始化日志服务的初始化代码调用堆栈如下:- mysqld_main   - init_error_log   //初始化日志子系统   - log_buil
详解MySQL Error Log
|
关系型数据库 MySQL
mysql 1318错误代码
mysql 1318错误代码
132 0
|
关系型数据库 MySQL
MySQL 同时出现 ERROR 2002 和 ERROR 1524
ERROR 2002 (HY000) ERROR 1524 (HY000): Plugin 'unix_socket' is not loaded ERROR 1524 (HY000): Plugin 'unix_socket' is not loaded
964 0
|
关系型数据库 MySQL Oracle
|
MySQL 关系型数据库 数据安全/隐私保护