| 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' | tobiasb | 6 Oct |
| • Re: Trailing blanks get chopped away from 'strings' | Faisal Nasim | 6 Oct |
| • Re: Trailing blanks get chopped away from 'strings' | Tobias Brox | 7 Oct |
| • Re: Trailing blanks get chopped away from 'strings' | Bob Kline | 7 Oct |
| • Re: Trailing blanks get chopped away from 'strings' | Tobias Brox | 7 Oct |
| • Re: Trailing blanks get chopped away from 'strings' | Michael Widenius | 7 Oct |
| • Re: Trailing blanks get chopped away from 'strings' | Faisal Nasim | 7 Oct |
| • Re: Trailing blanks get chopped away from 'strings' | Michael Widenius | 8 Oct |
| • Re: Trailing blanks get chopped away from 'strings' | Tonu Samuel | 8 Oct |
| • question on perl DBI _ListDBs function | James H. Thompson | 8 Oct |
| • Re: Trailing blanks get chopped away from 'strings' | Carsten H. Pedersen | 6 Oct |
| • Trailing blanks get chopped away from 'strings' | Jani Tolonen | 6 Oct |
| • Trailing blanks get chopped away from 'strings' | Jani Tolonen | 6 Oct |
