A blog about technical and cultural experiences to be shared with everyone. This is a personal web page. Things said here do not represent the position of my employer.
Before trying other things or desperate thinking that you MySQL database is corrupted, simply check if you temp directory (/tmp on Linux) exists and accessible. In my case, my /tmp directory got deleted and MySQL could not access database information no longer. Restoring /tmp fixed the problem.
14
comments:
Renato
said...
Nice error message! ;) You probably had a hard time trying to find out it was related the /tmp directory...
Yes, I was desperate when accessing all tables returned that error. Fortunately it was only my development machine and nothing serious would happen, even if everything got corrupted :-)
After checking the log, I saw that when it started failing to access the tables, MySQL complained something about /tmp, what led me to check if everything was all right with this directory.
Oh, thank you! I had modified the my.cnf to use /data/mysql/tmp as I wanted the mysql stuff kept on a nice large RAID10 drive, and apparently I made a tmp folder somewhere, but it wasn't under /data/mysql. Found this page, verified that it was the problem, and fixed. Again, thanks!
Thank you. Indeed, the permissions on /tmp had changed. Gotta love that panic call "uh, Dave, the database is making a grinding sound and everyone is going on a break, by the way fix it now". Cheers
I was having the same problem. The other day I deleted everything in my /tmp directory as I didn't have enough space. I thought /tmp files are temporary but it appeared that I was wrong. I'm trying to install a fresh ubuntu 8.04 right now. Hopefully I can get my database working there.
14 comments:
Nice error message! ;) You probably had a hard time trying to find out it was related the /tmp directory...
Yes, I was desperate when accessing all tables returned that error. Fortunately it was only my development machine and nothing serious would happen, even if everything got corrupted :-)
After checking the log, I saw that when it started failing to access the tables, MySQL complained something about /tmp, what led me to check if everything was all right with this directory.
I got the same problem but with /var/tmp, the rights have changed automatically when I've restard mysqld.
So I solve the problem with "chmod 1777 /var/tmp".
Is 1777 the correct rights for "/var/tmp" ?
Thank You! Thank You! Thank You!
I thought I lost everything! It would have been a very bad day!
I mounted a new /tmp filesystem, but didn't have the permissions setup correctly...
Thank You!
Oh, thank you! I had modified the my.cnf to use /data/mysql/tmp as I wanted the mysql stuff kept on a nice large RAID10 drive, and apparently I made a tmp folder somewhere, but it wasn't under /data/mysql. Found this page, verified that it was the problem, and fixed. Again, thanks!
Thank you. Indeed, the permissions on /tmp had changed. Gotta love that panic call "uh, Dave, the database is making a grinding sound and everyone is going on a break, by the way fix it now". Cheers
I was having the same problem. The other day I deleted everything in my /tmp directory as I didn't have enough space. I thought /tmp files are temporary but it appeared that I was wrong. I'm trying to install a fresh ubuntu 8.04 right now. Hopefully I can get my database working there.
This worked perfectly! Thanks so much. I really thought I was screwed.
Thanks! Indeed it was the case for me /tmp didn't have adequate permission for mysql. At least I'm one step further - now I have the problem
Error 1146: Table 'dbname.table' doesn't exist
jeez it's always something.
Excellent Post!!!!
Saved what little hair I have left for such an easy fix.
wow, thanks ... cleaned up "/tmp/" and received the same error ... it's now working again!
Thanks a LOT. Another soul is saved! :D
We are getting the same error in solaris where MySQl is installed in a cluster of 3 nodes.
Can't see any tmp folder here.
Please help.
awesome.
You just saved me one or two hours of downtime on a production server :)
Post a Comment