Go Back   CodingForums.com > :: Server side development > Ruby & Ruby On Rails

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 01-20-2009, 09:55 PM   PM User | #1
rptodd1
New Coder

 
Join Date: Oct 2006
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
rptodd1 is an unknown quantity at this point
Newbie needs help with the rake db:migrate command

Hi, I'm running ROR on my Max OSX Darwin with mysql. I've successfully installed the mysql gem abd have created the active record class by extending ActiveRecord::Migration I have defined my database.yml as follows for development (names changed to protect the innocent ) )

development:
adapter: mysql
database: myData_development
username: userName
passwoed: myPassword
host: localhost

when rake runs it stops with the following

rake aborted!
Access denied for user 'userName'@'localhost' (using password: NO)

2 questions. Why isn't it using the password supplied in the database.yml file? and how can I make it do so?

Thanks for the help.
rptodd1 is offline   Reply With Quote
Old 03-17-2009, 08:48 AM   PM User | #2
NoJ
New to the CF scene

 
Join Date: Mar 2009
Location: Germany
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
NoJ is an unknown quantity at this point
rptodd1,

if your database.yml has the correct structure, then this password is used so dont worry about that. Try the following
Code:
mysql -p userName
from your local machine and key in the password you are using in your database.yml as it seems that the error lies with mysql.
If your connection is ineed refused, login as root/administrator and do a
Code:
GRANT ALL ON myData_development.* TO 'userName'@'localhost' IDENTIFIED BY 'passWord'
for adding the user to mysql.
NoJ is offline   Reply With Quote
Old 05-07-2009, 01:10 AM   PM User | #3
ralph l mayo
Regular Coder

 
ralph l mayo's Avatar
 
Join Date: Nov 2005
Posts: 951
Thanks: 1
Thanked 31 Times in 29 Posts
ralph l mayo is on a distinguished road
Did you ever figure this out? It's because you spelled 'password' with an 'e'

(using password: NO) in MySQL parlance means the client did not attempt to give the server a password at all, so it's not (yet) a grant issue.
ralph l mayo is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:45 PM.


Advertisement
Log in to turn off these ads.