3 messages in com.mysql.lists.bugsRe: Fwd: mysqlhotcopy ignores --host ...
FromSent OnAttachments
Paul DuBois13 Nov 2002 08:44 
Paul DuBois14 Nov 2002 06:52 
Lenz Grimmer14 Nov 2002 16:53 
Subject:Re: Fwd: mysqlhotcopy ignores --host or -h option
From:Paul DuBois (pa@snake.net)
Date:11/14/2002 06:52:07 AM
List:com.mysql.lists.bugs

At 14:26 +0300 11/14/02, Peter Zaitsev wrote:

On Wednesday 13 November 2002 19:44, Paul DuBois wrote:

He's right. GetOptions doesn't list host|h, even though other code in the script assumes that option can be used.

This is true in the 3.23, 4.0, and 4.1 trees.

The reason is - mysqlhotcopy works by copying files which does not really work with databases on non local host.

That's not the reason for --host with mysqlhotcopy. As mysqlhotcopy --help says:

-h, --host=# Hostname for local server when connecting over TCP/IP

The reason for --host is to allow you to specify 127.0.0.1 or the actual host name of the *local* host, so that you can establish a connection over TCP/IP (rather than through the UNIX socket). Otherwise the --port option can't have any effect.

The help message includes --host, and the script includes code to handle the option:

my $dsn; $dsn = ";host=" . (defined($opt{host}) ? $opt{host} : "localhost"); $dsn .= ";port=$opt{port}" if $opt{port}; $dsn .= ";mysql_socket=$opt{socket}" if $opt{socket};

But the GetOptions() call doesn't list host|h, so the option cannot be used! It's a one-line fix, needs to be made in all trees.

One may extend it to use scp/rcp but This still requires some work.

filter fodder: How-To-Repeat: