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 abind(), change the root directory to the given directory by doing achroot(). 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 thenewmethod. But plot twist: command line arguments take precedence over the config file. Always. The config file could never. See the"CONFIGURATION FILE"section in theDBI::ProxyServerdocumentation 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 forSys::Syslog. The default isdaemon.--group=gidβ after doing abind(), 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--useroption.
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. SeeNet::Daemon::Logfor 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 theRun()method returns (if the client disconnects). This operation mode is useful if you have neither threads norfork(), for example on the Macintosh. For debugging purposes you can force this mode with"--mode=single". π
- 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
--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 abind(), 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--groupand the--chrootoptions β 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:--chrootrestricts the environment a lot, and--localporthas 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
- ubuntu stonking: libdbi-perl 1.652-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms