Solve Magento Error MySQL: Can’t create/write to file ‘/tmp/#sql_3c6_0.MYI’

Recently one our client called me and said Magento Site is not working so I checked the site and found following error.

MySQL: Can’t create/write to file ‘/tmp/#sql_3c6_0.MYI’

So what’s the meaning of this error. At first it looks like a permission issue that tmp folder does not have necessary permissions. I checked through SSH and permission was ok. But still it’s not working. 
Second issues could be tmp folder owner is not web root, hence it’s not allowing to create files from web users. I checked that also and owner was correct. 
After few checks through SSH, I found out that it was actually an issue of Inodes on server. Disk was almost full and there were no enough space to create new files. So have to delete some files to create space. 
This you can do through SSH, but make sure you what are the files you are deleting and will that create any issues. If you don’t know much about magento files and folders, PLEASE CONTACT YOUR HOSTING PROVIDER to delete it for you.
In my case I deleted old backups of database and deleted magento caches and sessions files from /var folder and then my site was up and working normally. 
Hope this helps you.
This entry was posted in Magento, Magento Admin, Magento API on by .

About Hiren Dave

Hiren Dave is a software engineer, blogger and consultant with over 9 years of professional experience. He writes code in number of languages. Hiren has a passion for developing web apps, mobile apps and writing books and blog articles about programming. He has a solid experience of startups as he manages products for few startups. He is also passionate about researching and learning new technologies and trends. He has also authored a book Instant Sencha Touch, published by Packt and creator of Video Course "Beginning Laravel" for Packt

Leave a Reply

Your email address will not be published. Required fields are marked *