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! While you're at it, check out some resources Treehouse students have shared here.
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 trialJoshua Shroy
9,943 Pointsrake 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?
3 Answers
Maciej Czuchnowski
36,441 PointsI 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.
Try this method: http://askubuntu.com/questions/489098/unable-to-reset-root-password-of-mysql
TJ Takei
13,362 PointsThe 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.
[1] sudo dpkg-reconfigure mysql-server-5.5 # (re)set root password
[2] add the pasword in "password: ***" lines of .../config/database.yml
Carlos Reyes
30,056 Pointsweeeeeeeeeeee
This worked for me too, solved my problem in the course ActiveRecord Basic > Migrations.
Working in win 8 + TVM.
Regards,
Nikola Novakovic
4,171 PointsNikola Novakovic
4,171 PointsWow this was so useful! As TJ below said, there was an issue with this on the TreehouseVM and it can be fixed with this! :)))