[英]RAIL_ENV=production rake db:schema:load aborted with rails 3.1.0 and ubuntu 10.04
Trying to update the production mysql database by doing: rvmsudo RAILS_ENV=production rake db:schema:load on ubuntu 10.04 with rails 3.1.0. 尝试通过执行以下操作更新生产mysql数据库:rvmsudo RAILS_ENV = production rake db:schema:使用rails 3.1.0在ubuntu 10.04上加载。 The purpose of update is to add a table.
更新的目的是添加表。 The mysql db already exists.
mysql数据库已经存在。 Here is the error with trace:
以下是跟踪错误:
dtt@ubuntu:/var/www/mylab/current$ rvmsudo RAILS_ENV=production rake db:schema:load --trace
** Invoke db:schema:load (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:schema:load
-- create_table("categories", {:force=>true})
rake aborted!
Mysql2::Error: DROP command denied to user 'dtt'@'localhost' for table 'categories': DROP TABLE `categories`
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.0/lib/active_record/connection_adapters/mysql2_adapter.rb:283:in `query'
However running rake command without RAILS_ENV=production is fine without error. 但是,在没有RAILS_ENV =生产的情况下运行rake命令没有错误。 But it only created the development db.
但它只创建了开发db。
Any thoughts about the error? 有关错误的任何想法? Thanks.
谢谢。
The user you have configured for your production
environment in config/database.yml
does not have permission to perform the necessary actions on the production environment. 您在
config/database.yml
中为production
环境配置的用户无权在production
环境中执行必要的操作。 Either you need to change your MySQL setup or use a different user. 您需要更改MySQL设置或使用其他用户。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.