MySQL in Leopard
Many people have been reporting issues with MySQL under Leopard with this error:
mysqld: Can't create/write to file '/var/folders/2F/2FtguLeuG1ibx1X9tbDS0E+++TI/-Tmp-/ibYWBjEU' (Errcode: 13)
071204 11:15:48 InnoDB: Error: unable to create temporary file; errno: 13
I have discovered a fix for this particular issue. First, in the Terminal, go into your MySQL root directory (mine is /usr/local/mysql). Then type these commands:
sudo mkdir tmp
sudo chown _mysql:wheel tmp
sudo chmod 755 tmp
This will create a temporary directory that MySQL will use. Now we have to make sure MySQL knows about this new location for temporary information, so open up your my.cnf and add this line:
tmpdir=/usr/local/mysql/tmp
(Where the path after the equals sign is the path to your tmp directory).
After this, restart MySQL and all should run fine.
Danny Bates said on February 19th, 2008 at 10:39 am :
Thank you so much!
I’m so new to MySQL and your simple explanation and solution are perfect. Not too much, not too little. Seems others get too wordy with their experience and solutions, which generally causes confusion, but this hit the spot.
Thanks again!