Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.Start your free trial
rake db:create & mysql
I recently switched my OS to Ubuntu and re-installed all RoR along with mySQL. After creating my new rails app and type in the good old fashion rake db:create, I receive the following response..
Access denied for user 'root'@'localhost' (using password: NO)Please provide the root password for your mysql installation
I type in my password and receive the same response. I am able to enter into mysql using the same root password with no issues. Can anyone help me identify this problem?
Maciej Czuchnowski36,441 Points
I had the same problem, had to force a change of mysql password for root (although I never set one) and after that write this password in my config/database.yml file.
The same issue for my treehouse virtual machine (VirtualBox + vagrant) that was installed in the previous lessons of RubyOnRails. The fixes Maciej suggested work fine for me: i.e.
 sudo dpkg-reconfigure mysql-server-5.5 # (re)set root password  add the pasword in "password: ***" lines of .../config/database.yml
Carlos Reyes30,056 Points
This worked for me too, solved my problem in the course ActiveRecord Basic > Migrations.
Working in win 8 + TVM.