Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re: how to create a database in perl

by erix (Parson)
on Jan 28, 2011 at 14:30 UTC ( #884835=note: print w/replies, xml ) Need Help??

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 (Chancellor) on Jan 28, 2011 at 14:41 UTC
    the database can be given with either 'database', 'dbname', or 'db'

    I think the question is "how can the database name not be given?"

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://884835]
erix denies everything
[shmem]: erix: bad idea. PerlMonks is based on everything
[robby_dobby]: shmem:everything2
robby_dobby says Sorry and points to his boredom
[shmem]: robby_dobby: since everything is everything, it is thus also everything2. And everything2 is based on... you name it.

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (10)
As of 2017-04-25 13:27 GMT
Find Nodes?
    Voting Booth?
    I'm a fool:

    Results (454 votes). Check out past polls.