List:General Discussion« Previous MessageNext Message »
From:James H. Thompson Date:October 7 1999 11:37pm
Subject:question on perl DBI _ListDBs function
View as plain text  
Question on _listdbs


I created the following suid to root CGI test script 
 
#!/usr/local/bin/perl
$ENV{'PATH'} = "/usr/local/bin:/usr/bin:/bin:/usr/sbin";
use DBI;
$drhx = DBI->install_driver('mysql');
@db_list = $drhx->func("host.domain.com", "", '_ListDBs');
$page_out = "drhx=$drhx, r=" . join('*',@db_list) . "=\n";
print "\n\n",$page_out;
exit(0);

It returns a null list of available databases unless I add:
$ENV{'MYSQL_PWD'} = "xxxxxx";
to the script.

That didn't seem to be documented as needed.
Is that the way its supposed to work?


Jim

James H. Thompson
jht@stripped


Thread
Trailing blanks get chopped away from 'strings'tobiasb6 Oct
  • Re: Trailing blanks get chopped away from 'strings'Faisal Nasim6 Oct
    • Re: Trailing blanks get chopped away from 'strings'Tobias Brox7 Oct
      • Re: Trailing blanks get chopped away from 'strings'Bob Kline7 Oct
        • Re: Trailing blanks get chopped away from 'strings'Tobias Brox7 Oct
      • Re: Trailing blanks get chopped away from 'strings'Michael Widenius7 Oct
    • Re: Trailing blanks get chopped away from 'strings'Faisal Nasim7 Oct
      • Re: Trailing blanks get chopped away from 'strings'Michael Widenius8 Oct
    • Re: Trailing blanks get chopped away from 'strings'Tonu Samuel8 Oct
    • question on perl DBI _ListDBs functionJames H. Thompson8 Oct
  • Re: Trailing blanks get chopped away from 'strings'Carsten H. Pedersen6 Oct
  • Trailing blanks get chopped away from 'strings'Jani Tolonen6 Oct
    • Trailing blanks get chopped away from 'strings'Jani Tolonen6 Oct