Blue Static

Archive for the ‘mysql’ tag

MySQL in Leopard

Posted on December 4, 2007 at 16:36 UTC, filed under the category Uncategorized. Tags: leopard, mac os x, mysql,

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.