/usr/local/bin/mysql --user=youracct -p youracct
Where youracct is your account name.
Here is a quick demonstration of a generic query:
use Mysql;
if ( ! ( $gDBH = Mysql->Connect("servername",
"database","passwd","user") ) )
{
die "SQL Error: $Mysql::db_errstr";
}
my $sth = $gDBH->query( "select * from tablename" );
if ( ! defined $sth )
{
die "SQL Error: $Mysql::db_errstr";
}
for (;;)
{
my %hash;
last if ! ( %hash = $sth->FetchHash() );
foreach $key ( sort keys %hash )
{
printf( "%16s: %s\n", $key, $hash{$key} );
}
print "\n";
}