From: angico Date: 2008-11-18T21:32:11+09:00 Subject: Re: ActiveRecord user Em Ter, 2008-11-18 às 21:03 +0900, Peter Szinek escreveu: > It would greatly help the investigation if you could specify the > command you are using to connect :) > > Cheers, > Peter > ___ > http://www.rubyrailways.com > http://scrubyt.org Hi, Peter. The commands are as follows, from within irb: require 'rubygems' => true require 'active_record' => true ActiveRecord::Base.establish_connection(:user => 'the_user', :password => 'the_password', :adapter => 'mysql', :database => 'the_db') => #"mysql", :user=>"the_user", :password=>"the_password", :database=>"the_db"}, @adapter_method="mysql_connection"> load 'tbl.rb' => true Tbl.class => Class Tbl.columns Mysql::Error: Access denied for user 'root'@'localhost' (using password: YES) ----------- But if I establish_connection with :user => 'root' and :password => 'roots passwd', then this last command succeeds! What's the problem with 'the_user'? I have granted the_user all permissions on database the_db. Just can't find out why it insists in use 'root'@'localhost'! Can you give me any hints? Thank you very much, -- angico ------ home page: www.angico.org Gnu/Linux, FLOSS, Espiritismo, e eu por mim mesmo 8^I Cooperação é muito melhor que competição! ------ contatos: email: angico@angico.org skype: an.gi.co ------