#!/usr/bin/perl use strict; use DBI; my $dbh = DBI->connect ( "dbi:mysql:dbname", 'user','passwd', '' ) or die "can't connect!\n"; my $sql = qq/show variables/; my $sth = $dbh->prepare ( $sql ); $sth->execute(); while ( my @array=$sth->fetchrow_array() ) { printf ( "%-35s", $_ ) foreach ( @array ); print "\n"; } $dbh -> disconnect(); exit 0;
by: 发表于:2017-09-11 11:53:10 顶(0) | 踩(0) 回复
??
回复评论