Problem that study rails on leopard

hi, guys:

i’m Writing Depot app on Mac OS X(10.5.2 Leopard) using bash, when running a db migrate to create product table, and i get this error:

rake aborted!

Mysql::Error: Can’t create/write to file ‘/var/folders/Gt/GthmQ9UrH-Ols3WlCkC7qE+++TI/-Tmp-/#sql_1f4_0.MYI’ (Errcode: 13): SHOW FIELDS FROM products

Anyone knows this reason and tell me how to solve it, thinks

Venture Lee wrote:

rake aborted!
Mysql::Error: Can't create/write to file
'/var/folders/Gt/GthmQ9UrH-Ols3WlCkC7qE+++TI/-Tmp-/#sql_1f4_0.MYI'
(Errcode:
13): SHOW FIELDS FROM products

    Anyone knows this reason and tell me how to solve it, thinks

It appears that your mysql can't access it's own storage files, check
permissions on the folders and make sure that the account that mysql is
using has write permissions to that folder..

Perhaps reinstalling mysql will solve the problem

hth

ilan

I would say your MySQL installation is screwed up somehow. That folder looks not normal. How did you install Rails and MySQL?

Venture Lee wrote:

Mysql::Error: Can't create/write to file
'/var/folders/Gt/GthmQ9UrH-Ols3WlCkC7qE+++TI/-Tmp-/#sql_1f4_0.MYI'
(Errcode:
13): SHOW FIELDS FROM products

This area (/var/folders) contains a number of files related to running
applications. In this particular case, it looks like some temporary
storage for MySQL. Was MySQL installed as an admin user? Is it set to
start up on boot or do you start it manually?

The /var/folders area is a protected area and, in general, only
applications running with admin rights will be able to use it so MySQL
must be setup from an admin user account.

My recommendation would be to stop the MySQL service (from System
Preferences), re-install the package as an admin user, setting it
running (from the admin account) and try again.

Some people have had success by just giving all users on the machine
full read/write access to /var/folders (as admin user: sudo chown -R
a+rw /var/folders), but this should be a last resort as it may open up
your machine to other problems.

Try searching the internet for references to this directory (especially
on Apple support sites).

thanks all, i’m a newbie with leopard, and i download mysql from www.mysql.com (mysql-5.1.23.dmg), and install it by a normal user, then su to root user, run the script “/usr/local/mysql/support-files/mysql.server start” to start mysql server, i don’t know this way correctly or not, and if i was wrong, what should i do? thanks very much~

i have seloved this problem, add parameter --user=root to start mysql

Can you please tell me, where did you add this parameter?