in reply to Pretty technical DBI question

The database can be on either the local machine (where you'll be running the application/tools), or on another machine. When you connect to the DB, you specify the hostname of the machine where the database lives; if you don't give a hostname, the local machine is assumed. From the docs (for DBD::mysql):
The hostname, if not specified or specified as '', will default to an mysql or mSQL daemon running on the local machine on the default port for the UNIX socket.
You'll need to look at the DBD::mysql docs, because there is no standard on the manner in which the hostname should be passed to the driver. The docs suggest this DSN:
$dsn = "DBI:$driver:database=$database;host=$hostname;port=$port";