summaryrefslogtreecommitdiff
path: root/scripts/mysqlhotcopy.sh
diff options
context:
space:
mode:
authormonty@hundin.mysql.fi <>2002-08-06 16:12:52 +0300
committermonty@hundin.mysql.fi <>2002-08-06 16:12:52 +0300
commit4e5b087172c16cfd697c351357c2c965dbdf9f75 (patch)
treeec56e69057df802b4810a80947eb79d8ffdd2a99 /scripts/mysqlhotcopy.sh
parent274f80626ef9d612c5ad5c570bc163b9a2f65a34 (diff)
downloadmariadb-git-4e5b087172c16cfd697c351357c2c965dbdf9f75.tar.gz
Better error messages for mysql-test-run
Added option --host to mysqlhotcopy
Diffstat (limited to 'scripts/mysqlhotcopy.sh')
-rw-r--r--scripts/mysqlhotcopy.sh15
1 files changed, 11 insertions, 4 deletions
diff --git a/scripts/mysqlhotcopy.sh b/scripts/mysqlhotcopy.sh
index 707b4fc481c..1aad5c95c25 100644
--- a/scripts/mysqlhotcopy.sh
+++ b/scripts/mysqlhotcopy.sh
@@ -50,7 +50,8 @@ Usage: $0 db_name[./table_regex/] [new_db_name | directory]
-?, --help display this helpscreen and exit
-u, --user=# user for database login if not current user
-p, --password=# password to use when connecting to server
- -P, --port=# port to use when connecting to local server
+ -h, --host=# Hostname for local server when connecting over TCP/IP
+ -P, --port=# port to use when connecting to local server with TCP/IP
-S, --socket=# socket to use when connecting to local server
--allowold don\'t abort if target already exists (rename it _old)
@@ -155,8 +156,8 @@ $opt{quiet} = 0 if $opt{debug};
$opt{allowold} = 1 if $opt{keepold};
# --- connect to the database ---
-my $dsn = ";host=localhost";
-$dsn = ";host=127.0.0.1" if $opt{port}; # use TCP/IP if port was given
+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};
@@ -891,9 +892,15 @@ user for database login if not current user
password to use when connecting to server
+=item -h, -h, --host=#
+
+Hostname for local server when connecting over TCP/IP. By specifying this
+different from 'localhost' will trigger mysqlhotcopy to use TCP/IP connection.
+
=item -P, --port=#
-port to use when connecting to local server
+port to use when connecting to MySQL server with TCP/IP. This is only used
+when using the --host option.
=item -S, --socket=#