'\" t
.\" Title: \fBmysqlserverclone\fR
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.79.1
.\" Date: 08/01/2016
.\" Manual: MySQL Utilities
.\" Source: MySQL 1.6.3
.\" Language: English
.\"
.TH "\FBMYSQLSERVERCLONE\" "1" "08/01/2016" "MySQL 1\&.6\&.3" "MySQL Utilities"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
mysqlserverclone \- Clone Existing Server to Create New Server
.SH "SYNOPSIS"
.HP \w'\fBmysqlserverclone\ [\fR\fB\fIoptions\fR\fR\fB]\fR\ 'u
\fBmysqlserverclone [\fR\fB\fIoptions\fR\fR\fB]\fR
.SH "DESCRIPTION"
.PP
This utility enables you to clone an existing MySQL server instance to create a new server instance on the same host\&. The utility creates a new datadir (\fB\-\-new\-data\fR), and, on Unix systems, starts the server with a socket file\&. You can optionally add a password for the login user account on the new instance\&.
.PP
If the user does not have read and write access to the folder specified by the
\fB\-\-new\-data\fR
option, the utility will issue an error\&.
.PP
Similarly, if the folder specified by
\fB \-\-new\-data\fR
exists and is not empty, the utility will not delete the folder and will issue an error message\&. Users must specify the
\fB\-\-delete\-data\fR
option to permit the utility to remove the folder prior to starting the cloned server\&.
.PP
The utility does not copy any data\&. It merely creates a new running instance of the cloned server with the same options (or additional options if specified)\&. Thus, to create a copy of a server, you must copy the data after the server is cloned\&.
OPTIONS.PP
\fBmysqlserverclone\fR
accepts the following command\-line options:
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\-\-help
.sp
Display a help message and exit\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\-\-license
.sp
Display license information and exit\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\-\-delete\-data
.sp
Delete the folder specified by
\fB\-\-new\-data\fR
if it exists and is not empty\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\-\-basedir
.sp
The base directory for the MySQL server source, as an alternative to the
\fB\-\-server\fR
option\&.
.sp
.if n \{\
.RS 4
.\}
.nf
shell> \fBmysqlserverclone\fR \fB\-\-basedir=/source/mysql\-5\&.6 \e\fR
\fB\-\-new\-data=/source/temp_3007 \-\-new\-port=3007 \-\-new\-id=101 \e\fR
\fB\-\-root=root \-\-mysqld="\-\-log\-bin \-\-gtid\-mode=on \-\-log\-slave\-updates \e\fR
\fB\-\-enforce\-gtid\-consistency \-\-master\-info\-repository=table \e\fR
\fB\-\-report\-host=localhost \-\-report\-port=3007" \-\-delete\fR
.fi
.if n \{\
.RE
.\}
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\-\-force
.sp
Ignore the maximum path length and the low space checks for the
\fB\-\-new\-data\fR
option\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\-\-mysqld=
.sp
Additional options for
\fBmysqld\fR\&. To specify multiple options, separate them by spaces\&. Use appropriate quoting as necessary\&. For example, to specify
\-\-log\-bin=binlog
and
\-\-general\-log\-file="mylogfile", use:
.sp
If the option \-\-skip\-innodb is included when connecting to a MySQL server version 5\&.7\&.5 or higher, the option is ignored and a warning is issued\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\-\-mysqld="\-\-log\-bin=binlog \-\-general\-log\-file=\*(Aqmy log file\*(Aq"
.fi
.if n \{\
.RE
.\}
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\-\-new\-data=
.sp
The full path to the location of the data directory for the new instance\&. The path size must be 200 characters or less and it requires at least 120 MB of free space\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\-\-new\-id=
.sp
The
server_id
value for the new server instance\&. The default is 2\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\-\-new\-port=
.sp
The port number for the new server instance\&. The default is 3307\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\-\-quiet, \-q
.sp
Turn off all messages for quiet execution\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\-\-root\-password=
.sp
The password for the
root
user of the new server instance\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\-\-server=