Problem is like it is explained in this bug report<br />
<a href="http://bugs.mysql.com/bug.php?id=60574">http://bugs.mysql.com/bug.php?id=60574</a> [<a href="http://bugs.mysql.com/bug.php?id=60574" target="_blank">^</a>]<br />
Bug report claims that affected versions are 5.1.50 and up. 5.1.49 and older should be OK.<br />
<br />
MySQL can not create temporary files in /tmp. It is same for ANY database!<br />
SELinux is disabled.<br />
I logged to mysql as root and error is same.<br />
<br />
[<a href="mailto:root@chiron">root@chiron</a> ~]# ls -lsahd /tmp<br />
4.0K drwxrwxrwt. 17 root root 4.0K Feb 13 20:55 /tmp<br />
<br />
There is enough space, and I successfully created files as root, mysql <br />
and plnet user (domain owner).<br />
<br />
[<a href="mailto:root@chiron">root@chiron</a> ~]# df -h<br />
Filesystem <br />
Size Used Avail Use% Mounted on<br />
/dev/mapper/vg_chiron-LV_CHIRON_ROOT 25G 15G 8.3G 65% /<br />
tmpfs <br />
1.3G 676K 1.3G 1% /dev/shm<br />
/dev/md0 485M 197M 263M 43% /boot<br />
/dev/mapper/vg_chiron-LG_CHIRON_EXTRA 1.8T 1.6T 143G 92% /extra<br />
<br />
Command used is:<br />
CREATE TEMPORARY TABLE IF NOT EXISTS plugin_temp_table LIKE bak_menu;<br />
Error is:<br />
ERROR 1004 (HY000): Can't create file '/tmp/#sql21f8_f3_0.frm' (errno: 9)<br />
<br />
I tested on cacti database and on 2 Joomla databases with same results.<br />
<br />
Database changed<br />
mysql> CREATE TEMPORARY TABLE IF NOT EXISTS plugin_temp_table LIKE jos_menu;<br />
ERROR 1004 (HY000): Can't create file '/tmp/#sql21f8_f3_1.frm' (errno: 9)<br />
mysql> CREATE TEMPORARY TABLE barney (SELECT * FROM jos_menu WHERE 1=0);<br />
Query OK, 0 rows affected (0.01 sec)<br />
Records: 0 Duplicates: 0 Warnings: 0<br />
<br />
mysql> CREATE TEMPORARY TABLE IF NOT EXISTS plugintest LIKE jos_menu;<br />
ERROR 1004 (HY000): Can't create file '/tmp/#sql21f8_f3_3.frm' (errno: 9)<br />
mysql> CREATE TEMPORARY TABLE IF NOT EXISTS barney LIKE jos_menu;<br />
Query OK, 0 rows affected, 1 warning (0.00 sec)<br />
<br />
Changed name of table to create produced result, but with warning.<br />
<br />
Seams "LIKE" is the problem.
↧
0006990: MySQL can not create temporary database file in /tmp when "LIKE " is used in SQL command.
↧