in reply to Problems with MySQL - "No Database Selected"

my $database = "databasename=default"; should be

my $database = "database=default";