I am working through a RoR tutorial from lynda.com for a week already & without changing anything today i was not able to see my content on localhost due to this error :
Mysql2::Error Access denied for user 'simple_cms'@'localhost' (using password: YES)
I do know that this problem has been referred many times befored , i am still not able to find a confirmed solution .
To give you further information regarding my set up my working enviroment is Yosemite 10.10.4 - Rails 3.2.22 - 5.6.22 MySQL - WEBrick 1.3.1
i have set up the SQL database as it looks below on the database.yml file on the config folder of the project
development:
adapter: mysql2
encoding: utf8
reconnect: false
database: simple_cms_development
pool: 5
username: simple_cms
password: **********
socket: /tmp/mysql.sock
test:
adapter: mysql2
encoding: utf8
reconnect: false
database: simple_cms_test
pool: 5
username: root
password:
socket: /tmp/mysql.sock
production:
adapter: mysql2
encoding: utf8
reconnect: false
database: simple_cms_production
pool: 5
username: root
password:
socket: /tmp/mysql.sock
Also i noticed that by trying to connect via terminal on the database with the password
§ mysql -u root -p
and again i get the error ::ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES).
I tried to restart manually MySQL server from menu & all i got was the same error!
What is the problem and it doesn't let me log in with the settings as i did all this time ?
Is it a problem with rails or with mysql settings?
While everything seems to be as it has to be,do i have to change something on the database.yml file?
mysql -uroot -pwithout the space between u and root3306port & after i runned this commandmysql -uroot -pi got the same error message as i stated above!mysql -uroot -P3306 -psay? Does mysql ask for a Password?mysql -uroot -P3306