Fixing MySQL error 13 on Mac OS X 10.6.x

I’m using XAMPP on Mac OS X 10.6.3.
Once I had to restore permissions and after that I started getting this error, every time I try to access InnoDB tables:

Can’t create file ‘/var/folders/aX/aXYUzZmoHruKTlzkbVLQdU+++TM/-Tmp-/#sql10aac_1_0.frm’ (errno: 13)

The problem was that my.cnf disappeared from the “/etc” folder, for some reason. This file should contain path to a MySQL temporary storage.
So, I performed the following simple steps to fix the issue:

1. Open Terminal

$ cd /etc
$ sudo nano my.cnf

Type this in:


Control-X to save it.
Now go to /usr/local/mysql:

$ cd /usr/local/mysql
$ sudo mkdir tmp
$ sudo chown _mysql:wheel tmp
$ sudo chmod 755 tmp

Basically, I just created MySQL temporary storage folder and told MySQL where to find it.
Hope this article will help you if you’re having the same issue.

Filed in: Uncategorized

Philip Tadros - Founder
Founder of Doejo an award winning Innovation Studio and INC 5,000 Company. Tadros also Founded and Manages Space by Doejo a Co-working loft in River North. Tadros was featured on CNBC “Planet of the Apps” and a Moxie Award winner. Tadros’s ability to build and support strong, diverse teams with collaborative cultures, coupled with preference for innovation, has made him an authority on design and technology. He maintains positive and growing relationships with clients at Doejo with Companies like Pandora, Wilson and Groupon as well has helped Doejo be recognized globally as one of twelve WordPress VIP partners including one of the largest media companies, Tribune Media, ranked 45 on Comscore covering over half of the US market. Tadros’ ability to grow Companies has allowed for facilitating Construction, Development, Design as well as cohesively building talented Teams.