Plesk shows SQLSTATE[HY000] [2002] No such file or directory: General error: 1 Can't create/write to file '/tmp/#sql_de3_0.MYI' (Errcode: 13)

Created:

2016-11-16 12:57:46 UTC

Modified:

2017-04-24 11:13:29 UTC

3

Was this article helpful?


Have more questions?

Submit a request

Plesk shows SQLSTATE[HY000] [2002] No such file or directory: General error: 1 Can't create/write to file '/tmp/#sql_de3_0.MYI' (Errcode: 13)

Applicable to:

  • Plesk 10.4 for Linux
  • Plesk 11.0 for Linux
  • Plesk 11.5 for Linux
  • Plesk
  • Plesk 12.0 for Linux

Symptoms

Plesk shows the following errors after login.

ERROR: Zend_Db_Statement_Exception
SQLSTATE[HY000]: General error: 1 Can't create/write to file '/tmp/#sql_de3_0.MYI' (Errcode: 13)


0: Pdo.php:238
Zend_Db_Statement_Pdo->_execute(array)
1: Statement.php:283
Zend_Db_Statement->execute(array)
2: Abstract.php:433
Zend_Db_Adapter_Abstract->query(string 'DESCRIBE `sessions`', array)
3: Abstract.php:230
Zend_Db_Adapter_Pdo_Abstract->query(string 'DESCRIBE `sessions`')
4: Mysql.php:136
Zend_Db_Adapter_Pdo_Mysql->describeTable(string 'sessions', NULL null)
5: Abstract.php:696
Zend_Db_Table_Abstract->_setupMetadata()
6: Abstract.php:722
Zend_Db_Table_Abstract->_getCols()
7: Abstract.php:762
Zend_Db_Table_Abstract->_setupPrimaryKey()
8: DbTable.php:517
Zend_Session_SaveHandler_DbTable->_getPrimary(string '63bb27967cbeefc660a97b01a78f9034')
9: DbTable.php:316
Zend_Session_SaveHandler_DbTable->read(string '63bb27967cbeefc660a97b01a78f9034')
10: SaveHandler.php:26
CommonPanel_Session_SaveHandler->read(string '63bb27967cbeefc660a97b01a78f9034')
11: :
session_start()
12: class.Session.php:150
Session->Session()
13: auth.php3:183

Or not accessible with the following error:

ERROR: Zend_Db_Adapter_Exception: SQLSTATE[HY000] [2002] No such file or directory

and MySQL service cannot be started:

# service mysqld start
MySQL Daemon failed to start.
Starting mysqld: [FAILED]

Cause

  • ' /tmp ' partition has run out of space and the file can't be created
  • For some reason, the ' mysqld ' process cannot write to the directory mentioned in the error message because of permission problems. Invalid SELinux settings can also be a reason of such error.

Resolution

Make sure that the /tmp directory is granted with full permissions.

# ls -ld /tmp
drwxrwxrwt 3 root root 12288 Mar 16 22:49 /tmp

Full permissions can be granted to the /tmp directory with the following command:

# chmod 1777 /tmp

Start MySQL service after fixing the permissions.

# service mysqld start
Have more questions? Submit a request
Please sign in to leave a comment.