in reply to how to create a database in perl
You control that via the dsn; see the DBD::mysql docs (second line of the synopsis):
$dsn = "DBI:mysql:database=$database;host=$hostname;port=$port";
Specifically: the 'database=$database;' part.
The part of the dsn after 'dbi:<driver>:' is given as a whole to the specific database driver; what the driver expects is specific to that driver. For example, in the case of postgresql database driver DBD::Pg, the database can be given with either 'database', 'dbname', or 'db'.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: how to create a database in perl
by Your Mother (Archbishop) on Jan 28, 2011 at 14:41 UTC |