====================

You may want to install a relational database in order to use bioperl-db, BioSQL or OBDA. The easiest way to install Mysql is to use the Windows binaries available at www.mysql.com. Note that Windows does not have sockets, so you need to force the Mysql connections to use TCP/IP instead. Do this by using the "-h", or host, option from the command-line. :

Create a database from a blast report. ... my $dbh = DBI->connect('DBI:mysql:COLAB2','mohammed','spiceup',

>mysql -h 127.0.0.1 -u <user> -p<password> <database>
Alternatively you could install postgres instead of Mysql, postgres is already a package in Cygwin.

One known issue is that DBD::mysql can be tricky to install in Cygwin and this module is required for the bioperl-db, Biosql, and bioperl-pipeline external packages. Fortunately there's some good instructions online: http://search.cpan.org/src/JWIED/DBD-mysql-2.1025/INSTALL.html#windows/cygwin. It may be that these issues have been resolved in versions later than 2.9.

Edit: g0n - inserted formatting tags

Replies are listed 'Best First'.
Re: CREATE TABLES IN PERL (MYSQL)
by Joost (Canon) on Dec 04, 2007 at 02:46 UTC
      MYSQL
        that's because the database doesn't exist. your (not) script <aka swiped homework> does not create a database, only creates the table. if this is indeed swiped homework...there are copyright issues here.
        the hardest line to type correctly is: stty erase ^H
Re: CREATE TABLES IN PERL (MYSQL)
by aquarium (Curate) on Dec 04, 2007 at 02:32 UTC
    you can't connect to a database with DBI if it doesn't yet exist. you'll need to call one of the mysql utilities to create the database first.
    the hardest line to type correctly is: stty erase ^H
Re: connect to a database with DBI
by TOD (Friar) on Dec 04, 2007 at 04:11 UTC
    MySQL keeps some meta information in a database named 'mysql'. i suggest you connect to that database via DBI and issue the 'create database' query. after that you can connect to this new database. but don't forget the grants. ;)
    --------------------------------
    masses are the opiate for religion.
Re: connect to a database with DBI
by Gangabass (Vicar) on Dec 04, 2007 at 03:37 UTC

    I don't see any code so i try to guess what is the problem...

    You can try to connect to DB named `test` (almost all default MySQL installation have this DB) and after that make

    $dbh->do("CREATE TABLE ...");
Re: connect to a database with DBI
by apl (Monsignor) on Dec 04, 2007 at 10:48 UTC
    I suspect you replaced your original questions with the solutions, rendering me confused. 8-)