Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I'm having issues creating a table for my ruby on rails app. It's driving me crazy! The following is returned when I try to create the table:

ERROR 1 (HY000): Can't create/write to file '/usr/local/mysql/data/test_development/users.MYI' (Errcode: 2)

It's worth mentioning I'm a total newbie, btw.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
1.2k views
Welcome To Ask or Share your Answers For Others

1 Answer

This forum post seems to deal with the same problem:

Try the following:

  1. mkdir /var/lib/mysql/tmp
  2. chown mysql:mysql /var/lib/mysql/tmp
  3. Add the following line into the [mysqld] section: tmpdir = /var/lib/mysql/tmp
  4. Restart the server

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...