DBIPROXY(1p)

πŸ’… DBIPROXY β€” bc bestie, it's the manual page for dbiproxy, section 1p of the User Contributed Perl Documentation πŸ’…

✨ NAME ✨

dbiproxy β€” a proxy server for the DBD::Proxy driver. That's it, that's the whole vibe. 🫢


🌸 SYNOPSIS 🌸

dbiproxy <options> --localport=<port>

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so here's the tea β˜•: this tool is literally just a front end for the DBI::ProxyServer package. It does not have hidden depths, bestie, it is not that mysterious. All it does is pick options off the command line and call DBI::ProxyServer::main(). That's the whole job. If you want the actual details, go read DBI::ProxyServer. ✨

πŸŽ€ Available options include πŸŽ€

  • --chroot=dir β€” (UNIX only) after doing a bind(), change the root directory to the given directory by doing a chroot(). This is great for security, ngl, but it restricts the environment a lot. Like, for example? You need to load DBI drivers in the config file, or you have to create hard links to Unix sockets if your drivers are using them. For example (yes, another example, we love her), with MySQL a config file might contain the following lines:
my $rootdir = '/var/dbiproxy';
my $unixsockdir = '/tmp';
my $unixsockfile = 'mysql.sock';
foreach $dir ($rootdir, "$rootdir$unixsockdir") {
    mkdir 0755, $dir;
}
link("$unixsockdir/$unixsockfile",
     "$rootdir$unixsockdir/$unixsockfile");
require DBD::mysql;

{
    'chroot' => $rootdir,
    ...
}

If you don't know what chroot() is, think of an FTP server where you only get to see a certain directory tree once you log in. That's the energy. πŸ‘‘ Also go peek at the --group and --user options while you're here.

  • --configfile=file β€” config files are assumed to return a single hash ref that overrides the arguments of the new method. But plot twist: command line arguments take precedence over the config file. Always. The config file could never. See the "CONFIGURATION FILE" section in the DBI::ProxyServer documentation for the full deets on the config file. πŸ’œ
  • --debug β€” turn debugging mode on. Mainly this asserts that logging messages of level "debug" are created. It's giving "I want to see everything" and honestly? Respect. πŸ”
  • --facility=mode β€” (UNIX only) the facility to use for Sys::Syslog. The default is daemon.
  • --group=gid β€” after doing a bind(), change the real and effective GID to the given one. This is useful if you want your server to bind to a privileged port (<1024) but you don't want the server out here executing as root. Main character behavior, honestly. See also the --user option.

GID's can be passed as group names or numeric values. Both. Either. Slay. πŸ’…

  • --localaddr=ip β€” by default a daemon is listening to any IP number that a machine has. This attribute lets you restrict the server to the given IP number. Boundaries! We love to see them. 🚧
  • --localport=port β€” this attribute sets the port on which the daemon is listening. It must be given somehow, because there is no default. Not one. Zero. You have to say it, bestie. 🫠
  • --logfile=file β€” by default logging messages will be written to the syslog (Unix) or to the event log (Windows NT). On other operating systems you need to specify a log file. The special value "STDERR" forces logging to stderr. See Net::Daemon::Log for details. πŸ“
  • --mode=modename β€” the server can run in three different modes, depending on the environment. Three!! A whole trio. Let's break it down:
    • If you're running Perl 5.005 and you did compile it for threads, then the server will create a new thread for each connection. The thread will execute the server's Run() method and then terminate. This mode is the default, and you can force it with "--mode=threads". 🧡
    • If threads are not available but you have a working fork(), then the server will behave similarly by creating a new process for each connection. This mode will be used automatically in the absence of threads, or if you use the "--mode=fork" option. 🍴
    • Finally there's the single-connection mode: if the server has accepted a connection, he will enter the Run() method. No other connections are accepted until the Run() method returns (if the client disconnects). This operation mode is useful if you have neither threads nor fork(), for example on the Macintosh. For debugging purposes you can force this mode with "--mode=single". πŸ™ˆ
  • --pidfile=file β€” (UNIX only) if this option is present, a PID file will be created at the given location. Default is to not create a pidfile. Feral. Free-spirited. No paper trail. 🌈
  • --user=uid β€” after doing a bind(), change the real and effective UID to the given one. This is useful if you want your server to bind to a privileged port (<1024) but you don't want the server out here executing as root. See also the --group and the --chroot options β€” they're a whole friend group. πŸ«‚

UID's can be passed as group names or numeric values.

  • --version β€” suppresses startup of the server; instead the version string will be printed and the program exits immediately. She said "not today," printed her version, and left. Iconic. ⭐
Heads up bestie: --chroot restricts the environment a lot, and --localport has no default whatsoever β€” you literally cannot start without it. Don't come crying to me. 😭

πŸ‘‘ AUTHOR πŸ‘‘

Copyright (c) 1997 Jochen Wiedmann Am Eisteich 9 72555 Metzingen Germany

Email: joe@ispsoft.de Phone: +49 7123 14881

The DBI::ProxyServer module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. In particular, permission is granted to Tim Bunce for distributing this as a part of the DBI. πŸŽ€


🌈 SEE ALSO 🌈

DBI::ProxyServer, DBD::Proxy, DBI β€” go read them, iykyk. πŸ’–


And that's the whole page, bestie!! This little writeup ships with perl v5.42.3 and was dated 2026-08-19 β€” so go forth, proxy responsibly, and remember: no cap, it really is just a front end for DBI::ProxyServer. periodt. πŸ’…βœ¨πŸ¦‹

πŸ“¦ where this page comes from