>Jeremy,
>Thank yo so very much. Indeed, the mysql.sock is in the
>/var/lib/mysql/ directory. Could you possibly give me some advice
>on how to get around this? Do I sym link from the /tmp directory, or
>is there something I can configure
>in the DBI/DBD modules to make it look for the mysql.sock in another
>location? I'd prefer to do the latter, but I don't know where to
>look in order to do this. In one of the .pm files? I just wish
>that the two sets of distributions, the 3.22.32 and the
>perl-msql-mysql modules that are both
>linked to from the MySQL site would PLEASE be able to work together
>out of the gate. Unfortunatley, I really would like to stick with
>rpms on a Red Hat system, or otherwise, I would compile my own
>binaries. And I don't know how to make rpms yet.
>Thanks,
>Laszlo Szijarto
Here are a couple of things you can try.
1) If you have access to /etc/my.cnf, put this in it:
[client]
socket=/var/lib/mysql/mysql.sock
(If you already have a [client] option group in /etc/my.cnf,
just add the socket line to it.) This will cause all client
programs on the machine to use the named socket path for connections
to localhost.
2) In your data source name in your Perl script, use a value like
this:
$dsn = "DBI:mysql:db_name:localhost;mysql_socket=/var/lib/mysql/mysql.sock";
(Note: it's s semi-colon before "mysql_socket", not a colon.)
This will use the named socket on a per-script basis.
>----- Original Message -----
>From: "Jeremy Gaddis" <jgaddis@stripped>
>To: "Laszlo G. Szijarto" <lszijarto@stripped>
>Cc: <mysql@stripped>
>Sent: Friday, February 18, 2000 8:27 PM
>Subject: Re: Stil Can't Connect To MySQL using PERL
>
>
>> At 05:13 PM 2/18/00 -0500, Laszlo G. Szijarto wrote:
>>
>> > mysql.pm into a location that PERL 5.003 cannot find.
>> > perl-Msql-Mysql-modules >installs in a location that
>> > PERL can find, but I get the cannot connect at
>> > /tmp/mysql.sock (111) error. I got all the MySQL rpms
>>
>> If you do:
>>
>> [jgaddis@gatekeeper:ttyp0:~]$ ls -l /tmp/mysql.sock
>>
>> do you get something similar to:
>>
>> srwxrwxrwx 1 root root 0 Feb 6 22:55 /tmp/mysql.sock
>>
>> If not, that's your problem. Some distributions put
>> the socket file in other locations. If it's not in
>> /tmp, do `find / -name mysql.sock`, and you should
>> be able to find it. I just found another one in
>> /var/lib/mysql/mysql.sock, so you might check there.
>>
>> HTH,
>>
>> --
>> Jeremy Gaddis <jgaddis@stripped>
>>
>>
>
--
Paul DuBois, paul@stripped