in reply to Re: Using Net::SSH2 with DBI
in thread Using Net::SSH2 with DBI

Hm. According to DBD::mysql, there's the mysql_socket specifier to pass the unix socket name. Does this not work?

So basically, you'd need a small helper sub to handle the tedium of attaching a process to a socket

my $unixname = named_sock_spawn(sub{ exec "ssh" }); sub named_sock_spawn { socket();bind();listen(); fork() and return $name; accept();dup();dup();$fun->(); }

The perlipc has an example on unix-domain TCP. But are there any modules to provide named pipe utilities?

Replies are listed 'Best First'.
Re^3: Using Net::SSH2 with DBI
by Corion (Patriarch) on Jan 20, 2016 at 15:27 UTC

    This is only for a socket name unfortunately, not for an in-memory socket structure.

      It's the socket name that the mysql client will use to connect to the server. No?

        Sure, but that doesn't help if your plan is to do the (IP-)socket setup yourself.

        If your plan is to spawn an external process which listens to the named (domain-)socket, giving that name to libmysql will help a bit.