I get the following error, when trying to generate an app.
I have a database.yml with my db login info, but not sure what this error is exactly. Does anyone know what it is?
I assume it is verify login to the test db.
I get the following error, when trying to generate an app.
I have a database.yml with my db login info, but not sure what this error is exactly. Does anyone know what it is?
I assume it is verify login to the test db.
Make sure that your db username and password are configured for the development environment, not just the test environment. Initial rails application setup is there.
The test database is used by tests, such as rake spec or rake test and the development database is used when you are working with rails such as rails generate or rails console.
A typical setup is below:
development:
adapter: mysql2
encoding: utf8
reconnect: false
database: foo_development
pool: 5
username: db_username
password: db_password
socket: /tmp/mysql.sock
test:
adapter: mysql2
encoding: utf8
reconnect: false
database: foo_test
pool: 5
username: db_username
password: db_password
socket: /tmp/mysql.sock
config/database.yml is how you override the default.mysql -u root works.I wanted to contribute my answer to this. It sounds kind of amateur but it may help some poor chap that had the same issue as me.
I had my password in database.yml configured like this:
development:
<<: *default
database: my_db_name
username: my_username
password: !?my_password913
It's a rookie mistake but it screwed me up for a few minutes.
Ensure you wrap your password with quotes if you use special characters because ! for instance would evaluate as a boolean expression of false which would make mysql2 ignore the password field and send password=no
Thanks!