On any redhat system (and derivatives like mandrake) that I've ever worked on, MySQL creates the socket in /var/lib/mysql, just where Ruby is looking. Are you *sure* that you have the MySQL daemon running? Can you see the socket "file" in /tmp? If so, your administrator must have changed the default installation. From a security standpoint, making the socket in /tmp doesn't sound like a good idea. In any case, the socket file is defined in the MySQL include files, which the ruby module checks, so you shouldn't have to mess with this. I'll bet the daemon isn't running... On Fri, 14 Dec 2001 09:40:05 +0900 Jack Dempsey <dempsejn / georgetown.edu> wrote: > hi all, > > i've got ruby 1.6.5 working well on redhat 7.2 and now i'd like to add > mysql support... > everything seems to work fine...it makes perfectly, but when i run > test.rb i get the following error > > [jack@Zeus mysql-ruby-2.4.1]$ ruby -I. ./test.rb localhost root password > > connect............../t/00connect.rb:1:in `connect': Can't connect to > local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) > (MysqlError) > from ./t/00connect.rb:1 > from ./test.rb:23:in `load' > from ./test.rb:23 > from ./test.rb:19:in `each' > from ./test.rb:19 > > mysql normally creates its sockets in /tmp so i can see how looking in > /var/lib... would be a problem...is there some way i can tell ruby to > look elsewhere, or perhaps recompile with a different option? > any help would be much appreciated.... > thanks! > jack dempsey > -- Daniel P. Zepeda daniel / zepeda-zone.net