I'm totally new to programming, and I've started my training by watching the ruby on rails 4 essential training tutorial at lynda.com. I got to the section where I was supposed to create a web server by first opening the code in my database.yml file, then entering my password for mysql, then starting a server by typing "rails server" in the command line. It didn't work at localhost:3000. I tried granting privileges to the databases in mysql to the account, and I even tried changing the password, but it still doesn't work. When I go to localhost:3000, it still says : Access denied for user 'root'@'localhost' (using password: NO).
Also, I have a host name written in the code, but no socket. I don't know if this changes anything, I may just have a newer version of mysql than the guy in the video.
Here is the code:
# MySQL. Versions 4.1 and 5.0 are recommended. # # Install the MYSQL driver # gem install mysql2 # # Ensure the MySQL gem is defined in your Gemfile # gem 'mysql2' # # And be sure to use new-style password hashing: # http://dev.mysql.com/doc/refman/5.0/en/old-client.html development: adapter: mysql2 encoding: utf8 database: #my_cms_development pool: 5 username: root password: snapple187 host: localhost # 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: adapter: mysql2 encoding: utf8 database: my_cms_test pool: 5 username: root password: snapple187 host: localhost production: adapter: mysql2 encoding: utf8 database: #my_cms_production pool: 5 username: root password: snapple187 host: localhost
Thank you for taking the time to help solve this issue.