title: Can't create/write to file (Errcode: 30)
body: <p>I recently had an error on my mysql database and against better judgement (I'm not a server guy at all) I tried to resolve it through googling and changing server stuff...</p>
  
  <p>So first off, mysql was showing this error "Can't create/write to file  (Errcode: 30)"</p>
  
  <p>I think I followed these answers which ended up causing more problems:
  <a href="https://stackoverflow.com/questions/11997012/mysql-cant-create-write-to-file-tmp-sql-3c6-0-myi-errcode-2-what-does">MySQL: Can&#39;t create/write to file &#39;/tmp/#sql_3c6_0.MYI&#39; (Errcode: 2) - What does it even mean?</a>
  <a href="http://nixcraft.com/showthread.php/14260-ERROR-1-(HY000)-Can-t-create-write-to-file-tmp-sql_9f3_0-MYI-(Errcode-13)" rel="nofollow noreferrer">http://nixcraft.com/showthread.php/14260-ERROR-1-(HY000)-Can-t-create-write-to-file-tmp-sql_9f3_0-MYI-(Errcode-13)</a></p>
  
  <p>Only looking back, I see that these googled answers have different error codes, not "30"</p>
  
  <p>Here is the log of the actions I did, causing the server to fail even more at the end (mysqld won't even restart up now)</p>
  
  <pre><code>[root@xxx ~]# /usr/sbin/lsof /tmp
  [root@xxx ~]# /bin/umount -l /tmp
  umount: /tmp: not mounted
  [root@xxx ~]# /bin/umount -l /var/tmp
  umount: /var/tmp: not mounted
  [root@xxx ~]#  cat /etc/my.cnf | grep tmpdir
  [root@xxx ~]#
  [root@xxx ~]# cat /etc/my.cnf | grep tmpdir
  [root@xxx ~]# chown root:root /tmp
  chown: changing ownership of `/tmp': Read-only file system
  [root@xxx ~]# chmod 1777 /tmp
  chmod: changing permissions of `/tmp': Read-only file system
  [root@xxx ~]# /etc/init.d/mysqld restart
  rm: cannot remove `/var/lock/subsys/mysqld': Read-only file system
  rm: cannot remove `/var/lib/mysql/mysql.sock': Read-only file system
  Stopping mysqld:                                           [  OK  ]
  Starting mysqld:                                           [FAILED]
  [root@xxx ~]# chmod 777 /var/lock/subsys/mysqld
  chmod: changing permissions of `/var/lock/subsys/mysqld': Read-only file system
  [root@xxx ~]# chmod 777 /var/lib/mysql/mysql.sock
  chmod: changing permissions of `/var/lib/mysql/mysql.sock': Read-only file system
  [root@xxx ~]# /etc/init.d/mysqld restart
  Stopping mysqld:                                           [FAILED]
  Starting mysqld:                                           [FAILED]
  [root@xxx ~]# /etc/init.d/mysqld restart
  Stopping mysqld:                                           [FAILED]
  Starting mysqld:                                           [FAILED]
  [root@xxx ~]#
  </code></pre>
  
  <p>From the links listed above, you'll see that I tried following things such as</p>
  
  <pre><code>"check mysql config : my.cnf
  cat /etc/my.cnf | grep tmpdir
  I can't see anything in my my.cnf
  add tmpdir=/tmp to my.cnf under [mysqld]
  restart web/app and mysql server
  /etc/init.d/mysqld restart"
  " chown root:root /tmp
    chmod 1777 /tmp
    /etc/init.d/mysqld restart"
  </code></pre>
  
  <p>But yeah, I haven't touched it since because I think I would just be messing it up even more.</p>
  
  <p>Server running is CentOS 6.5 64bit LAMP</p>
  
  <p>Let me know if anyone could shed some insight or if I should provide anymore information. Thanks! Much appreciated.</p>