2655 Cronでmysql-backup.shのエラー

<<トップページへ <<質問BBSへ

Cronでmysql-backup.shのエラー
日時: 2006/12/03 01:59
名前: masa
お世話になります
初心者で申し訳ございませんmysqlのバックアップで(このサイトを参考に設定)
Cron でmysql-backup.shのエラ−がメールに配送されます。

エラ−内容は以下の通りです

DBI::db=HASH(0xa1e63a8)->disconnect invalidates 1 active statement handle (either destroy statement handles or call finish on them before disconnecting) at /usr/bin/mysqlhotcopy line 537.
DBI::db=HASH(0x8baf3a8)->disconnect invalidates 1 active statement handle (either destroy statement handles or call finish on them before disconnecting) at /usr/bin/mysqlhotcopy line 537.
DBI::db=HASH(0x9f2b3a8)->disconnect invalidates 1 active statement handle (either destroy statement handles or call finish on them before disconnecting) at /usr/bin/mysqlhotcopy line 537.

書かれている内容が私には良く分かりません。
解決の方法があれば是非教えてください。

Re: Cronでmysql-backup.shのエラー(1)
日時: 2006/12/03 10:07
名前: 通りすがり
■MySQLバグ対処
MySQLバグにより、mysqlhotcopyが下記のようなエラーメッセージを出力する場合の対処

DBI::db=HASH(0x954d4a0)->disconnect invalidates 1 active statement handle (either destroy statement handles or call finish on them before disconnecting) at /usr/bin/mysqlhotcopy line 537.

[root@fedora ~]# vi /usr/bin/mysqlhotcopy ← mysqlhotcopy編集
# --- get variables from database ---
my $sth_vars = $dbh->prepare("show variables like 'datadir'");
$sth_vars->execute;
while ( my ($var,$value) = $sth_vars->fetchrow_array ) {
$mysqld_vars{ $var } = $value;
}
$sth_vars->finish(); ← 追加
my $datadir = $mysqld_vars{'datadir'}
|| die "datadir not in mysqld variables";
$datadir= $opt{chroot}.$datadir if ($opt{chroot});
$datadir =~ s:/$::;

# --- resolve database names from regexp ---
if ( defined $opt{regexp} ) {
my $t_regex = '.*';
if ( $opt{regexp} =~ s{^/(.+)/\./(.+)/$}{$1} ) {
$t_regex = $2;
}

my $sth_dbs = $dbh->prepare("show databases");
$sth_dbs->execute;
while ( my ($db_name) = $sth_dbs->fetchrow_array ) {
next if $db_name =~ m/^information_schema$/i;
push @db_desc, { 'src' => $db_name, 't_regex' => $t_regex } if ( $db_name =~ m/$opt{regexp}/o );
}
$sth_dbs->finish(); ← 追加
}

Re: Cronでmysql-backup.shのエラー(2)
日時: 2006/12/05 12:30
名前: masa
通りすがりさんありがとうございました。

ご指示通りの設定をし、2日間様子を見ました。
おかげで正常になりました。

またよろしく、お願いします。(^_^)

※古いスレッドには返信できない場合があります

Tweet Check



▲このページのトップへ戻る

LPIロゴ Copyright© 2011 fallenangels, All rights reserved.
ご自由にリンクしてください(連絡は不要です)
本ページへのご意見・ご要望、誤字・脱字・リンク切れ等のご連絡はこちらからお願いします