Alexander Leidinger

Just another weblog

Dec
16

Hint: using sock­ets across jails

I want to use a socket (mysql) in mul­ti­ple jails. Using nullfs to mount it in each jail where you want to use it does not work (bug in nullfs?). Using a hardlink (if the jails reside on the same FS) works. I hope this info safes a lit­tle bit of time in case some­one tries to do the same.

The host­name MySQL sees in such a con­nec­tion is “local­host”. Maybe this is obvi­ous to one or another, but because jails don’t have a 127.0.0.1 it was not obvi­ous to me.

GD Star Rat­ing
load­ing…
GD Star Rat­ing
load­ing…
Share

Tags: , , , ,

2 Responses to “Hint: using sock­ets across jails”

  1. Martin Says:

    I use unix2tcp (http://ahriman.bucharest.roedu.net/unix2tcp/) to use sock­ets in dif­fer­ent file sys­tems.
    Using TCP cer­tainly causes over­head, but IMO it is worth it since you can use the dif­fer­ent IPs/hostnames for MySQL access control.

    GD Star Rating
    loading...
    GD Star Rating
    loading...
  2. netchild Says:

    Hi,

    what’s the ben­e­fit of using unix2tcp instead of the MySQL build-in TCP support?

    Bye,
    Alexander.

    GD Star Rating
    loading...
    GD Star Rating
    loading...

Leave a Reply