I am trying to create a database and connect it with my rails app.
When I try to check if my database are properly connected via:
rails db:schema:dump
It gives me the ff error:
Mysql2::Error: Access denied for user 'rails_user'@'localhost' (using password:
YES)
bin/rails:4:in `require'
bin/rails:4:in `<main>'
Tasks: TOP => db:schema:dump
(See full trace by running task with --trace)
This blows my mind as did used the exact password when I created the DB:
default: &default
adapter: mysql2
encoding: utf8
pool: 5
username: rails_user
password: grace0512
host: localhost
development:
<<: *default
database: test_project_development
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
<<: *default
database: test_project_test
I did try this:
grant all on simple_cms_development.* to 'rails_user'@'localhost' identified by '<password>';
flush privileges;
But did not solve my issue. Any help please?
I really need to solve this to move forward!
Have you fixed it yet?
I changed it slightly and put
Although I still received Rails warnings, it successfully did a schema dump afterwards!