0

I install mysql for RoR, and I get an access denied error. I've tried searching on the internet for how to go about fixing this ... but I have no clue on how to proceed right now.

Basically, I did this: sudo apt-get install mysql-client mysql-server libmysql-ruby1.8

And I did get the password screen. I am sure I picked a password I know, and yet I am getting the following error when I try to run rake db:create: Access denied for user 'root'@'localhost' (using password: YES)

How can I fix this? Thanks!

3
  • Have you tried using your hostname instead of localhost? Commented Mar 8, 2012 at 23:44
  • what is my hostname? my command line is this: parallels@ubuntu:~/Desktop$ Commented Mar 8, 2012 at 23:50
  • your hostname is "ubuntu" based on your command line. Commented Mar 12, 2012 at 23:08

2 Answers 2

1

Try following the instructions for resetting the root password from the official MySQL documentation:

Read this - MySQL Root Password Reset Instructions

Sign up to request clarification or add additional context in comments.

Comments

1

Are you able to connect to the database using

mysql -uroot -p -hlocalhost

or

mysql -uroot -p -h127.0.0.1

if your able to connect using the second but not the first, modify your database.yml file to include Host: 127.0.0.1 and remove the line with Socket.

1 Comment

both give me "access denied". I just need a way to reset this password somehow ... that's what is so frustrating.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.