Capistrano mysql2错误命令被拒绝给用户

时间:2015-01-21 14:33:07

标签: ruby-on-rails capistrano mysql2

当我使用Capistrano进行部署时,它会运行rake db:migrate,然后我会收到以下错误:

rake aborted!
DEBUG [42a60046]    
DEBUG [42a60046]    ActiveRecord::StatementInvalid: Mysql2::Error: CREATE command denied to user 'stageapp'@'localhost' for table 'schema_migrations': CREATE TABLE `schema_migrations` (`version` varchar(255) NOT NULL) ENGINE=InnoDB

1 个答案:

答案 0 :(得分:0)

Зелёный的评论是解决方案

    "mysql> grant all on stageapp.* to 'you_db_user'@'localhost';"