Database creation

Stray Toaster mwk at stray-toaster.co.uk
Sat Mar 30 07:30:45 CST 2002


On Sat, Mar 30, 2002 at 01:17:43PM +0000, Russell Matbouli wrote:
> Hello,
> According to the DBI FAQ, it isn't possible to create a database using
> it. What is the preferred way of creating a MySQL database and
> populating it (in a unix-like environment)? Is the only other way to
> push a CREATE statement into a call to the 'mysql' binary?
> 
> I should make it clear that it is for an installation program...

um, simple old me, but can't you just have a  little script with the
installation process, which has in it somewhere

my $query = qq{ CREATE blah etc etc };

$dbh->execute($query)

or the like?

gazooks, when was the last time I had a query in a script? Or a query in
a module come to that? Long life Class::DBI!

m.


-- 
I'm like, one of those chocaholics.
Except with booze.



More information about the Belfast-pm mailing list