2017-02-19 21 views
0

Я пытаюсь запустить heroku run rake db:migrate -r staging, но я получив эту ошибку.Mysql2 :: Ошибка: команда INSERT запрещена для пользователя 'username' @ 'host' для таблицы 'schema_migrations': INSERT INTO `schema_migrations` (` version`) VALUES ('')

Mysql2::Error: INSERT command denied to user 'username'@'host' for table 'schema_migrations': INSERT INTO `schema_migrations` (`version`) VALUES ('20170208234859') 
rake aborted! 
StandardError: An error has occurred, all later migrations canceled: 

Mysql2::Error: INSERT command denied to user 'username'@'host' for table 'schema_migrations': INSERT INTO `schema_migrations` (`version`) VALUES ('20170208234859')/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:303:in `query' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:303:in `block in execute' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/connection_adapters/abstract_adapter.rb:373:in `block in log' 
/app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.1.4/lib/active_support/notifications/instrumenter.rb:20:in `instrument' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/connection_adapters/abstract_adapter.rb:367:in `log' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:303:in `execute' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/connection_adapters/mysql2_adapter.rb:228:in `execute' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/connection_adapters/mysql2_adapter.rb:250:in `exec_insert' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/connection_adapters/abstract/database_statements.rb:95:in `insert' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/connection_adapters/abstract/query_cache.rb:14:in `insert' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/relation.rb:64:in `insert' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/persistence.rb:502:in `_create_record' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/attribute_methods/dirty.rb:87:in `_create_record' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/callbacks.rb:306:in `block in _create_record' 
/app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:82:in `run_callbacks' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/callbacks.rb:306:in `_create_record' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/timestamp.rb:57:in `_create_record' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/persistence.rb:482:in `create_or_update' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/callbacks.rb:302:in `block in create_or_update' 
/app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:82:in `run_callbacks' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/callbacks.rb:302:in `create_or_update' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/persistence.rb:125:in `save!' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/validations.rb:57:in `save!' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/attribute_methods/dirty.rb:29:in `save!' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/transactions.rb:273:in `block in save!' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/transactions.rb:329:in `block in with_transaction_returning_status' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/connection_adapters/abstract/database_statements.rb:201:in `block in transaction' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/connection_adapters/abstract/database_statements.rb:209:in `within_new_transaction' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/connection_adapters/abstract/database_statements.rb:201:in `transaction' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/transactions.rb:208:in `transaction' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/transactions.rb:326:in `with_transaction_returning_status' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/transactions.rb:273:in `save!' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/validations.rb:41:in `create!' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/migration.rb:1023:in `record_version_state_after_migrating' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/migration.rb:993:in `block in execute_migration_in_transaction' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/migration.rb:1040:in `ddl_transaction' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/migration.rb:991:in `execute_migration_in_transaction' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/migration.rb:953:in `block in migrate' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/migration.rb:949:in `each' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/migration.rb:949:in `migrate' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/migration.rb:807:in `up' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/migration.rb:785:in `migrate' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/railties/databases.rake:34:in `block (2 levels) in <top (required)>' 
/app/vendor/bundle/ruby/2.2.0/gems/bundler-1.13.7/lib/bundler/cli/exec.rb:74:in `load' 
/app/vendor/bundle/ruby/2.2.0/gems/bundler-1.13.7/lib/bundler/cli/exec.rb:74:in `kernel_load' 
/app/vendor/bundle/ruby/2.2.0/gems/bundler-1.13.7/lib/bundler/cli/exec.rb:27:in `run' 
/app/vendor/bundle/ruby/2.2.0/gems/bundler-1.13.7/lib/bundler/cli.rb:332:in `exec' 
/app/vendor/bundle/ruby/2.2.0/gems/bundler-1.13.7/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run' 
/app/vendor/bundle/ruby/2.2.0/gems/bundler-1.13.7/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command' 
/app/vendor/bundle/ruby/2.2.0/gems/bundler-1.13.7/lib/bundler/vendor/thor/lib/thor.rb:359:in `dispatch' 
/app/vendor/bundle/ruby/2.2.0/gems/bundler-1.13.7/lib/bundler/cli.rb:20:in `dispatch' 
/app/vendor/bundle/ruby/2.2.0/gems/bundler-1.13.7/lib/bundler/vendor/thor/lib/thor/base.rb:440:in `start' 
/app/vendor/bundle/ruby/2.2.0/gems/bundler-1.13.7/lib/bundler/cli.rb:11:in `start' 
/app/vendor/bundle/ruby/2.2.0/gems/bundler-1.13.7/exe/bundle:34:in `block in <top (required)>' 
/app/vendor/bundle/ruby/2.2.0/gems/bundler-1.13.7/lib/bundler/friendly_errors.rb:100:in `with_friendly_errors' 
/app/vendor/bundle/ruby/2.2.0/gems/bundler-1.13.7/exe/bundle:26:in `<top (required)>' 
/app/bin/bundle:3:in `load' 
/app/bin/bundle:3:in `<main>' 
ActiveRecord::StatementInvalid: Mysql2::Error: INSERT command denied to user 'username'@'host' for table 'schema_migrations': INSERT INTO `schema_migrations` (`version`) VALUES ('20170208234859') 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:303:in `query' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:303:in `block in execute' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/connection_adapters/abstract_adapter.rb:373:in `block in log' 
/app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.1.4/lib/active_support/notifications/instrumenter.rb:20:in `instrument' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/connection_adapters/abstract_adapter.rb:367:in `log' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:303:in `execute' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/connection_adapters/mysql2_adapter.rb:228:in `execute' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/connection_adapters/mysql2_adapter.rb:250:in `exec_insert' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/connection_adapters/abstract/database_statements.rb:95:in `insert' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/connection_adapters/abstract/query_cache.rb:14:in `insert' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/relation.rb:64:in `insert' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/persistence.rb:502:in `_create_record' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/attribute_methods/dirty.rb:87:in `_create_record' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/callbacks.rb:306:in `block in _create_record' 
/app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:82:in `run_callbacks' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/callbacks.rb:306:in `_create_record' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/timestamp.rb:57:in `_create_record' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/persistence.rb:482:in `create_or_update' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/callbacks.rb:302:in `block in create_or_update' 
/app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:82:in `run_callbacks' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/callbacks.rb:302:in `create_or_update' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/persistence.rb:125:in `save!' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/validations.rb:57:in `save!' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/attribute_methods/dirty.rb:29:in `save!' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/transactions.rb:273:in `block in save!' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/transactions.rb:329:in `block in with_transaction_returning_status' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/connection_adapters/abstract/database_statements.rb:201:in `block in transaction' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/connection_adapters/abstract/database_statements.rb:209:in `within_new_transaction' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/connection_adapters/abstract/database_statements.rb:201:in `transaction' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/transactions.rb:208:in `transaction' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/transactions.rb:326:in `with_transaction_returning_status' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/transactions.rb:273:in `save!' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/validations.rb:41:in `create!' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/migration.rb:1023:in `record_version_state_after_migrating' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/migration.rb:993:in `block in execute_migration_in_transaction' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/migration.rb:1040:in `ddl_transaction' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/migration.rb:991:in `execute_migration_in_transaction' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/migration.rb:953:in `block in migrate' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/migration.rb:949:in `each' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/migration.rb:949:in `migrate' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/migration.rb:807:in `up' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/migration.rb:785:in `migrate' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/railties/databases.rake:34:in `block (2 levels) in <top (required)>' 
/app/vendor/bundle/ruby/2.2.0/gems/bundler-1.13.7/lib/bundler/cli/exec.rb:74:in `load' 
/app/vendor/bundle/ruby/2.2.0/gems/bundler-1.13.7/lib/bundler/cli/exec.rb:74:in `kernel_load' 
/app/vendor/bundle/ruby/2.2.0/gems/bundler-1.13.7/lib/bundler/cli/exec.rb:27:in `run' 
/app/vendor/bundle/ruby/2.2.0/gems/bundler-1.13.7/lib/bundler/cli.rb:332:in `exec' 
/app/vendor/bundle/ruby/2.2.0/gems/bundler-1.13.7/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run' 
/app/vendor/bundle/ruby/2.2.0/gems/bundler-1.13.7/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command' 
/app/vendor/bundle/ruby/2.2.0/gems/bundler-1.13.7/lib/bundler/vendor/thor/lib/thor.rb:359:in `dispatch' 
/app/vendor/bundle/ruby/2.2.0/gems/bundler-1.13.7/lib/bundler/cli.rb:20:in `dispatch' 
/app/vendor/bundle/ruby/2.2.0/gems/bundler-1.13.7/lib/bundler/vendor/thor/lib/thor/base.rb:440:in `start' 
/app/vendor/bundle/ruby/2.2.0/gems/bundler-1.13.7/lib/bundler/cli.rb:11:in `start' 
/app/vendor/bundle/ruby/2.2.0/gems/bundler-1.13.7/exe/bundle:34:in `block in <top (required)>' 
/app/vendor/bundle/ruby/2.2.0/gems/bundler-1.13.7/lib/bundler/friendly_errors.rb:100:in `with_friendly_errors' 
/app/vendor/bundle/ruby/2.2.0/gems/bundler-1.13.7/exe/bundle:26:in `<top (required)>' 
/app/bin/bundle:3:in `load' 
/app/bin/bundle:3:in `<main>' 
Mysql2::Error: INSERT command denied to user 'username'@'host' for table 'schema_migrations' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:303:in `query' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:303:in `block in execute' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/connection_adapters/abstract_adapter.rb:373:in `block in log' 
/app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.1.4/lib/active_support/notifications/instrumenter.rb:20:in `instrument' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/connection_adapters/abstract_adapter.rb:367:in `log' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:303:in `execute' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/connection_adapters/mysql2_adapter.rb:228:in `execute' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/connection_adapters/mysql2_adapter.rb:250:in `exec_insert' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/connection_adapters/abstract/database_statements.rb:95:in `insert' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/connection_adapters/abstract/query_cache.rb:14:in `insert' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/relation.rb:64:in `insert' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/persistence.rb:502:in `_create_record' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/attribute_methods/dirty.rb:87:in `_create_record' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/callbacks.rb:306:in `block in _create_record' 
/app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:82:in `run_callbacks' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/callbacks.rb:306:in `_create_record' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/timestamp.rb:57:in `_create_record' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/persistence.rb:482:in `create_or_update' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/callbacks.rb:302:in `block in create_or_update' 
/app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:82:in `run_callbacks' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/callbacks.rb:302:in `create_or_update' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/persistence.rb:125:in `save!' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/validations.rb:57:in `save!' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/attribute_methods/dirty.rb:29:in `save!' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/transactions.rb:273:in `block in save!' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/transactions.rb:329:in `block in with_transaction_returning_status' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/connection_adapters/abstract/database_statements.rb:201:in `block in transaction' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/connection_adapters/abstract/database_statements.rb:209:in `within_new_transaction' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/connection_adapters/abstract/database_statements.rb:201:in `transaction' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/transactions.rb:208:in `transaction' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/transactions.rb:326:in `with_transaction_returning_status' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/transactions.rb:273:in `save!' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/validations.rb:41:in `create!' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/migration.rb:1023:in `record_version_state_after_migrating' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/migration.rb:993:in `block in execute_migration_in_transaction' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/migration.rb:1040:in `ddl_transaction' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/migration.rb:991:in `execute_migration_in_transaction' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/migration.rb:953:in `block in migrate' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/migration.rb:949:in `each' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/migration.rb:949:in `migrate' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/migration.rb:807:in `up' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/migration.rb:785:in `migrate' 
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.4/lib/active_record/railties/databases.rake:34:in `block (2 levels) in <top (required)>' 
/app/vendor/bundle/ruby/2.2.0/gems/bundler-1.13.7/lib/bundler/cli/exec.rb:74:in `load' 
/app/vendor/bundle/ruby/2.2.0/gems/bundler-1.13.7/lib/bundler/cli/exec.rb:74:in `kernel_load' 
/app/vendor/bundle/ruby/2.2.0/gems/bundler-1.13.7/lib/bundler/cli/exec.rb:27:in `run' 
/app/vendor/bundle/ruby/2.2.0/gems/bundler-1.13.7/lib/bundler/cli.rb:332:in `exec' 
/app/vendor/bundle/ruby/2.2.0/gems/bundler-1.13.7/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run' 
/app/vendor/bundle/ruby/2.2.0/gems/bundler-1.13.7/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command' 
/app/vendor/bundle/ruby/2.2.0/gems/bundler-1.13.7/lib/bundler/vendor/thor/lib/thor.rb:359:in `dispatch' 
/app/vendor/bundle/ruby/2.2.0/gems/bundler-1.13.7/lib/bundler/cli.rb:20:in `dispatch' 
/app/vendor/bundle/ruby/2.2.0/gems/bundler-1.13.7/lib/bundler/vendor/thor/lib/thor/base.rb:440:in `start' 
/app/vendor/bundle/ruby/2.2.0/gems/bundler-1.13.7/lib/bundler/cli.rb:11:in `start' 
/app/vendor/bundle/ruby/2.2.0/gems/bundler-1.13.7/exe/bundle:34:in `block in <top (required)>' 
/app/vendor/bundle/ruby/2.2.0/gems/bundler-1.13.7/lib/bundler/friendly_errors.rb:100:in `with_friendly_errors' 
/app/vendor/bundle/ruby/2.2.0/gems/bundler-1.13.7/exe/bundle:26:in `<top (required)>' 
/app/bin/bundle:3:in `load' 
/app/bin/bundle:3:in `<main>' 
Tasks: TOP => db:migrate 
(See full trace by running task with --trace) 

Я пробовал много решений, но пока не могу его решить.

Я попытался предоставить все привилегии этому пользователю, но он говорит, что доступ запрещен.

ERROR 1045 (28000): Access denied for user 'username'@'%' (using password: YES)

Я также попытался показать гранты для этого пользователя, но я получаю

mysql> show grants for 'username'@'host'; 

ERROR 1141 (42000): There is no such grant defined for user 'username' on host 'host'

Когда я бегу show databases; (MySQL) базы данных не существует только две базы данных существуют (INFORMATION_SCHEMA и моя база данных)

Я также пробовал ответы на многие вопросы о stackoverflow, но ничего не работало!

+0

Это правильную команду для миграции? Я думаю, это должно быть как 'heroku run rake db: migrate'. – Sajan

+0

Вы правы. Я пропустил его во время написания. –

+0

попробуйте. 'GRANT ALL ON dbname. * TO 'username' @ 'host';' replace 'dbname' с нашим' db' – Sravan

ответ

1

проблема заключалась в том, что моя база данных превысила максимальный размер, указанный cleardb для моего плана. поэтому мои привилегии были отключены.

enter image description here

я нашел подобные проблемы здесь https://getsatisfaction.com/cleardb