Forum: Ruby on Rails mysql connection problems

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Alex A. (Guest)
on 2005-12-14 18:10
Hi

hi i have a problem trying to connect to the mysql database when I do a
rake it says: Access denied for user: '@localhost' to database ''

My database.yml file is fine

Any ideas why this is happening
Thomas J. (Guest)
on 2005-12-14 18:36
(Received via mailing list)
On Wed, Dec 14, 2005 at 05:10:34PM +0100, Alex A. wrote:
> hi i have a problem trying to connect to the mysql database when I do a
> rake it says: Access denied for user: '@localhost' to database ''
>
> My database.yml file is fine
>
> Any ideas why this is happening
>
Can u connect to the database via

mysql -u [usename] -p [database]

?

It seems to be that your username und databasename is empty.

Greetings Thomas
Alex A. (Guest)
on 2005-12-14 19:16
yes I can connect without a problem

Thomas J. wrote:
> On Wed, Dec 14, 2005 at 05:10:34PM +0100, Alex A. wrote:
>> hi i have a problem trying to connect to the mysql database when I do a
>> rake it says: Access denied for user: '@localhost' to database ''
>>
>> My database.yml file is fine
>>
>> Any ideas why this is happening
>>
> Can u connect to the database via
>
> mysql -u [usename] -p [database]
>
> ?
>
> It seems to be that your username und databasename is empty.
>
> Greetings Thomas
Joe Van D. (Guest)
on 2005-12-14 19:21
(Received via mailing list)
On 12/14/05, Alex A. <removed_email_address@domain.invalid> wrote:
> Hi
>
> hi i have a problem trying to connect to the mysql database when I do a
> rake it says: Access denied for user: '@localhost' to database ''
>
> My database.yml file is fine

Can you post your database.yml config (feel free to change your
password to xxxxx).
Kevin B. (Guest)
on 2005-12-14 19:24
(Received via mailing list)
This seems to be related to the known issue surrounding mysql
connections that
came out in the last RC but was fixed in the very latest ActiveRecord.

Search the list archives for your error message - threads yesterday went
through
the fix (which was essentially to update to the new 1.0 release and
force
dependencies to be updated as well).



Quoting Thomas J. <removed_email_address@domain.invalid>:

> mysql -u [usename] -p [database]
> removed_email_address@domain.invalid
> http://lists.rubyonrails.org/mailman/listinfo/rails
>




Kevin B.
http://www.kbedell.com

"Imagination is more important than knowledge."
 - Albert Einstein
Lou V. (Guest)
on 2005-12-14 20:10
(Received via mailing list)
. if possible update to the rails latest gems
. if you have the option, update mysql to at least 4.1
. what version of mysql are you using?
. have you looked at previous threads?
	Subject: "Problem with mysql"
	Posted yesterday.
	And there are more threads that talk about this.
. you may want to change the passwords to either the old- or new-style
    as a last resort if nothing else works for you. This has been
    discussed in a previous thread. I think here,
    http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/...
    http://comments.gmane.org/gmane.comp.lang.ruby.rails/33919
Guest (Guest)
on 2005-12-14 21:06
> rake it says: Access denied for user: '@localhost' to database ''


tow things that worked for me in the past:

1)instead of granting @localhost, try to grant @127.0.0.1  (bizarre, but
worked for me, i just can't remind the link where i read)

2)if using mysql 5, do check for old/new password style

good luck
Andre
This topic is locked and can not be replied to.