/usr/libexec/mysqld: Can't create/write to file '/tmp/' (Errcode: 13)

/usr/libexec/mysqld: Can't create/write to file '/tmp/' (Errcode: 13)

The error /usr/libexec/mysqld: Can't create/write to file '/tmp/' (Errcode: 13) typically occurs when the MySQL server is unable to create or write to the /tmp directory. This can be caused by a number of factors, such as incorrect permissions or insufficient disk space.

To troubleshoot this issue, you can try the following steps:

  1. Check the permissions on the /tmp directory. Make sure that the MySQL user (typically mysql) has the necessary permissions to create and write to the /tmp directory. You can use the chmod command to set the correct permissions on the /tmp directory:
refer‮t ‬o:lautturi.com
chmod 755 /tmp
  1. Check the disk space. Make sure that there is sufficient disk space available to create and write to the /tmp directory. If the disk is full, you may need to free up some space by deleting unnecessary files or increasing the size of the partition.

  2. Restart the MySQL server. Sometimes, simply restarting the MySQL server can resolve the issue. You can use the following command to restart the MySQL server:

service mysql restart
  1. Check the MySQL configuration. Make sure that the tmpdir variable in the MySQL configuration file (usually /etc/my.cnf) is set to the correct directory. The tmpdir variable should point to a directory that the MySQL user has permission to create and write to.

If none of these steps help, you may need to further investigate the issue by checking the MySQL error logs or consulting with a MySQL expert.

Created Time:2017-10-27 14:56:37  Author:lautturi