#!/usr/bin/perl
use DBI;
$db_name='zjzc';
$ip='127.0.0.1';
$user="root";
$passwd="1234567";
$dbh="";
$dbh = DBI->connect("dbi:mysql:database=$db_name;host=$ip;port=3306",$user,$passwd) or die "can't connect to database ". DBI-errstr;
$dbh->do("SET NAMES 'utf8'");
$UNLOAD_SRC_DBCONN = DBI->connect("dbi:mysql:database=$db_name;host=$ip;port=3306",$user,$passwd) or die "can't connect to database ". DBI-errstr;
$UNLOAD_SRC_DBCONN->do("SET NAMES 'utf8'");
if ( $#ARGV < 0 ){
print "please input your table name !\n";
exit(-1);
}
my $table_name= "$ARGV[0]";
my $str= "$ARGV[1]";
my $hostSql = qq{SELECT column_name from information_schema.columns where table_schema='$db_name' and table_name
perl dbi unload utf8脚本
最新推荐文章于 2023-03-10 08:57:47 发布