Rails5.1.6でWebアプリケーション制作の勉強をしています。
MySQLのバージョンは5.6.40です。
マイグレーションを実行すると以下のようなエラーが出てしまいます。
$ bin/rails db:migrate
Mysql2::Error: Access denied for user 'root'@'localhost' (using password: YES) bin/rails:4:in `require' bin/rails:4:in `<main>' Tasks: TOP => db:migrate (See full trace by running task with --trace)
関係がありそうなファイルの内容は以下のように記述しております。
production.rb Rails.application.configure do config.cache_classes = true config.eager_load = true config.consider_all_requests_local = false config.action_controller.perform_caching = true config.read_encrypted_secrets = true config.serve_static_assets = false config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present? config.assets.js_compressor = :uglifier config.assets.compile = true config.log_level = :debug config.log_tags = [ :request_id ] config.action_mailer.perform_caching = false config.i18n.fallbacks = true config.active_support.deprecation = :notify config.log_formatter = ::Logger::Formatter.new if ENV["RAILS_LOG_TO_STDOUT"].present? logger = ActiveSupport::Logger.new(STDOUT) logger.formatter = config.log_formatter config.logger = ActiveSupport::TaggedLogging.new(logger) end config.active_record.dump_schema_after_migration = false end
database.yml default: &default adapter: mysql2 encoding: utf8 pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %> username: root password: 113edamame socket: /var/lib/mysql/mysql.sock development: <<: *default database: edamame_development test: <<: *default database: edamame_test production: <<: *default database: edamame_production #username: edamame #password: <%= ENV['EDAMAME_DATABASE_PASSWORD'] %> username: root password: 113edamame
どなたか解決方法を教えていただけないでしょうか?宜しくお願いします。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/07/10 05:18