I'm new to both MySQL and Rails. I'm going through a course on Lynda (Ruby on Rails 5) and I ran into a hiccup. After creating a database it's having me start up MySQL and Puma. I attempt to access localhost:3000 however I get the following error:
Mysql2::Error (Access denied for user 'rails_user'@'localhost' to database 'simple_cms_development'):
Johns-MBP:simple_cms johnerickson$ mysql.server start
Johns-MBP:simple_cms johnerickson$ rails s
=> Booting Puma
=> Rails 184.108.40.206 application starting in development on http://localhost:3000
=> Run `rails server -h` for more startup options
Puma starting in single mode...
* Version 3.6.0 (ruby 2.3.0-p0), codename: Sleepy Sunday Serenity
* Min threads: 5, max threads: 5
* Environment: development
* Listening on tcp://localhost:3000
* List item
password: ***The password works***
This particular user does not have enough rights to access the DB. Try after running following commands in mysql prompt. You may have to log as root or some other admin user in order to run this.
grant all on simple_cms_development.* to 'rails_user'@'localhost' identified by '<password>'; flush privileges;