From: Kyle Date: 2008-04-16T00:02:25+09:00 Subject: Re: Ruby DBI MySQL: how to specify protocol=tcp Roger, Thanks for the tips! I had tried specifying host=localhost, but I hadn't tried host=127.0.0.1. It works! Bizarre... Thanks for the link, too. It's definitely more robust than what I have, but I'm happy with my solution for now. If I build another sync script some time, I'll take some good ideas from that program. -Kyle On Apr 15, 12:15 am, Roger Pack wrote: > > mysql = DBI.connect('dbi:Mysql:database=dbname;port=3307', 'user', > > 'pass') > > yeah try specifying the host as either '127.0.0.1' or 'localhost' -- one > of the two ignores the sock. > You can also take a look athttp://code.google.com/p/ruby-roger-useful-functions/source/browse/tr... > for some nice references on how to build a solid version of what you're > building. > :) > -- > Posted viahttp://www.ruby-forum.com/.