Mysql + Snow Leopard + Rails

I am very interested to start playing with rails, but I have now spent
a whole day trying to get it all working. Which is quite
disheartening. My latest issues is from within ruby when I try to
connect to the DB it says:
“rake aborted!
Access denied for user”

But: 1. I use the same connection settings to log into mysql, so I
don’t see how that is.
2. Does it mean that I don’t have something pointed correctly?
Can some one help?

** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:migrate
rake aborted!
Access denied for user ‘root’@‘localhost’ (using password: YES)
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/
connection_adapters/mysql_adapter.rb:585:in real_connect' /Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/ connection_adapters/mysql_adapter.rb:585:inconnect’
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/
connection_adapters/mysql_adapter.rb:199:in initialize' /Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/ connection_adapters/mysql_adapter.rb:71:innew’
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/
connection_adapters/mysql_adapter.rb:71:in mysql_connection' /Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/ connection_adapters/abstract/connection_pool.rb:223:insend’
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/
connection_adapters/abstract/connection_pool.rb:223:in
new_connection' /Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/ connection_adapters/abstract/connection_pool.rb:245:incheckout_new_connection’
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/
connection_adapters/abstract/connection_pool.rb:188:in checkout' /Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/ connection_adapters/abstract/connection_pool.rb:184:inloop’
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/
connection_adapters/abstract/connection_pool.rb:184:in checkout' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ 1.8/monitor.rb:242:insynchronize’
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/
connection_adapters/abstract/connection_pool.rb:183:in checkout' /Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/ connection_adapters/abstract/connection_pool.rb:98:inconnection’
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/
connection_adapters/abstract/connection_pool.rb:326:in
retrieve_connection' /Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/ connection_adapters/abstract/connection_specification.rb:123:inretrieve_connection’
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/
connection_adapters/abstract/connection_specification.rb:115:in
connection' /Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/ migration.rb:435:ininitialize’
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/
migration.rb:400:in new' /Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/ migration.rb:400:inup’
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/
migration.rb:383:in migrate' /Library/Ruby/Gems/1.8/gems/rails-2.3.4/lib/tasks/databases.rake:116 /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ gems/1.8/gems/rake-0.8.3/lib/rake.rb:617:incall’
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/
gems/1.8/gems/rake-0.8.3/lib/rake.rb:617:in execute' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ gems/1.8/gems/rake-0.8.3/lib/rake.rb:612:ineach’
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/
gems/1.8/gems/rake-0.8.3/lib/rake.rb:612:in execute' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ gems/1.8/gems/rake-0.8.3/lib/rake.rb:578:ininvoke_with_call_chain’
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/
1.8/monitor.rb:242:in synchronize' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ gems/1.8/gems/rake-0.8.3/lib/rake.rb:571:ininvoke_with_call_chain’
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/
gems/1.8/gems/rake-0.8.3/lib/rake.rb:564:in invoke' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ gems/1.8/gems/rake-0.8.3/lib/rake.rb:2019:ininvoke_task’
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/
gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:in top_level' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:ineach’
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/
gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:in top_level' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ gems/1.8/gems/rake-0.8.3/lib/rake.rb:2036:instandard_exception_handling’
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/
gems/1.8/gems/rake-0.8.3/lib/rake.rb:1991:in top_level' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ gems/1.8/gems/rake-0.8.3/lib/rake.rb:1970:inrun’
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/
gems/1.8/gems/rake-0.8.3/lib/rake.rb:2036:in
standard_exception_handling' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ gems/1.8/gems/rake-0.8.3/lib/rake.rb:1967:inrun’
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/
gems/1.8/gems/rake-0.8.3/bin/rake:31
/usr/bin/rake:19:in `load’
/usr/bin/rake:19
tony-spores-macbook-pro-2:music_libary tonywork$

This error is simple.
Your database config file is incorrect.
Make sure you have the right password there.

you can always try in command line ‘mysql -u root -p’ press enter and
type
in the password.
If it works, it is correct.

Trausti

Correct, I can connect to mysql with no issues, either via terminal,
or using any php app to connect to my localhost.

But I fixed it today - I need to put single quotes around the
‘password’ .
I don’t know if its because I have a Symbol in the password or not,
but that was the solution.
My username doesn’t have the sing quotes.

Thanks for the help, I began to think that because I was on Snow
leopard, I didn’t upgrade correctly or something. Teaches me to do a
Google search before thinking through the issue.

-Tony

On Oct 4, 2:47 am, Trausti Thor J. [email protected]

Most probably your symbol in the password led to invalid yaml code
(without the quotes) just dropping half of the password…

Andi

On 4 Ott, 22:05, tspore [email protected] wrote:

leopard, I didn’t upgrade correctly or something. Teaches me to do a

you can always try in command line ‘mysql -u root -p’ press enter and type
in the password.
If it works, it is correct.

Trausti

Is the port correct?