The daemon's definitely running....i of course tested out my normal command
line connection and that was just fine...and if i ls /tmp i see "mysql.sock"
I installed it and didn't change anything, so i don't know what could have
happened...
i agree its probably bad for security, but this is a dual boot machine
that's not often up in linux...think i should recompile mysql and reinstall?
i just don't think it'd change the tmp thing because i certainly didn't tell
it to run the sockets in tmp.....

jack

-----Original Message-----
From: Daniel P. Zepeda [mailto:daniel / zepeda-zone.net]
Sent: Thursday, December 13, 2001 9:34 PM
To: ruby-talk ML
Subject: [ruby-talk:28477] Re: mysql issues...looking for wrong socket


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