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

Categories

0 votes
1.2k views
in Technique[技术] by (71.8m points)

database table - MySQL Error 1 (HY000) Trouble creating file Errcode 2

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...