rake db:migrate出错

  今天遇到一个比较奇葩的问题,当执行rake db:migrate 出现如下错误:
  rake aborted!
  Mysql2::Error: Tablespace for table 'greentea_development.schema_migrations' exists. Please DISCARD the tablespace before IMPORT.: CREATE TABLE schema_migrations (versionvarchar(255) NOT NULL) ENGINE=InnoDB
  之后我想将数据库中的表删掉试试看,到mysql中执行:
  drop database Greenteadevelopment;
  报出的错误同样让我不解
  ERROR 1010 (HY000): Error dropping database (can't rmdir './greentea
development', errno: 66) 各种gg,搜到很多都是errno:17的error,进入到数据库也没有找到什么怪异的文件。

     问题很快得到了解决:

     进入到mysql的文件中: cd /usr/local/mysql/data

     sudo rm -rf 相关的数据库名

     问题欧拉

posted on 2013-06-19 15:27  小海少  阅读(763)  评论(0编辑  收藏  举报