info91812
By:
info91812

MySQL "describe/explain/show columns from" Problem on Fedora: "ERROR 1 (HY000): Can't create/write to file '/tmp/#sql_2f9_0.MYI' (Errcode: 2)"

May 18, 2013 3.8k views
Hi, Platform: Fedora 17, ZendServer CE 5.6.0, MySQL 5.5.29 I have a problem whenever I try to execute the SQL statement DESCRIBE, EXPLAIN or SHOW COLUMNS FROM, following error is always givin: mysql> describe file_driver; ERROR 1 (HY000): Can't create/write to file '/tmp/#sql_2f9_0.MYI' (Errcode: 2) mysql> explain file_driver; ERROR 1 (HY000): Can't create/write to file '/tmp/#sql_2f9_0.MYI' (Errcode: 2) mysql> SHOW COLUMNS FROM file_driver; ERROR 1 (HY000): Can't create/write to file '/tmp/#sql_2f9_0.MYI' (Errcode: 2) I opened a support ticket and they asked me to execute the following commands to investigate the problem: [root@egyptcloud ~]# mount proc on /proc type proc (rw,nosuid,nodev,noexec,relatime) sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime) devtmpfs on /dev type devtmpfs (rw,nosuid,size=249628k,nr_inodes=62407,mode=755) devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000) tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev) tmpfs on /run type tmpfs (rw,nosuid,nodev,mode=755) /dev/sda on / type ext4 (rw,relatime,errors=remount-ro,user_xattr,barrier=1,data=ordered) securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime) tmpfs on /sys/fs/cgroup type tmpfs (rw,nosuid,nodev,noexec,mode=755) cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd) cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset) cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpuacct,cpu) cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory) cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices) cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer) cgroup on /sys/fs/cgroup/net_cls type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls) cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio) cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event) systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=21,pgrp=1,timeout=300,minproto=5,maxproto=5,direct) hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime) configfs on /sys/kernel/config type configfs (rw,relatime) debugfs on /sys/kernel/debug type debugfs (rw,relatime) tmpfs on /media type tmpfs (rw,nosuid,nodev,noexec,relatime,mode=755) mqueue on /dev/mqueue type mqueue (rw,relatime) binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,relatime) [root@egyptcloud ~]# df -h Filesystem Size Used Avail Use% Mounted on rootfs 20G 2.3G 17G 12% / devtmpfs 244M 0 244M 0% /dev tmpfs 249M 0 249M 0% /dev/shm tmpfs 249M 98M 152M 40% /run /dev/sda 20G 2.3G 17G 12% / tmpfs 249M 0 249M 0% /sys/fs/cgroup tmpfs 249M 0 249M 0% /media [root@egyptcloud ~]# ls -ld /tmp drwxrwxrwt 10 root root 4096 May 16 19:46 /tmp Finally, they couldn't support me in this issue and asked me to put it here! Does anyone have an idea about this problem cause and solution? Thanks in advance
2 Answers
Are you root on the server?
Thanks everybody .. problem is solved by granting mysql ownership on /tmp
Have another answer? Share your knowledge.