hello,
i have a shell script with 6 programs. if i run it directly as :
sh first.sh all progrms with get executd and everything works fine.
but if i give this script in crontab using
0 10 * * * /two/three/name.sh
Only progs without database connection will get executed . but database
tables
Thank you very much. That solves my problem
-Message d'origine-
De : Dan Nelson [mailto:[EMAIL PROTECTED]
Envoyé : 13 décembre 2004 12:03
À : Duhaime Johanne
Cc : [EMAIL PROTECTED]
Objet : Re: DBI->connect does not work in crontab but works interactively
In the last episode
In the last episode (Dec 13), Duhaime Johanne said:
> I have a script that check the status of all innodb tables. It works
> fine interactively.
>
> But not from the crontab tab.
>
> Here is the error message and also a list of the environment variables
> from the crontab
>
> The message is abou
In the last episode (Dec 13), Dan Nelson said:
> In the last episode (Dec 13), Duhaime Johanne said:
> > I have a script that check the status of all innodb tables. It works
> > fine interactively.
> >
> > But not from the crontab tab.
> >
> > Here is the error message and also a list of the envi
= $ENV{$_}\n";
}
# in bold the instruction that cause the message (line 53)
open (DBLIST, $DB_LIST); #list of all db we have
while () {
my $db_name=$_;
chomp($db_name);
my $dsn = "DBI:mysql:$db_name:localhost"; # data source name
my $dbh = DBI->connect ($dsn,$DBU
Thursday, October 24, 2002 10:32 AM
> To: [EMAIL PROTECTED]
> Subject: RE: DBI Connect Fails after 20,000 record inserts/updates
>
>
> Do you connect/disconnect before/after every insert?
>
> -Original Message-
> From: Dallas Engelken [mailto:dallase@;nmgi.com]
> Sent
Do you connect/disconnect before/after every insert?
-Original Message-
From: Dallas Engelken [mailto:dallase@;nmgi.com]
Sent: Thursday, October 24, 2002 9:52 AM
To: [EMAIL PROTECTED]
Subject: DBI Connect Fails after 20,000 record inserts/updates
I am trying to parse an email log
for records older than 2 days (ie 600,000 records).
I make a dbi connection and select all records older than 2 days. It returns the rows.
Now I step through each row with a while loop, and if the entry is a virus, i open a new dbi connect and store it in the virus table (update if it's al
new dbi connect and store it in the virus table (update if it's already there). Then
I disconnect that dbi call.
Continuing on, I take each entry and update the overall_stats table, based on the date
the email was received.. So if I receive 100,00 emails on 10-24-2002, then instead of
h
Hi all, I am trying to connect to my mysql database with a perl script...
I can connect from commnad line both passing a password or at password prompt...
I can connect successfully with the following line in my script..
my $dbh = DBI->connect("DBI:mysql:database=mysql;host=localhost
Umm, you didn't specify a username or password...you instead passed 'undef'.
This is the connect string I use:
$dbh = DBI->connect( "DBI:mysql:database=$pb_db; host=$pb_server;
port=$pb_port",
$pb_user,
I am using Perl DBI to interface with MySQL and when i execute the
following statement:
$dbh = DBI->connect('DBI:mysql:database=dbmysql2', undef, undef,
{PrintError =>0}) || die $ DBI::errstr;
it causes the error:
[Fri Aug 17 09:59:50 2001] productioncontent14.pl: Access
27; at productioncontent14.pl line 29, line 1
print "Enter username: ";
chomp( my $username = );
print "Enter password: ";
chomp( my $password = );
$dbh = DBI->connect('DBI:mysql:database=dbmysql2', $username, $password,
{PrintError =>0}) || die $ DBI::er
I am having a problem with MySQL. I am seeking some advice on either what is wrong
or how to pursue the cause of this bug.
I am using Perl DBI to interface with MySQL and when i execute the
following statement:
$dbh = DBI->connect('DBI:mysql:database=dbmysql2', undef, undef,
{P
I am having a problem with MySQL. I am seeking some advice on either what is wrong
>or how to pursue the cause of this bug.
>
>I am using Perl DBI to interface with MySQL and when i execute the
>following statement:
>$dbh = DBI-connect('DBI:mysql:database=dbmysql2', unde
I am having a problem with MySQL. I am seeking some advice on either what is wrong
or how to pursue the cause of this bug.
I am using Perl DBI to interface with MySQL and when i execute the
following statement:
$dbh = DBI->connect('DBI:mysql:database=dbmysql2', undef, undef,
{P
Looks like a perl script, so you can use 'or' (||) to evaluate your
'connect' string, i.e.
To stop the script if connect fails use
$dbh = DBI->connect("dbi:mysql:database:localhost",'user','password') || die
"No connection
how can I test DBI->connect ?
I'm geting this error:
Software error:
Execution of /var/www/cgi-bin/mySQL.pl aborted due to compilation errors.
Yann carlier
+351-21-4527104/5
www.inteliware.net
[EMAIL PROTECTED]
p;
> use DBI;
> CGI::use_named_parameters(1);
>
> my ($db);
> my $output = new CGI;
>
> $db = param('test') or die("Could not find database!");
> my $dbh = DBI->connect("DBI:mysql:$db:$server",root,passward );
>
> if (not $dbh) {
&g
Okay, I get it. The problem comes from the statement below,
wen> $db = param('test') or die("Could not find database!");
After I revised it to "my $db = "test" or die("Could not find database!");"
I get expected result.
Thanks for your consideration.
Regards,
--Wen
[EMAIL PROTECTED]
-
iii> You will get errors like these if your script does not print out a header
iii> before spitting out other information. It is usually best to print the
iii> header in the very beginning of the script so you do not have to worry about
iii> it. You dont have to wait until you are about to print o
::use_named_parameters(1);
>
> my ($db);
> my $output = new CGI;
>
> $db = param('test') or die("Could not find database!");
> my $dbh = DBI->connect("DBI:mysql:$db:$server",root,passward );
>
> if (not $dbh) {
> print header, start
sr/bin/perl -w
use strict;
use CGI qw(:standard);
use CGI::Carp;
use DBI;
CGI::use_named_parameters(1);
my ($db);
my $output = new CGI;
$db = param('test') or die("Could not find database!");
my $dbh = DBI->connect("DBI:mysql:$db:$server",root,passward );
if (not
sr/bin/perl -w
use strict;
use CGI qw(:standard);
use CGI::Carp;
use DBI;
CGI::use_named_parameters(1);
my ($db);
my $output = new CGI;
$db = param('test') or die("Could not find database!");
my $dbh = DBI->connect("DBI:mysql:$db:$server",root,passward );
if (not
24 matches
Mail list logo