#!/usr/bin/perl -w
use DBI;
$dbh = DBI->connect( "dbi:mysql:", 'user', 'password', {
PrintError => 0 } ) or die "Can\"t connect to database: $DBI::errstr\n";
$dbh->do("create database dbname");
$dbh->disconnect or warn "Disconnection failed: $DBI::errstr\n";
On Wednesday, January 8, 2003, at 12:04 PM, Ken Hilliard wrote:
I'd like to be able to create a new database using Perl/DBI instead of using
the MySQL command line (and other) utilities. It looks like you can create a
new database with the driver handle but I can't seem to make it work.
--------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php