1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285
|
'\" t
.\" Title: \fBmysqlserverclone\fR
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
.\" Date: 08/30/2013
.\" Manual: MySQL Utilities
.\" Source: MySQL 1.3.4
.\" Language: English
.\"
.TH "\FBMYSQLSERVERCLONE\" "1" "08/30/2013" "MySQL 1\&.3\&.4" "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 *
.\" -----------------------------------------------------------------
.\" mysqlserverclone
.\" utilities: mysqlserverclone
.\" scripts
.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 permits an administrator to clone an existing MySQL server instance to start a new server instance on the same host\&. The utility creates a new datadir (\fB\-\-new\-data\fR), and 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 shall 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\&.
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
.\}
\-\-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
.\}
\-\-mysqld=<options>
.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 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=<path_to_new_datadir>
.sp
The full path name of the location of the data directory for the new server instance\&. If the directory does not exist, the utility will create it\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\-\-new\-id=<server_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=<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=<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=<source>
.sp
Connection information for the server to be cloned in <\fIuser\fR>[:<\fIpasswd\fR>]@<\fIhost\fR>[:<\fIport\fR>][:<\fIsocket\fR>] format\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\-\-start\-timeout=<timeout_in_seconds>
.sp
Number of seconds to wait for server to start\&. Default = 10 seconds\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\-\-verbose, \-v
.sp
Specify how much information to display\&. Use this option multiple times to increase the amount of information\&. For example,
\fB\-v\fR
= verbose,
\fB\-vv\fR
= more verbose,
\fB\-vvv\fR
= debug\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\-\-version
.sp
Display version information and exit\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\-\-write\-command=<file_name>, \-w<file_name>
.sp
Path name of file in which to write the command used to launch the new server instance\&.
.RE
EXAMPLES
.PP
The following command demonstrates how to create a new instance of a running server, set the
root
user password and enable binary logging:
.sp
.if n \{\
.RS 4
.\}
.nf
$ mkdir /source/test123
$ mysqlserverclone \-\-server=root:pass@localhost \e
\-\-new\-data=/Users/cbell/source/test123 \-\-new\-port=3310 \e
\-\-root\-password=pass \-\-mysqld=\-\-log\-bin=mysql\-bin
# Cloning the MySQL server running on localhost\&.
# Creating new data directory\&.\&.\&.
# Configuring new instance\&.\&.\&.
# Locating mysql tools\&.\&.\&.
# Setting up empty database and mysql tables\&.\&.\&.
# Starting new instance of the server\&.\&.\&.
# Testing connection to new instance\&.\&.\&.
# Success!
# Setting the root password\&.\&.\&.
# \&.\&.\&.done\&.
.fi
.if n \{\
.RE
.\}
.SH "COPYRIGHT"
.br
.SH "SEE ALSO"
For more information, please refer to the MySQL Utilities section
of the MySQL Workbench Reference Manual, which is available online
at http://dev.mysql.com/doc/workbench/en/.
.SH AUTHOR
Oracle Corporation (http://dev.mysql.com/).
|