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 -- Posted via http://www.ruby-forum.com/.
On Wed, Dec 14, 2005 at 05:10:34PM +0100, Alex Amat 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
yes I can connect without a problem Thomas Janke wrote:> On Wed, Dec 14, 2005 at 05:10:34PM +0100, Alex Amat 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-- Posted via http://www.ruby-forum.com/.
On 12/14/05, Alex Amat <amatbcn-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org> 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 fineCan you post your database.yml config (feel free to change your password to xxxxx).
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 Janke <janke-vM/tEWNETX0@public.gmane.org>:> On Wed, Dec 14, 2005 at 05:10:34PM +0100, Alex Amat 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 > > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >Kevin Bedell http://www.kbedell.com "Imagination is more important than knowledge." - Albert Einstein
. 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/ruby-talk/169979 http://comments.gmane.org/gmane.comp.lang.ruby.rails/33919 Alex Amat 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 > > Any ideas why this is happening >
aap-KSrkq06vtGZfJ/NunPodnw@public.gmane.org
2005-Dec-14 19:06 UTC
Re: mysql connection problems
> 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 -- Posted via http://www.ruby-forum.com/.