webstudioro has asked for the wisdom of the Perl Monks concerning the following question:

I have the Indigo perl program with mysql. How i cant to create and see the mysql data base?

Replies are listed 'Best First'.
Re: Help for Mysql
by hardburn (Abbot) on Jul 10, 2003 at 17:23 UTC

    Use the 'mysql' program on the command line. Running 'mysql -h' should get you started.

    ----
    I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
    -- Schemer

    Note: All code is untested, unless otherwise stated

Re: Help for Mysql
by The Mad Hatter (Priest) on Jul 10, 2003 at 18:04 UTC
    To access the database from Perl, use DBI.
Re: Help for Mysql
by barrd (Canon) on Jul 11, 2003 at 10:35 UTC
Re: Help for Mysql
by blue_cowdawg (Monsignor) on Jul 11, 2003 at 15:33 UTC

    To quote my favorite Marine Drill Seargeant: "What kind of disorganized grabastic question is that?"

    Returning to my kindly Perl-Monkish helpful personality:

    Check this out:

      #!/bin/perl -w
      use strict;
      use DBI;
      
      my $dbh = DBI->connect("DBI:mysql","user","password")
        or die $DBI::errstr;
      $dbh->execute("create database blah") 
        or die $dbh::errstr;
      

    As for "seeing" the database that depends on what you mean by that.


    Peter L. BergholdBrewer of Belgian Ales
    Peter@Berghold.Netwww.berghold.net
    Unix Professional
      Thanks.