My System is macOX Mojave 10.14
MySQL is MySQL:8.0.16
My database.yml
is:
development:
adapter: mysql2
encoding: utf8
database: dev_database
reconnect: false
pool: 5
username: <%= ENV['RAILS_DEV_DB_USSERNAME'] %>
password: <%= ENV['RAILS_DEV_DB_PASSWORD'] %>
socket: /tmp/mysql.sock
and I have confirmed if the variable is valid. Using
Command-Line: erb config/database.yml
I can get:
development:
adapter: mysql2
encoding: utf8
database: dev_database
reconnect: false
pool: 5
username: root
password: Wle3S#23sv
socket: /tmp/mysql.sock
But when I start rails s -e developent
, and browse to my page, I can not connect to my database.
What can I do now?