Date sent: Fri, 16 Feb 2001 10:42:30 -0600
From: Mike Ford <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: DBD::MySQL _ListDBs function for 3.23
Mike,
> I was doing some tests last night and I wanted to compare the databases
> on two servers. First I wanted to ensure that the databases were
> defined on both systems and to only transfer those that were not on the
> second server from the first server.
>
> Using the following:
>
> $drh = DBI->install_driver("mysql");
> @dbs = $drh->func("localhost:3306", '_ListDBs');
if you say:
@dbs = $drh->func("localhost", "3306", '_ListDBs');
^^
your code works for me on localhost; I do not have a remote database to check
this. In fact, the DBD::Mysql POD provides a contradictory syntax here. The
synopsis section says
@databases = $drh->func($host, $port, '_ListDB');
which works, the Private MetaData Methods sections says
@dbs = $drh->func("$hostname:$port", '_ListDBs');
which does not work.
HTH
Bodo
[EMAIL PROTECTED]