List:General Discussion« Previous MessageNext Message »
From:Mike Machado Date:May 4 1999 4:58pm
Subject:Re: How to CREATE DATABASE using DBI?
View as plain text  
Because of the way the DBI works you will have to still connect to some
database, but once connected you could do $sth = $dbh->do("create database
blah"); and that should do it. It is a pain that you have to connect to a
database just to create another, but oh well.

Daniele Colajacomo wrote:

> I've looked in the DBI documentation and could only find all the
> beautyful things you can do after you DBI->connect to an existing
> database, but I'm looking for a way, using DBI (I know how to do
> it just by logging into mysql), to CREATE DATABASE <dbname>. Or
> maybe should I just connect to mysql directly from my perl script?
> It's a pain though, it would be much cleaner if I could do it
> trhough DBI.
> Any help would be appreciated.
> Thanks!
> Daniele Colajacomo
> ---------------------------------------------------------------------
> Please check "" before
> posting. To request this thread, e-mail mysql-thread2827@stripped
> To unsubscribe, send a message to the address shown in the
> List-Unsubscribe header of this message. If you cannot see it,
> e-mail mysql-unsubscribe@stripped instead.

Mike Machado
Network Specialist

How to CREATE DATABASE using DBI?Daniele Colajacomo4 May
  • Re: How to CREATE DATABASE using DBI?Mike Machado4 May