`
cocos
  • 浏览: 402905 次
  • 性别: Icon_minigender_1
  • 来自: 福州
社区版块
存档分类
最新评论

mysql 错误,SQL/DB Error errcode 13 Can't create/write to file

阅读更多
SQL/DB Error errcode 13 Can't create/write to file 错误

是因为临时目录没有可写权限,
配置文件,tmpdir=/tmp 的目录有可写权限就可以

////////////////////////

How do I fix the following error SQL/DB Error errcode 13 Can't create/write to file?
Problem: The MySQL variable tmpdir is set to a directory that cannot be written to when using PHP to access MySQL.

To verify this, enter MySQL at the command line and type show variables;

You'll get a long list and one of them will read: tmpdir = /somedir/ (whatever your setting is.)

Solution: Alter the tmpdir variable to point to a writable directory.

Steps:


Find the my.cnf file. On *nix systems this is usually in /etc/.
Once found, open this in a simple text editor and find the [mysqld] section.
Under this section, find the tmpdir line. If this line is commented (has a # at the start), delete the # and edit the line so that it reads: tmpdir = /writable/dir where /writable/dir is a directory to which you can write. Some use /tmp, or you might also try /home//.
Save the file.
Shutdown MySQL by typing mysqlshutdown -u -p shutdown.
Start MySQL by going to the MySQL directory and typing ./bin/safe_mysqld &. Usually the MySQL directory is in /usr/local or sometimes in /usr/ on Linux systems.

If none of this make sense and you have someone to administrate your system for you, show the above to them and they should be able to figure it out.



by tongchao
add  to my.ini
tmpdir = /somedir/
分享到:
评论

相关推荐

    解决MYSQL出现Can”t create/write to file ”#sql_5c0_0.MYD”的问题

    MySQL error:Can’t create/write to file ‘#sql_5c0_0.MYD’ MySQL server error: Can’t create/write to file ‘C:/WINDOWS/TEMP/#sql_a80_0.MYD’ (Errcode: 17) ( 1 ) 根据从网上搜索问题提示和自己遇到的情况...

    Can't create TCP/IP socket(24).原因及解决办法

    3. "ERROR - Unable to connect to foreign data source- Can't create TCP-IP socket (24)_冰刀(skate)-CSDN博客.url":这可能是一个具体的案例,描述了在尝试连接外部数据源时遇到的TCP/IP套接字创建问题。...

    解决MYSQL出现Can''t create/write to file ''#sql_5c0_0.MYD''的问题

    在使用MySQL数据库的过程中,有时可能会遇到“Can't create/write to file”这样的错误,这通常意味着数据库尝试写入或创建一个文件时遇到了问题。本篇文章将深入探讨这个问题的原因以及相应的解决方案。 首先,这...

    Can't create/write to file 'C:\WINDOWS\TEMP\...MYSQL报错解决方法

    针对标题和描述中所提及的“Can't create/write to file 'C:\WINDOWS\TEMP\...MYSQL报错解决方法”,该问题主要发生在尝试在Windows操作系统的TEMP文件夹中创建或写入文件时失败,通常会导致MySQL数据库软件报错。...

    Cant create/write to file C:\WINDOWS\TEMP\…MYSQL报错解决方法

    错误提示:Error: Can’t create/write to file ‘C:\WINDOWS\TEMP\#sql_738_0.MYD’ (Errcode: 17) Errno.: 1 问题分析: 1、C:\Windows\TEMP 文件夹权限不够,至少也要给出 USERS 组的可读可写权限; 2、C:\...

    解决MySQL因不能创建临时文件而导致无法启动的方法

    首先,当MySQL在启动过程中遇到如“Can't create/write to file '/tmp/ibfguTtC' (Errcode: 13)”这样的错误,表示MySQL无法在 `/tmp` 目录下创建或写入文件,错误代码13通常代表“权限被拒绝”。`/tmp` 目录是Linux...

    MYSQL权限不够解决办法

    在使用MySQL数据库的过程中,可能会遇到“权限不足”的错误提示,这通常是因为当前用户没有足够的权限来执行某些操作(如创建表、删除数据等)。本文将详细介绍如何解决MySQL权限不足的问题,并提供具体的解决方案。...

    如何解决mysqlimport: Error: 13, Can’t get stat of 的问题

    代码如下:root@zhou:/usr/local/mysql# mysqlimport -uroot -p123 -h127.0.0.1 -P3306 test backup/chen.sqlmysqlimport: Error: 13, Can’t get stat of ‘/usr/local/mysql/data/backup/chen.sql’ (Errcode: 2),...

    MySQL 启动报错:File ./mysql-bin.index not found (Errcode: 13)

    MySQL数据库在启动时可能会遇到各种错误,其中一种常见的报错是"File ./mysql-bin.index not found (Errcode: 13)"。这个错误通常表明MySQL无法找到它的二进制日志索引文件(mysql-bin.index),并且错误代码13通常...

    linux安装mysql

    mysqld: Can't create/write to file '/tmp/mysql/data/ibd35qXQ' (Errcode: 13 - Permission denied) InnoDB: Unable to create temporary file; errno: 13 InnoDB: InnoDB Database creation was aborted with ...

    MySQL中报错:Can’t find file: ‘./mysql/plugin.frm’的解决方法

    最近在工作中发现了一个问题,这个问题就是MySQL的磁盘满了,将数据库目录data移动到/data3目录,/etc/my.cnf里面也修改了相应的datadir目录,权限也赋予了,但是service mysql start;的时候报错,下面话不多说了,...

    MYSQL迁移或者升级的故障解决大全

    * 错误日志显示Can't create/write to file '/var/run/mysqld/mysqld.pid'(Errcode: 2),表明目录不存在。 * 错误日志显示Can't start server: can't create PID file: No such file or directory,表明权限不足。 *...

    如何解决mysqlimport: Error: 13, Can't get stat of 的问题

    在使用`mysqlimport`时,有时可能会遇到错误提示“Error: 13, Can't get stat of”,这通常与文件访问权限或路径相关。本文将深入探讨这个问题及其解决方案。 错误13在操作系统中表示“Permission denied”,意味着...

    InnoDB Operating system error number 9 Bad file descriptor

    mysql默认是线程不安全的...[MDEV-9749] InnoDB receives 'Bad file descriptor' error, possibly related to feedback plugin Lost connection to MySQL server at 'handshake- reading initial communication packet'

    MySQL迁移或者升级的故障解决大全

    - `Can't create/write to file '/var/run/mysqld/mysqld.pid' (Errcode: 2)` - `Can't start server: can't create PID file: No such file or directory` - **原因分析**:这些错误通常表明MySQL服务无法创建所...

    mysql-5.7.17-winx64的安装、配置和初始化

    - **错误提示**:“Can't change dir to 'F:\mysql\data\' (Errcode:2 - No such file or directory)” - 解决方案:确保`datadir`配置正确指向已存在的数据目录。 - **警告信息**:“TIMESTAMP with implicit ...

    DB2-ErrorCode解释大全

    ### DB2错误代码详解 #### 引言 在数据库管理领域,DB2作为IBM的一款旗舰级产品,广泛应用于各类企业级应用中。然而,在实际使用过程中难免会遇到各种各样的错误,了解并掌握这些错误代码及其含义对于及时解决问题...

    DB2中几种遇到的SQL1032N出错的解决

    DB2中几种遇到的SQL1032N出错的解决

    mysql启动报错MySQL server PID file could not be found

    如果发现有类似“mysql: error: Can't create/write to file '/var/run/mysqld/mysqld.pid' (Errcode: 2 - No such file or directory)”这样的信息,说明MySQL进程可能已死掉或者没有正确地退出,导致PID文件丢失。...

Global site tag (gtag.js) - Google Analytics