Database creation

Steve Foy steve-belfast-pm at narnian.org
Sat Mar 30 09:41:48 CST 2002


On Sat, Mar 30, 2002 at 03:00:53PM +0000, Russell Matbouli wrote:
> On Sat, Mar 30, 2002 at 01:30:45PM +0000, Stray Toaster wrote:
> > On Sat, Mar 30, 2002 at 01:17:43PM +0000, Russell Matbouli wrote:
> > > According to the DBI FAQ, it isn't possible to create a database using
>                                                    ^^^^^^^^^^^^^^^^^
> > > push a CREATE statement into a call to the 'mysql' binary?
>            ^^^^^^^^^^^^^^^^
> 
> I think I said the wrong thing here. I mean to create a database. Can
> you do this in SQL? I've only ever done it with mysqladmin before. At
> least, as far as I can remember that's what I used...

Yep.

> How do you get a database handle on a database that doesn't yet exist
> though?

I assume you would get a handle for the 'mysql' database with mysql's
root privileges, using the code that Marc showed.

Apologies if I'm talking nonsense.
 
> Is there a Class::DBI way to do it? That's what I'm using :)

Not sure, ask the expet(s).

-- 
Steve Foy
steve at narnian.org

Emergency. There's an emergency going on.
It's still going on



More information about the Belfast-pm mailing list