forget the 'use dbUtil;'. that was my own utility module. On Tuesday, March 19, 2002, at 03:20 PM, bob ackerman wrote:
> this is how i am doing it: > > use CGI qw(:standard); > use DBI; > use dbUtil; > > $db_name = param('db_create'); # however you want to get the db name to > create > > $drh = DBI->install_driver('mysql') or die "couldn't install driver"; > $drh->func('createdb', "$db_name", '','','', 'admin') > or die "couldn't create database $db_name"; > > On Tuesday, March 19, 2002, at 02:20 PM, James Taylor wrote: > >> CPAN is running exremely slow (as per usual) and I just have a quick >> question. How do I CREATE a database from within perl with MySQL? >> Generally >> the first command you give for DBI will be a statement to connect to a >> db, >> but what if I have to have the db created first? >> >> This is for a script that will automate the installation of a set of 12 >> scripts, and sets up 6 tables, and I don't want to have to tell users to >> first have to run mysql, type in "create database blah", quit, and then >> run >> the script. >> >> -- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> > > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]