Mysql question

I have read around on the site and thought I found a solution to my problem but alas that is not the case.

I have downloaded Mysql as a dmg file onto my computer and installed it but when I go to start the server I am getting the following response out of my terminal.

adam-hodnichaks-computer:~ adamhodnichak$ sudo /usr/local/mysql/bin/mysql -u root -p
Enter password:
ERROR 1045 (28000): Access denied for user ‘root’@‘localhost’ (using password: YES)

I am trying to get this set up to user with Ruby on Rails and any help would be greatly appreciated!



You could try resetting the password for root:

/etc/init.d/mysqld stop
mysqld_safe --skip-grant-tables &
mysql -u root
mysql> use mysql;
mysql> update user set password=PASSWORD("newrootpassword") where User='root';
mysql> flush privileges;
mysql> quit
/etc/init.d/mysqld stop
/etc/init.d/mysqld start