Am Dienstag, 27. Juli 2004 16:12 schrieb Michael Neumann:
> Ralf Mler wrote:
> > Hi,
> > I've difficulties to connect to a second myqsl-installation, listeing on
> > port 6080.
> >
> > dbh = DBI.connect('DBI:Mysql:test','ram')
>
> try this:
>
> 'DBI:Mysql:test;port=6080'

irb(main):033:0* dbh = DBI.connect('DBI:Mysql:lcwa;port=6080','ram')
=> #<DBI::DatabaseHandle:0x406606a4 @trace_mode=2, 
@handle=#<DBI::DBD::Mysql::Database:0x40660410 @mutex=#<Mutex:0x406602bc 
@waiting=[], @locked=false>, @attr={"AutoCommit"=>true}, 
@have_transactions=true, @handle=#<Mysql:0x40660424>>, 
@trace_output=#<IO:0x4059108c>>

seems to work, but actually this should'nt because of

ram@lilith:~$mysql -u ram lcwa
ERROR 1045: Access denied for user: 'ram@localhost' (Using password: NO)

----------------------------------------------------------
on the other hand

irb(main):034:0> dbh = DBI.connect('DBI:Mysql:lcwa;port=6080','ram','lcwa')
DBI::DatabaseError: Access denied for user: 'ram@localhost' (Using password: 
YES)
        from /usr/local/lib/ruby/site_ruby/1.8/DBD/Mysql/Mysql.rb:70:in 
`connect'
        from /usr/local/lib/ruby/site_ruby/1.8/dbi/dbi.rb:584:in `connect'
        from /usr/local/lib/ruby/site_ruby/1.8/dbi/dbi.rb:581:in `connect'
        from (irb):34
        from /usr/local/lib/ruby/site_ruby/1.8/dbi/dbi.rb:439

whereas

ram@lilith:~$mysql -u ram -plcwa lcwa
mysql> 


dbi does exactly the opposite of the mysql-client.
anything to do with 'irb' ??



ralf