diff -Nru mysql-utilities-1.6.3/CHANGES.txt mysql-utilities-1.6.4/CHANGES.txt --- mysql-utilities-1.6.3/CHANGES.txt 2016-03-18 20:05:45.000000000 +0000 +++ mysql-utilities-1.6.4/CHANGES.txt 2016-08-01 15:54:49.000000000 +0000 @@ -1,3 +1,22 @@ +Release-1.6.4 +------------- +- BUG#24348569 : utilities fail to properly detect 5.7.13 servers +- BUG#23300260 : mysql utilities fail with "too many values to unpack" in _update_alias +- BUG#23111808 : mysqldbbcopy copy blob data when some field's value is null +- BUG#22932375 : ha utilties must set connection_timeout in c/py connection to short value +- BUG#22905132 : handling regexp for few of the utilities +- BUG#22878052 : add master outage delay for mysqlfailover +- BUG#22780854 : valueerror while using mysqlrplsync discover-slave option with host:port +- BUG#22764612 : valueerror: too many values to unpack " running mysqlrpladmin +- BUG#22619159 : special char in password causes error with mysqlrplshow +- BUG#22543517 : mysqlbinlogpurge does not work with other than the first replication channel +- BUG#22495193 : mysqldbexport does not dump bit fields correctly +- BUG#22393353 : mysql-utilities-1.5.6-osx10.9.dmg won't install under osx 10.11.2 (el capitan) +- BUG#22242601 : yum install of mysql-utilities-1.5.6-1.el6.src.rpm fails (documentation updated) +- BUG#22076859 : after pressing in mysql utility console the command buffer is corrupt +- BUG#21222808 : mysqldiff: encoding comments always make databases definitions look different +- BUG#17666275 : add authentication plugin info to mysqluserclone + Release-1.6.3 ------------- - BUG#22964855 : year needs updation in readme,license and mysqluc in mu 1.6.3 packages diff -Nru mysql-utilities-1.6.3/debian/changelog mysql-utilities-1.6.4/debian/changelog --- mysql-utilities-1.6.3/debian/changelog 2016-03-31 08:35:48.000000000 +0000 +++ mysql-utilities-1.6.4/debian/changelog 2017-01-06 19:50:05.000000000 +0000 @@ -1,3 +1,13 @@ +mysql-utilities (1.6.4-1) unstable; urgency=medium + + * New upstream release + * extend packaging copyright years + * bump Standards-Version to 3.9.8 (no changes needed) + * rebase patches onto new upstream code + * declare compat level 10 + + -- Sandro Tosi Fri, 06 Jan 2017 14:50:05 -0500 + mysql-utilities (1.6.3-1) unstable; urgency=medium * New upstream release. diff -Nru mysql-utilities-1.6.3/debian/compat mysql-utilities-1.6.4/debian/compat --- mysql-utilities-1.6.3/debian/compat 2012-04-26 21:51:00.000000000 +0000 +++ mysql-utilities-1.6.4/debian/compat 2017-01-06 19:50:05.000000000 +0000 @@ -1 +1 @@ -9 \ No newline at end of file +10 diff -Nru mysql-utilities-1.6.3/debian/control mysql-utilities-1.6.4/debian/control --- mysql-utilities-1.6.3/debian/control 2016-03-31 07:16:50.000000000 +0000 +++ mysql-utilities-1.6.4/debian/control 2017-01-06 19:50:05.000000000 +0000 @@ -3,11 +3,11 @@ Priority: optional Maintainer: Dmitry Smirnov Uploaders: Sandro Tosi -Build-Depends: debhelper (>= 9), python-all, python-mysql.connector (>= 1.2.1), dh-python +Build-Depends: debhelper (>= 10), python-all, python-mysql.connector (>= 1.2.1), dh-python # bzr (>= 2.6.0~bzr6520) to satisfy get-orig-source due to #666496 ,bzr (>= 2.6.0~bzr6520) X-Python-Version: >= 2.7 -Standards-Version: 3.9.7 +Standards-Version: 3.9.8 Homepage: https://launchpad.net/mysql-utilities Vcs-Browser: https://anonscm.debian.org/cgit/collab-maint/mysql-utilities.git Vcs-Git: git://anonscm.debian.org/collab-maint/mysql-utilities.git diff -Nru mysql-utilities-1.6.3/debian/copyright mysql-utilities-1.6.4/debian/copyright --- mysql-utilities-1.6.3/debian/copyright 2016-03-31 08:18:15.000000000 +0000 +++ mysql-utilities-1.6.4/debian/copyright 2017-01-06 19:50:05.000000000 +0000 @@ -37,7 +37,7 @@ Files: debian/* Copyright: 2012-2016 Dmitry Smirnov - 2014-2015 Sandro Tosi + 2014-2017 Sandro Tosi License: GPL-2+ License: GPL-2 diff -Nru mysql-utilities-1.6.3/debian/patches/man.patch mysql-utilities-1.6.4/debian/patches/man.patch --- mysql-utilities-1.6.3/debian/patches/man.patch 2013-09-09 01:46:03.000000000 +0000 +++ mysql-utilities-1.6.4/debian/patches/man.patch 2017-01-06 19:50:05.000000000 +0000 @@ -5,8 +5,7 @@ --- a/docs/man/mysqlauditadmin.1 +++ b/docs/man/mysqlauditadmin.1 -@@ -32,10 +32,14 @@ - .\" scripts +@@ -30,8 +30,12 @@ .SH "NAME" mysqlauditadmin \- Maintain the audit log .SH "SYNOPSIS" @@ -20,12 +19,10 @@ +\fBmysqlauditadmin copy \-\-audit\-log\-name=\fR\fB\fIFULL_PATH\fR\fR\fB \-\-copy\-to=\fR\fB\fIDESTINATION\fR\fR\fB [\-\-remote\-login=\fR\fB\fIuser:host\fR\fR\fB]\fR .SH "DESCRIPTION" .PP - This utility allow you to maintain the - \m[blue]\fBaudit log\fR\m[]\&\s-2\u[1]\d\s+2, allowing you to monitor the audit log file growth and control its rotation\&. Rotation refers to the action of replacing the current audit log file by a new one for continuous use, renaming (with a timestamp extension) and copying the previously used audit log file to a defined location\&. + This utility allows you to maintain the audit log including the ability to view and modify a subset of audit log control variables, display the audit log file status, perform on\-demand rotation of the log file, and copy files to other locations\&. These features enable you to easily monitor the audit log file growth and control its rotation (automatically based on the defined file size threshold, or manually by a on\-demand command)\&. --- a/docs/man/mysqlauditgrep.1 +++ b/docs/man/mysqlauditgrep.1 -@@ -32,10 +32,13 @@ - .\" scripts +@@ -30,8 +30,11 @@ .SH "NAME" mysqlauditgrep \- Search an audit log .SH "SYNOPSIS" @@ -38,12 +35,10 @@ +\fB mysqlauditgrep [\-\-users=\fR\fB\fIUSERS\fR\fR\fB] [\-\-start\-date=\fR\fB\fISTART_DATE\fR\fR\fB] [\-\-end\-date=\fR\fB\fIEND_DATE\fR\fR\fB] [\-\-pattern=\fR\fB\fIPATTERN\fR\fR\fB[\-\-regexp]] [\-\-query\-type=\fR\fB\fIQUERY_TYPE\fR\fR\fB] [\-\-event\-type=\fR\fB\fIEVENT_TYPE\fR\fR\fB] [\-\-status=\fR\fB\fISTATUS\fR\fR\fB] [\-\-format=\fR\fB\fIFORMAT\fR\fR\fB] \fR\fB\fIAUDIT_LOG_FILE\fR\fR\fB \fR .SH "DESCRIPTION" .PP - This utility allows you to search the current or archived audit logs, allowing you to display data from the audit log file according to the defined search criterion\&. It also allows you to output the results in different formats, namely GRID (default), TAB, CSV, VERTICAL, and RAW (the original XML format)\&. - .PP + This utility allows you to search the current or archived audit logs permitting you to display data from the audit log file according to the defined search criterion\&. It also allows you to output the results in different formats, namely GRID (default), TAB, CSV, VERTICAL, and RAW (the original XML format)\&. --- a/docs/man/mysqluc.1 +++ b/docs/man/mysqluc.1 -@@ -32,9 +32,9 @@ - .\" scripts +@@ -30,7 +30,7 @@ .SH "NAME" mysqluc \- Command line client for running MySQL Utilities .SH "SYNOPSIS" @@ -52,4 +47,3 @@ \fBmysqluc [\-\-help | \-\-version | [ | \-\-verbose | \-\-quiet |] \-\-width= | \-\-utildir= | \-\-execute =]\fR .SH "DESCRIPTION" .PP - This utility provides a command line environment for running MySQL Utilities\&. diff -Nru mysql-utilities-1.6.3/docs/man/mysqlauditadmin.1 mysql-utilities-1.6.4/docs/man/mysqlauditadmin.1 --- mysql-utilities-1.6.3/docs/man/mysqlauditadmin.1 2016-03-18 20:24:05.000000000 +0000 +++ mysql-utilities-1.6.4/docs/man/mysqlauditadmin.1 2016-08-01 16:07:02.000000000 +0000 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysqlauditadmin\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/18/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/01/2016 .\" Manual: MySQL Utilities .\" Source: MySQL 1.6.3 .\" Language: English .\" -.TH "\FBMYSQLAUDITADMIN\F" "1" "03/18/2016" "MySQL 1\&.6\&.3" "MySQL Utilities" +.TH "\FBMYSQLAUDITADMIN\F" "1" "08/01/2016" "MySQL 1\&.6\&.3" "MySQL Utilities" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,9 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysqlauditadmin -.\" utilities: mysqlauditadmin -.\" scripts .SH "NAME" mysqlauditadmin \- Maintain the audit log .SH "SYNOPSIS" @@ -37,10 +34,9 @@ \fBmysqlauditadmin [\fR\fB\fIOPTIONS\fR\fR\fB]\&.\&.\&. \fR\fBmysqlauditadmin [\fR\fB\fIOPTIONS\fR\fR\fB]\&.\&.\&. [\fR\fB\fICOMMAND\fR\fR\fB]\fR\fBmysqlauditadmin l=\fR\fB\fIuser:pass@host:port\fR\fR\fB [\fR\fB\fIOPTIONS\fR\fR\fB]\&.\&.\&. [\fR\fB\fICOMMAND\fR\fR\fB[\-\-value=\fR\fB\fIVALUE\fR\fR\fB]]\fR\fBmysqlauditadmin \-\-file\-stats \-\-audit\-log\-name=\fR\fB\fIFULL_PATH\fR\fR\fBmysqlauditadmin copy \-\-audit\-log\-name=\fR\fB\fIFULL_PATH\fR\fR\fB \-\-copy\-to=\fR\fB\fIDESTINATION\fR\fR\fB [\-\-remote\-login=\fR\fB\fIuser:host\fR\fR\fB]\fR .SH "DESCRIPTION" .PP -This utility allow you to maintain the -\m[blue]\fBaudit log\fR\m[]\&\s-2\u[1]\d\s+2, allowing you to monitor the audit log file growth and control its rotation\&. Rotation refers to the action of replacing the current audit log file by a new one for continuous use, renaming (with a timestamp extension) and copying the previously used audit log file to a defined location\&. +This utility allows you to maintain the audit log including the ability to view and modify a subset of audit log control variables, display the audit log file status, perform on\-demand rotation of the log file, and copy files to other locations\&. These features enable you to easily monitor the audit log file growth and control its rotation (automatically based on the defined file size threshold, or manually by a on\-demand command)\&. .PP -This utility allows you to view and modify a subset of audit log control variables, display the audit log file status, perform on\-demand rotation of the log file, and copy files to other locations\&. These features enable you to easily monitor the audit log file growth and control its rotation (automatically based on the defined file size threshold, or manually by a on\-demand command)\&. +Rotation refers to the action of replacing the current audit log file by a new one for continuous use, renaming (with a timestamp extension) and copying the previously used audit log file to a defined location for archival purposes\&. .PP The available actions include the following: .sp @@ -72,7 +68,7 @@ .\} \fBpolicy\fR .sp -The policy command is used to change the audit logging policy\&. The accepted values are the following, which are set using the +The policy command is used to change the audit logging policy\&. The accepted values include the following, which are set using the \fB\-\-value\fR option\&. .if n \{\ @@ -91,7 +87,7 @@ \fB\-\-server\fR option is also required to execute this command\&. .sp -Starting from MySQL server 5\&.6\&.20 and 5\&.7\&.5, the value is read only for the audit_log_policy variable\&. Now the policy results from the combination of two new variables: audit_log_connection_policy and audit_log_statement_policy\&. This change is supported starting from MySQL Utilities 1\&.5\&.2\&. +Starting from MySQL server 5\&.6\&.20 and 5\&.7\&.5, the value is read only for the audit_log_policy variable\&. MySQL server 5\&.7\&.9 introduced two new variables: audit_log_connection_policy and audit_log_statement_policy whose values are determined based on the presence and value of the audit_log_policy startup variable\&. See the MySQL reference manual for more information about how the policy variables are set\&. These changes are supported starting from MySQL Utilities 1\&.5\&.2\&. .sp .5v .RE .sp @@ -200,7 +196,7 @@ .\} \-\-audit\-log\-name= .sp -Full path and file name for the audit log file\&. Used by the +Full path and filename for the audit log file\&. Used by the \fB\-\-file\-stats\fR option, and the \fIcopy\fR @@ -284,7 +280,7 @@ .sp Connection information for the server\&. .sp -To connect to a server, it is necessary to specify connection parameters such as user name, host name, password, and either a port or socket\&. MySQL Utilities provides a number of ways to supply this information\&. All of the methods require specifying your choice via a command\-line option such as \-\-server, \-\-master, \-\-slave, etc\&. The methods include the following in order of most secure to least secure\&. +To connect to a server, it is necessary to specify connection parameters such as the user name, host name, password, and either a port or socket\&. MySQL Utilities provides a number of ways to supply this information\&. All of the methods require specifying your choice via a command\-line option such as \-\-server, \-\-master, \-\-slave, etc\&. The methods include the following in order of most secure to least secure\&. .sp .RS 4 .ie n \{\ @@ -436,8 +432,7 @@ Display version information and exit\&. .RE NOTES.PP -This utility can only be applied to servers with the -\m[blue]\fBaudit log plugin enabled\fR\m[]\&\s-2\u[2]\d\s+2\&. And the audit log plugin is available as of MySQL Server versions 5\&.5\&.28 and 5\&.6\&.10\&. +This utility can only be applied to servers with the audit log plugin enabled\&. And the audit log plugin is available as of MySQL Server versions 5\&.5\&.28 and 5\&.6\&.10\&. .PP This utility requires Python version 2\&.6 or higher, but does not support Python 3\&. .PP @@ -446,9 +441,9 @@ environment variable in order to use the authentication mechanism with login\-paths\&. This will allow the utility to use the my_print_defaults tools, which is required to read the login\-path values from the login configuration file (\&.mylogin\&.cnf)\&. This feature exists as of MySQL Server 5\&.6\&.6, see -\m[blue]\fB\fBmysql_config_editor\fR \(em MySQL Configuration Utility\fR\m[]\&\s-2\u[3]\d\s+2\&. +\m[blue]\fB\fBmysql_config_editor\fR \(em MySQL Configuration Utility\fR\m[]\&\s-2\u[1]\d\s+2\&. .PP -Changes to MySQL Enterprise Audit Log Plug\-in are not documented in this documentation, so your output might be different than the examples here\&. For example, a new (or removed) MySQL Enterprise Audit Log Plug\-in option might affect the output\&. +Changes to MySQL Enterprise Audit are not documented here, so your output might be different than the examples shown\&. For example, a new (or removed) MySQL Enterprise Audit option might affect the output\&. LIMITATIONS.PP The \fB\-\-remote\-login\fR @@ -673,7 +668,7 @@ .\} .sp PERMISSIONS REQUIRED.PP -The user must have permissions to read the audit log on disk and write the file to the remove location\&. +The user must have permissions to read the audit log file(s) on disk and write the file(s) to the remote location\&. .SH "COPYRIGHT" .br .PP @@ -687,16 +682,6 @@ .sp .SH "NOTES" .IP " 1." 4 -audit log -.RS 4 -\%http://dev.mysql.com/doc/refman/5.7/en/audit-log-plugin.html -.RE -.IP " 2." 4 -audit log plugin enabled -.RS 4 -\%http://dev.mysql.com/doc/refman/5.7/en/audit-log-plugin-installation.html -.RE -.IP " 3." 4 \fBmysql_config_editor\fR \(em MySQL Configuration Utility .RS 4 \%http://dev.mysql.com/doc/refman/5.7/en/mysql-config-editor.html diff -Nru mysql-utilities-1.6.3/docs/man/mysqlauditgrep.1 mysql-utilities-1.6.4/docs/man/mysqlauditgrep.1 --- mysql-utilities-1.6.3/docs/man/mysqlauditgrep.1 2016-03-18 20:24:05.000000000 +0000 +++ mysql-utilities-1.6.4/docs/man/mysqlauditgrep.1 2016-08-01 16:07:02.000000000 +0000 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysqlauditgrep\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/18/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/01/2016 .\" Manual: MySQL Utilities .\" Source: MySQL 1.6.3 .\" Language: English .\" -.TH "\FBMYSQLAUDITGREP\FR" "1" "03/18/2016" "MySQL 1\&.6\&.3" "MySQL Utilities" +.TH "\FBMYSQLAUDITGREP\FR" "1" "08/01/2016" "MySQL 1\&.6\&.3" "MySQL Utilities" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,9 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysqlauditgrep -.\" utilities: mysqlauditgrep -.\" scripts .SH "NAME" mysqlauditgrep \- Search an audit log .SH "SYNOPSIS" @@ -37,11 +34,11 @@ \fB mysqlauditgrep [\fR\fB\fIOPTIONS\fR\fR\fB]\&.\&.\&. \fR\fB\fIAUDIT_LOG_FILE\fR\fR\fB \fR\fB mysqlauditgrep \-\-file\-stats[\-\-format=\fR\fB\fIFORMAT\fR\fR\fB] \fR\fB\fIAUDIT_LOG_FILE\fR\fR\fB \fR\fB mysqlauditgrep \-\-format=\fR\fB\fIFORMAT\fR\fR\fB \fR\fB\fIAUDIT_LOG_FILE\fR\fR\fB \fR\fB mysqlauditgrep [\-\-users=\fR\fB\fIUSERS\fR\fR\fB] [\-\-start\-date=\fR\fB\fISTART_DATE\fR\fR\fB] [\-\-end\-date=\fR\fB\fIEND_DATE\fR\fR\fB] [\-\-pattern=\fR\fB\fIPATTERN\fR\fR\fB[\-\-regexp]] [\-\-query\-type=\fR\fB\fIQUERY_TYPE\fR\fR\fB] [\-\-event\-type=\fR\fB\fIEVENT_TYPE\fR\fR\fB] [\-\-status=\fR\fB\fISTATUS\fR\fR\fB] [\-\-format=\fR\fB\fIFORMAT\fR\fR\fB] \fR\fB\fIAUDIT_LOG_FILE\fR\fR\fB \fR .SH "DESCRIPTION" .PP -This utility allows you to search the current or archived audit logs, allowing you to display data from the audit log file according to the defined search criterion\&. It also allows you to output the results in different formats, namely GRID (default), TAB, CSV, VERTICAL, and RAW (the original XML format)\&. +This utility allows you to search the current or archived audit logs permitting you to display data from the audit log file according to the defined search criterion\&. It also allows you to output the results in different formats, namely GRID (default), TAB, CSV, VERTICAL, and RAW (the original XML format)\&. .PP This utility allows you to search and filter the returned audit log records by: users (\fB\-\-users\fR), date and time ranges (\fB\-\-start\-date\fR and -\fB\-\-end\-date\fR), SQL query types (\fB\-\-query\-type\fR), logged event and record types (\fB\-\-event\-type\fR), status (\fB\-\-status\fR), and matching patterns (\fB\-\-pattern\fR)\&. Any of these search options can be combined and used together, with the retrieved records resulting from all passed in options being true\&. +\fB\-\-end\-date\fR), SQL query types (\fB\-\-query\-type\fR), logged event and record types (\fB\-\-event\-type\fR), status (\fB\-\-status\fR), and matching patterns (\fB\-\-pattern\fR)\&. Any of these search options can be combined and used together, with the retrieved records resulting from all options evaluated as an and condition (all must be true)\&. .PP The \fB\-\-pattern\fR @@ -51,15 +48,15 @@ \fIREGEXP\fR (POSIX regular expression patterns)\&. .PP -This utility always requires an audit log file to be passed in, so the +This utility always requires an audit log file\&. The \fIAUDIT_LOG_FILE\fR -argument is searched as a full path and file name for the audit log file\&. If not specified, a notification concerning this requirement will be printed\&. And if +argument should contain the a full path and filename for the audit log file\&. If not specified, a notification concerning this requirement will be printed\&. If \fB\-\-format\fR -is passed in without search parameters, then all the records of the audit log are displayed in the specified format\&. +is specified without search parameters, all of the records of the audit log are displayed in the specified format\&. Thus, you can use this feature to view the audit log file in the supported formats\&. .PP The \fB\-\-file\-stats\fR -option is not considered a search criteria, and is used to display the file statistics of a specified audit log\&. Other search options will be ignored when the +option is not considered a search criteria and is used to display the file statistics of a specified audit log\&. Other search options will be ignored when the \fB\-\-file\-stats\fR option is used, except the \fB\-\-format\fR @@ -724,11 +721,10 @@ NOTES.PP This utility is available as of MySQL Utilities 1\&.2\&.0\&. .PP -This utility can only be applied to servers with the -\m[blue]\fBaudit log plugin enabled\fR\m[]\&\s-2\u[3]\d\s+2\&. And the audit log plugin is available as of MySQL Server versions 5\&.5\&.28 and 5\&.6\&.10\&. +This utility can only be applied to servers with the audit log plugin enabled\&. And the audit log plugin is available as of MySQL Server versions 5\&.5\&.28 and 5\&.6\&.10\&. .PP This utility support both of the existing audit log file formats (old and new)\&. The new audit log format is supported as of MySQL Utilities 1\&.4\&.3\&. See -\m[blue]\fBThe Audit Log File\fR\m[]\&\s-2\u[4]\d\s+2, for more information about available file formats\&. +\m[blue]\fBThe Audit Log File\fR\m[]\&\s-2\u[3]\d\s+2, for more information about available file formats\&. .PP This utility requires the use of Python version 2\&.6 or higher, but does not support Python 3\&. .PP @@ -965,7 +961,7 @@ +\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ | 1046 | 2012\-10\-10T15:57:26 | Query | show tables test | 11 | | 1046 | 2012\-10\-10T15:57:36 | Query | show tables test | 11 | - | 1146 | 2012\-10\-10T17:44:55 | Query | select * from teste\&.employees where salary > 500 and salary < 1000 | 12 | + | 1146 | 2012\-10\-10T17:44:55 | Query | select * from test\&.employees where salary > 500 and salary < 1000 | 12 | | 1046 | 2012\-10\-10T17:47:17 | Query | select * from test_encoding where value = \*(Aq<>"&\*(Aq | 12 | +\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ .fi @@ -1011,7 +1007,7 @@ .\} .sp PERMISSIONS REQUIRED.PP -The user must have permissions to read the audit log on disk\&. +The user must have permissions to read the audit log file(s) on disk\&. .SH "COPYRIGHT" .br .PP @@ -1035,11 +1031,6 @@ \%http://docs.python.org/2/library/re.html .RE .IP " 3." 4 -audit log plugin enabled -.RS 4 -\%http://dev.mysql.com/doc/refman/5.7/en/audit-log-plugin-installation.html -.RE -.IP " 4." 4 The Audit Log File .RS 4 \%http://dev.mysql.com/doc/refman/5.7/en/audit-log-file.html diff -Nru mysql-utilities-1.6.3/docs/man/mysqlbinlogmove.1 mysql-utilities-1.6.4/docs/man/mysqlbinlogmove.1 --- mysql-utilities-1.6.3/docs/man/mysqlbinlogmove.1 2016-03-18 20:24:05.000000000 +0000 +++ mysql-utilities-1.6.4/docs/man/mysqlbinlogmove.1 2016-08-01 16:07:02.000000000 +0000 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysqlbinlogmove\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/18/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/01/2016 .\" Manual: MySQL Utilities .\" Source: MySQL 1.6.3 .\" Language: English .\" -.TH "\FBMYSQLBINLOGMOVE\F" "1" "03/18/2016" "MySQL 1\&.6\&.3" "MySQL Utilities" +.TH "\FBMYSQLBINLOGMOVE\F" "1" "08/01/2016" "MySQL 1\&.6\&.3" "MySQL Utilities" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,9 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysqlbinlogmove -.\" utilities: mysqlbinlogmove -.\" scripts .SH "NAME" mysqlbinlogmove \- Binary log relocate utility .SH "SYNOPSIS" @@ -37,7 +34,7 @@ \fBmysqlbinlogmove [\fR\fB\fIoptions\fR\fR\fB] \fR\fB\fIdestination_directory>\fR\fR .SH "DESCRIPTION" .PP -This utility allows binary logs to be relocated to a different location in a simple and easy way\&. In particular, it moves existing binary logs to the specified location and updates the necessary server files (i\&.e\&., binary log index files)\&. +This utility allows binary logs to be relocated to a different location in a simple and easy way\&. In particular, it moves existing binary logs to a specified location and updates the necessary server files (i\&.e\&., binary log index files) with the new location\&. .PP From a practical point of view, the use of this utility is recommended before you change the binary log base directory to move all binary log files to the target location, avoiding errors on the server when started with the new \-\-log\-bin location\&. It is also useful to archive older binary log files to a different location, in order to save disk space in the current partition\&. .if n \{\ @@ -53,7 +50,7 @@ .ps -1 .br .PP -In order to relocate all binary log files, the MySQL server must be stopped\&. This requirement is not needed if only some of binary log files are intended to be moved\&. +In order to relocate all binary log files, the MySQL server must be stopped\&. This requirement is not needed if binary log files that are not in use are moved\&. .sp .5v .RE .PP @@ -62,27 +59,27 @@ option or the source location of the binary log files using the option \fB\-\-binlog\-dir\fR\&. When the \fB\-\-server\fR -option is used the utility will determine the binary logs basename and index file location from the server (depending on its version) and all binary log files will be moved except the ones currently in use (with the higher sequence number)\&. In order to move all binary logs the the +option is used, the utility will determine the binary logs base filename and index file location from the server (depending on its version) and all binary log files will be moved except the ones currently in use (with the higher sequence number)\&. In order to move all binary logs including those in use, the \fB\-\-binlog\-dir\fR -option must be used, requiring the MySQL server to be stopped\&. +option must be used, which requires the MySQL server to be stopped\&. .PP -By default, the utility only moves binary log files\&. To move relay log files or both, the user must use the +By default, the utility only moves binary log files\&. If the server is performing the role of a slave or if you want to move both binary and relay log files, you must use the \fB\-\-log\-type\fR option with the desired value\&. .PP When the server \fB\-\-server\fR -is used by default binary logs are flushed at the end of the move operation, in order to reload the binary logs data (cache) on the server\&. Users can skip this step using the +is used, binary logs are flushed at the end of the move operation to refresh the cache\&. Users can skip this step using the \fB\-\-skip\-flush\-binlogs\fR option\&. .PP -The utility always attempts to determine the necessary information (base filename, binary logs and index location) based on the available server\*(Aqs data or the default values\&. Nevertheless, custom values might be used and some variables might not be available for older server versions or simply the server connection might not provided\&. If custom file names are used, the user can specify them using the options +The utility always attempts to determine the necessary information (base filename, binary logs and index location) based on the available server\*(Aqs data or the default values\&. Nevertheless, custom values might be used and some variables might not be available for older server versions or simply the server connection might not provided\&. If custom filenames are used, the user can specify them using the options \fB\-\-bin\-log\-index\fR, \fB\-\-bin\-log\-basename\fR, \fB\-\-relay\-log\-index\fR, and \fB\-\-relay\-log\-basename\fR, respectively for binary log and relay log files\&. .PP -By default, all of the binary log files found are moved (except the ones currently in use if the +By default, all of the binary log files found that are not in use are moved (except when the \fB\-\-server\fR option is used)\&. The \fB\-\-sequence\fR @@ -257,7 +254,7 @@ .sp Connection information for the server\&. .sp -To connect to a server, it is necessary to specify connection parameters such as user name, host name, password, and either a port or socket\&. MySQL Utilities provides a number of ways to supply this information\&. All of the methods require specifying your choice via a command\-line option such as \-\-server, \-\-master, \-\-slave, etc\&. The methods include the following in order of most secure to least secure\&. +To connect to a server, it is necessary to specify connection parameters such as the user name, host name, password, and either a port or socket\&. MySQL Utilities provides a number of ways to supply this information\&. All of the methods require specifying your choice via a command\-line option such as \-\-server, \-\-master, \-\-slave, etc\&. The methods include the following in order of most secure to least secure\&. .sp .RS 4 .ie n \{\ @@ -665,9 +662,9 @@ .\} .sp PERMISSIONS REQUIRED.PP -By default, the user used to connect to the server must have permissions to flush the binary logs, more precisely the RELOAD privilege is required, except if the flush step is skipped\&. +By default, the user account used to connect to the server must have permissions to flush the binary logs, more precisely the RELOAD privilege is required, except if the flush step is skipped\&. .PP -Additionally, the system user used to execute the utility must have read and write access to the location of the binary logs and index files, as well as the destination directory to move the files\&. +Additionally, the user account used to execute the utility must have read and write access to the location of the binary log and index files as well as the destination directory to move the files\&. .SH "COPYRIGHT" .br .PP diff -Nru mysql-utilities-1.6.3/docs/man/mysqlbinlogpurge.1 mysql-utilities-1.6.4/docs/man/mysqlbinlogpurge.1 --- mysql-utilities-1.6.3/docs/man/mysqlbinlogpurge.1 2016-03-18 20:24:05.000000000 +0000 +++ mysql-utilities-1.6.4/docs/man/mysqlbinlogpurge.1 2016-08-01 16:07:02.000000000 +0000 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysqlbinlogpurge\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/18/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/01/2016 .\" Manual: MySQL Utilities .\" Source: MySQL 1.6.3 .\" Language: English .\" -.TH "\FBMYSQLBINLOGPURGE\" "1" "03/18/2016" "MySQL 1\&.6\&.3" "MySQL Utilities" +.TH "\FBMYSQLBINLOGPURGE\" "1" "08/01/2016" "MySQL 1\&.6\&.3" "MySQL Utilities" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,9 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysqlbinlogpurge -.\" utilities: mysqlbinlogpurge -.\" scripts .SH "NAME" mysqlbinlogpurge \- Binary log purge utility .SH "SYNOPSIS" @@ -37,7 +34,7 @@ \fBmysqlbinlogpurge [\fR\fB\fIoptions\fR\fR\fB] \fR\fB\fImaster\fR\fR\fB \fR\fB\fIslaves\fR\fR .SH "DESCRIPTION" .PP -This utility enables you to safely purge binary logs by ensuring that any files which are in use or required by any of the slaves in a replication topology are not deleted\&. This is achieved by checking which binary logs have been read on each slave\&. This determines the minimal set of binary log files that can be purged\&. +This utility enables you to safely purge (delete) binary logs by ensuring that any files which are in use or required by any of the slaves in a replication topology are not deleted\&. This is achieved by checking which binary logs have been read on each slave\&. This determines the minimal set of binary log files that can be purged\&. .if n \{\ .sp .\} @@ -128,7 +125,7 @@ .sp Connection information for the server\&. .sp -To connect to a server, it is necessary to specify connection parameters such as user name, host name, password, and either a port or socket\&. MySQL Utilities provides a number of ways to supply this information\&. All of the methods require specifying your choice via a command\-line option such as \-\-server, \-\-master, \-\-slave, etc\&. The methods include the following in order of most secure to least secure\&. +To connect to a server, it is necessary to specify connection parameters such as the user name, host name, password, and either a port or socket\&. MySQL Utilities provides a number of ways to supply this information\&. All of the methods require specifying your choice via a command\-line option such as \-\-server, \-\-master, \-\-slave, etc\&. The methods include the following in order of most secure to least secure\&. .sp .RS 4 .ie n \{\ @@ -229,7 +226,7 @@ .\} \-\-binlog= .sp -Binary log file name to not to purge\&. All the binary log files prior to the specified file are removed\&. +Binary log filename to not to purge\&. All the binary log files prior to the specified file are removed\&. .RE .sp .RS 4 @@ -270,9 +267,9 @@ .\} \-\-slaves= .sp -Connection information for slave servers\&. List multiple slaves in a comma\-separated list\&. The list is evaluated literally, where each server is considered a slave of the master listed regardless of whether they are a slave of the master\&. +Connection information for slave servers\&. List multiple slaves in a comma\-separated list\&. The list is evaluated literally, where each server is considered a slave of the master listed\&. Thus, all servers specified in this option must be slaves of the current master\&. .sp -To connect to a server, it is necessary to specify connection parameters such as user name, host name, password, and either a port or socket\&. MySQL Utilities provides a number of ways to supply this information\&. All of the methods require specifying your choice via a command\-line option such as \-\-server, \-\-master, \-\-slave, etc\&. The methods include the following in order of most secure to least secure\&. +To connect to a server, it is necessary to specify connection parameters such as the user name, host name, password, and either a port or socket\&. MySQL Utilities provides a number of ways to supply this information\&. All of the methods require specifying your choice via a command\-line option such as \-\-server, \-\-master, \-\-slave, etc\&. The methods include the following in order of most secure to least secure\&. .sp .RS 4 .ie n \{\ @@ -323,7 +320,7 @@ .sp Connection information for the master server\&. .sp -To connect to a server, it is necessary to specify connection parameters such as user name, host name, password, and either a port or socket\&. MySQL Utilities provides a number of ways to supply this information\&. All of the methods require specifying your choice via a command\-line option such as \-\-server, \-\-master, \-\-slave, etc\&. The methods include the following in order of most secure to least secure\&. +To connect to a server, it is necessary to specify connection parameters such as the user name, host name, password, and either a port or socket\&. MySQL Utilities provides a number of ways to supply this information\&. All of the methods require specifying your choice via a command\-line option such as \-\-server, \-\-master, \-\-slave, etc\&. The methods include the following in order of most secure to least secure\&. .sp .RS 4 .ie n \{\ diff -Nru mysql-utilities-1.6.3/docs/man/mysqlbinlogrotate.1 mysql-utilities-1.6.4/docs/man/mysqlbinlogrotate.1 --- mysql-utilities-1.6.3/docs/man/mysqlbinlogrotate.1 2016-03-18 20:24:05.000000000 +0000 +++ mysql-utilities-1.6.4/docs/man/mysqlbinlogrotate.1 2016-08-01 16:07:02.000000000 +0000 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysqlbinlogrotate\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/18/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/01/2016 .\" Manual: MySQL Utilities .\" Source: MySQL 1.6.3 .\" Language: English .\" -.TH "\FBMYSQLBINLOGROTATE" "1" "03/18/2016" "MySQL 1\&.6\&.3" "MySQL Utilities" +.TH "\FBMYSQLBINLOGROTATE" "1" "08/01/2016" "MySQL 1\&.6\&.3" "MySQL Utilities" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,9 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysqlbinlogrotate -.\" utilities: mysqlbinlogrotate -.\" scripts .SH "NAME" mysqlbinlogrotate \- Binary log rotate utility .SH "SYNOPSIS" @@ -37,7 +34,7 @@ \fBmysqlbinlogrotate [\fR\fB\fIoptions\fR\fR\fB] \fR\fB\fI\-\-server\fR\fR .SH "DESCRIPTION" .PP -This utility rotates the binary log by closing the active log and opening a new binary log file\&. +This utility rotates the binary log by closing the active binary log file and opening a new binary log file\&. .PP The user must provide the server connection parameters with the \fB\-\-server\fR @@ -88,7 +85,7 @@ .sp Connection information for the server\&. .sp -To connect to a server, it is necessary to specify connection parameters such as user name, host name, password, and either a port or socket\&. MySQL Utilities provides a number of ways to supply this information\&. All of the methods require specifying your choice via a command\-line option such as \-\-server, \-\-master, \-\-slave, etc\&. The methods include the following in order of most secure to least secure\&. +To connect to a server, it is necessary to specify connection parameters such as the user name, host name, password, and either a port or socket\&. MySQL Utilities provides a number of ways to supply this information\&. All of the methods require specifying your choice via a command\-line option such as \-\-server, \-\-master, \-\-slave, etc\&. The methods include the following in order of most secure to least secure\&. .sp .RS 4 .ie n \{\ @@ -215,7 +212,7 @@ .PP The path to the MySQL client tools should be included in the PATH environment variable in order to use the authentication mechanism with login\-paths\&. This will allow the utility to use the my_print_defaults tools which is required to read the login\-path values from the login configuration file (\&.mylogin\&.cnf)\&. EXAMPLES.PP -Rotate the active binary log file and display new file name\&. +Rotate the active binary log file and display the new filename\&. .sp .if n \{\ .RS 4 @@ -232,7 +229,7 @@ .RE .\} .PP -Rotate the active binary log file only if his size exceeds 1GB (1073741824 bytes) and display new file name\&. +Rotate the active binary log file only if his size exceeds 1GB (1073741824 bytes) and display new filename\&. .sp .if n \{\ .RS 4 diff -Nru mysql-utilities-1.6.3/docs/man/mysqldbcompare.1 mysql-utilities-1.6.4/docs/man/mysqldbcompare.1 --- mysql-utilities-1.6.3/docs/man/mysqldbcompare.1 2016-03-18 20:24:05.000000000 +0000 +++ mysql-utilities-1.6.4/docs/man/mysqldbcompare.1 2016-08-01 16:07:02.000000000 +0000 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysqldbcompare\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/18/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/01/2016 .\" Manual: MySQL Utilities .\" Source: MySQL 1.6.3 .\" Language: English .\" -.TH "\FBMYSQLDBCOMPARE\FR" "1" "03/18/2016" "MySQL 1\&.6\&.3" "MySQL Utilities" +.TH "\FBMYSQLDBCOMPARE\FR" "1" "08/01/2016" "MySQL 1\&.6\&.3" "MySQL Utilities" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,9 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysqldbcompare -.\" utilities: mysqldbcompare -.\" scripts .SH "NAME" mysqldbcompare \- Compare Two Databases and Identify Differences .SH "SYNOPSIS" @@ -579,6 +576,25 @@ \fBLIKE\fR\&. With the \fB\-\-regexp\fR option, patterns use regular expressions for matching names\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +The utility will attempt to determine if the pattern supplied has any special characters (such as an asterisks), which may indicate that the pattern could be a REGEXP pattern\&. If there are special, non\-SQL LIKE pattern characters and the user has not specified the +\fB\-\-regexp\fR +option, a warning is presented to suggest the user check the pattern for possible use with the +\fB\-\-regexp\fR +option\&. +.sp .5v +.RE .RE .sp .RS 4 @@ -667,7 +683,7 @@ .sp Connection information for the first server\&. .sp -To connect to a server, it is necessary to specify connection parameters such as user name, host name, password, and either a port or socket\&. MySQL Utilities provides a number of ways to supply this information\&. All of the methods require specifying your choice via a command\-line option such as \-\-server, \-\-master, \-\-slave, etc\&. The methods include the following in order of most secure to least secure\&. +To connect to a server, it is necessary to specify connection parameters such as the user name, host name, password, and either a port or socket\&. MySQL Utilities provides a number of ways to supply this information\&. All of the methods require specifying your choice via a command\-line option such as \-\-server, \-\-master, \-\-slave, etc\&. The methods include the following in order of most secure to least secure\&. .sp .RS 4 .ie n \{\ @@ -718,7 +734,7 @@ .sp Connection information for the second server\&. .sp -To connect to a server, it is necessary to specify connection parameters such as user name, host name, password, and either a port or socket\&. MySQL Utilities provides a number of ways to supply this information\&. All of the methods require specifying your choice via a command\-line option such as \-\-server, \-\-master, \-\-slave, etc\&. The methods include the following in order of most secure to least secure\&. +To connect to a server, it is necessary to specify connection parameters such as the user name, host name, password, and either a port or socket\&. MySQL Utilities provides a number of ways to supply this information\&. All of the methods require specifying your choice via a command\-line option such as \-\-server, \-\-master, \-\-slave, etc\&. The methods include the following in order of most secure to least secure\&. .sp .RS 4 .ie n \{\ @@ -979,6 +995,10 @@ with \fBother:weird`db\&.name\fR, the database pair must be specified using the following syntax (in non\-Windows): \fB\*(Aq`weird``db\&.name`:`other:weird``db\&.name`\*(Aq\fR\&. +.PP +When comparing two databases of different names, the utility will suppress differences in the +CREATE DATABASE +statements when only the names differ\&. If any of the decorators differ, the differences in the statements will be shown\&. EXAMPLES.PP Use the following command to compare the emp1 @@ -1186,6 +1206,8 @@ .RE .\} .sp +LIMITATIONS.PP +The utility reads the primary key of each row into a data structure, which is then used to generate checksums for each row\&. The primary key and checksum are then sorted and compared to detect which rows differ\&. Due to this design, the utility may exhibit slower performance for very large tables (many rows) especially for tables with wide primary keys\&. Use of this utility with tables that have blob fields as part of the primary key is not recommended\&. PERMISSIONS REQUIRED.PP The user must have the SELECT, CREATE TEMPORARY TABLES and INSERT privileges for the databases being compared on both connections\&. The user must also have SELECT privilege on the mysql database\&. If the binary log is enabled and the \fB\-\-disable\-binary\-logging\fR diff -Nru mysql-utilities-1.6.3/docs/man/mysqldbcopy.1 mysql-utilities-1.6.4/docs/man/mysqldbcopy.1 --- mysql-utilities-1.6.3/docs/man/mysqldbcopy.1 2016-03-18 20:24:05.000000000 +0000 +++ mysql-utilities-1.6.4/docs/man/mysqldbcopy.1 2016-08-01 16:07:02.000000000 +0000 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysqldbcopy\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/18/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/01/2016 .\" Manual: MySQL Utilities .\" Source: MySQL 1.6.3 .\" Language: English .\" -.TH "\FBMYSQLDBCOPY\FR" "1" "03/18/2016" "MySQL 1\&.6\&.3" "MySQL Utilities" +.TH "\FBMYSQLDBCOPY\FR" "1" "08/01/2016" "MySQL 1\&.6\&.3" "MySQL Utilities" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,9 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysqldbcopy -.\" utilities: mysqldbcopy -.\" scripts .SH "NAME" mysqldbcopy \- Copy Database Objects Between Servers .SH "SYNOPSIS" @@ -220,7 +217,7 @@ .sp Connection information for the destination server\&. .sp -To connect to a server, it is necessary to specify connection parameters such as user name, host name, password, and either a port or socket\&. MySQL Utilities provides a number of ways to supply this information\&. All of the methods require specifying your choice via a command\-line option such as \-\-server, \-\-master, \-\-slave, etc\&. The methods include the following in order of most secure to least secure\&. +To connect to a server, it is necessary to specify connection parameters such as the user name, host name, password, and either a port or socket\&. MySQL Utilities provides a number of ways to supply this information\&. All of the methods require specifying your choice via a command\-line option such as \-\-server, \-\-master, \-\-slave, etc\&. The methods include the following in order of most secure to least secure\&. .sp .RS 4 .ie n \{\ @@ -278,6 +275,25 @@ matching\&. .sp This option does not apply to grants\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +The utility will attempt to determine if the pattern supplied has any special characters (such as an asterisks), which may indicate that the pattern could be a REGEXP pattern\&. If there are special, non\-SQL LIKE pattern characters and the user has not specified the +\fB\-\-regexp\fR +option, a warning is presented to suggest the user check the pattern for possible use with the +\fB\-\-regexp\fR +option\&. +.sp .5v +.RE .RE .sp .RS 4 @@ -475,7 +491,7 @@ .sp Connection information for the source server\&. .sp -To connect to a server, it is necessary to specify connection parameters such as user name, host name, password, and either a port or socket\&. MySQL Utilities provides a number of ways to supply this information\&. All of the methods require specifying your choice via a command\-line option such as \-\-server, \-\-master, \-\-slave, etc\&. The methods include the following in order of most secure to least secure\&. +To connect to a server, it is necessary to specify connection parameters such as the user name, host name, password, and either a port or socket\&. MySQL Utilities provides a number of ways to supply this information\&. All of the methods require specifying your choice via a command\-line option such as \-\-server, \-\-master, \-\-slave, etc\&. The methods include the following in order of most secure to least secure\&. .sp .RS 4 .ie n \{\ @@ -657,7 +673,7 @@ \fB\-\-rpl\fR option is not valid for copying databases on the same server\&. An error will be generated\&. .PP -When copying data and including the GTID commands, you may encounter an error similar to "GTID_PURGED can only be set when GTID_EXECUTED is empty"\&. This occurs because the destination server is not in a clean replication state\&. To aleviate this problem, you can issue a "RESET MASTER" command on the destination prior to executing the copy\&. +When copying data and including the GTID commands, you may encounter an error similar to "GTID_PURGED can only be set when GTID_EXECUTED is empty"\&. This occurs because the destination server is not in a clean replication state\&. To alleviate this problem, you can issue a "RESET MASTER" command on the destination prior to executing the copy\&. .PP Cloning databases that contain foreign key constraints does not change the constraint in the cloned table\&. For example, if table db1\&.t1 has a foreign key constraint on table db1\&.t2, when db1 is cloned to db2, table db2\&.t1 will have a foreign key constraint on db1\&.t2\&. .PP @@ -795,6 +811,21 @@ .RE .\} .sp +LIMITATIONS.PP +When copying tables with blob fields, the copy operation will fail for any table with a blob field that is defined as +\fBNOT NULL\fR\&. This is because the copy attempts to use a bulk insert technique to copy the data in two passes; one to copy the data without blob field data, and another to update the rows with the blob data\&. This has shown to be efficient for most use cases\&. +.PP +However, if one or more tables have blob fields defined as +\fBNOT NULL\fR, the two pass copy process will fail because the server will not permit inserting of null values for fields defined as +\fBNOT NULL\fR +on the first pass\&. Thus, the utility will check the tables in the copy for any blob fields defined as +\fBNOT NULL\fR\&. If any are found, an error is thrown and the copy aborted\&. +.PP +A workaround for this limitation is to alter the table(s) to remove the +\fBNOT NULL\fR +restriction on blob fields identified before the copy and restore the restriction after the copy\&. Similarly, any indexes that require +\fBNOT NULL\fR +on blob fields must be removed before the copy and recreated after the copy\&. PERMISSIONS REQUIRED.PP The user must have SELECT, SHOW VIEW, EVENT and TRIGGER privileges for the database(s) on the source server\&. On the destination server, the user must have the following privileges for the copied database(s): CREATE, ALTER, SELECT, INSERT, UPDATE, LOCK TABLES, DROP if \fB\-\-drop\-first\fR diff -Nru mysql-utilities-1.6.3/docs/man/mysqldbexport.1 mysql-utilities-1.6.4/docs/man/mysqldbexport.1 --- mysql-utilities-1.6.3/docs/man/mysqldbexport.1 2016-03-18 20:24:05.000000000 +0000 +++ mysql-utilities-1.6.4/docs/man/mysqldbexport.1 2016-08-01 16:07:02.000000000 +0000 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysqldbexport\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/18/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/01/2016 .\" Manual: MySQL Utilities .\" Source: MySQL 1.6.3 .\" Language: English .\" -.TH "\FBMYSQLDBEXPORT\FR" "1" "03/18/2016" "MySQL 1\&.6\&.3" "MySQL Utilities" +.TH "\FBMYSQLDBEXPORT\FR" "1" "08/01/2016" "MySQL 1\&.6\&.3" "MySQL Utilities" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,9 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysqldbexport -.\" utilities: mysqldbexport -.\" scripts .SH "NAME" mysqldbexport \- Export Object Definitions or Data from a Database .SH "SYNOPSIS" @@ -325,11 +322,11 @@ If you specify the \fB\-\-rpl\-file\fR option, the utility writes the replication statements to the file specified instead of including them in the export stream\&. -.PP +Exporting Data with GTIDs.PP If you attempt to export databases on a server with GTIDs enabled (GTID_MODE = ON), a warning will be generated if the export does not include all databases\&. This is because the GTID statements generated include the GTIDs for all databases and not only those databases in the export\&. .PP The utility will also generate a warning if you export databases on a GTID enabled server but use the -\fB\-\-skip\-gtid \fR +\fB\-\-skip\-gtid\fR option\&. .PP To make the most use of GTIDs and export/import, you should export all of the databases on the server with the @@ -444,11 +441,30 @@ \fBLIKE\fR matching\&. With the \fB\-\-regexp\fR -option, patterns use +option, all patterns specified use \fBREGEXP\fR matching\&. .sp This option does not apply to grants\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +The utility will attempt to determine if the pattern supplied has any special characters (such as an asterisks), which may indicate that the pattern could be a REGEXP pattern\&. If there are special, non\-SQL LIKE pattern characters and the user has not specified the +\fB\-\-regexp\fR +option, a warning is presented to suggest the user check the pattern for possible use with the +\fB\-\-regexp\fR +option\&. +.sp .5v +.RE .RE .sp .RS 4 @@ -461,14 +477,44 @@ .\} \-\-export=, \-e .sp -Specify the export format\&. Permitted format values are -\fBdefinitions\fR -= export only the definitions (metadata) for the objects in the database list, -\fBdata\fR -= export only the table data for the tables in the database list, and -\fBboth\fR -= export the definitions and the data\&. The default is +Specify the export format\&. Permitted format values include the following\&. The default is \fBdefinitions\fR\&. +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.B Table\ \&5.1.\ \&mysqldbexport Export Types +.TS +allbox tab(:); +lB lB. +T{ +Export Type +T}:T{ +Definition +T} +.T& +l l +l l +l l. +T{ +definitions (default) +T}:T{ +Only export the definitions (metadata) for the objects in the database + list +T} +T{ +data +T}:T{ +Only export the table data for the tables in the database list +T} +T{ +both +T}:T{ +Export both the definitions (metadata) and data +T} +.TE +.sp 1 .RE .sp .RS 4 @@ -481,7 +527,7 @@ .\} \-\-file\-per\-table .sp -Write table data to separate files\&. This is Valid only if the export output includes data (that is, if +Write table data to separate files\&. This is valid only if the export output includes data (that is, if \fB\-\-export=data\fR or \fB\-\-export=both\fR @@ -578,7 +624,7 @@ .\} \-\-output\-file .sp -Specify the path and file name to store the generated export output\&. By default the standard output is used (no file)\&. +Specify the path and filename to store the generated export output\&. By default the standard output is used (no file)\&. .RE .sp .RS 4 @@ -644,7 +690,7 @@ .\} \-\-rpl\-file=RPL_FILE, \-\-replication\-file=RPL_FILE .sp -The path and file name where the generated replication information should be written\&. Valid only with the +The path and filename where the generated replication information should be written\&. Valid only with the \fB\-\-rpl\fR option\&. .RE @@ -675,7 +721,7 @@ .sp Connection information for the server\&. .sp -To connect to a server, it is necessary to specify connection parameters such as user name, host name, password, and either a port or socket\&. MySQL Utilities provides a number of ways to supply this information\&. All of the methods require specifying your choice via a command\-line option such as \-\-server, \-\-master, \-\-slave, etc\&. The methods include the following in order of most secure to least secure\&. +To connect to a server, it is necessary to specify connection parameters such as the user name, host name, password, and either a port or socket\&. MySQL Utilities provides a number of ways to supply this information\&. All of the methods require specifying your choice via a command\-line option such as \-\-server, \-\-master, \-\-slave, etc\&. The methods include the following in order of most secure to least secure\&. .sp .RS 4 .ie n \{\ @@ -861,7 +907,7 @@ Display version information and exit\&. .RE NOTES.PP -You must provide connection parameters (user, host, password, and so forth) for an account that has the appropriate privileges to access all objects in the operation\&. +You must provide connection parameters (user, host, password, and so forth) for an account that has the appropriate privileges to access (e\&.g\&., SELECT) all objects in the operation\&. .PP To export all objects from a source database, the user must have these privileges: \fBSELECT\fR @@ -873,7 +919,7 @@ mysql database\&. .PP -Actual privileges needed may differ from installation to installation depending on the security privileges present and whether the database contains certain objects such as views or events\&. +Actual privileges needed may differ from installation to installation depending on the security privileges present and whether the database contains certain objects such as views, events, and stored routines\&. .PP Some combinations of the options may result in errors when the export is imported later\&. For example, eliminating tables but not views may result in an error when a view is imported on another server\&. .PP @@ -1123,7 +1169,7 @@ .\} .sp PERMISSIONS REQUIRED.PP -The user must have permission to read all databases\&. Since we are using the root account for these examples (and you typically would), permissions are not generally a problem\&. +The user account specified must have permission to read all databases listed including access to any objects that will be exported\&. For example, if the export includes stored routines, the user specified must be able to access and view stored routines\&. .SH "COPYRIGHT" .br .PP diff -Nru mysql-utilities-1.6.3/docs/man/mysqldbimport.1 mysql-utilities-1.6.4/docs/man/mysqldbimport.1 --- mysql-utilities-1.6.3/docs/man/mysqldbimport.1 2016-03-18 20:24:05.000000000 +0000 +++ mysql-utilities-1.6.4/docs/man/mysqldbimport.1 2016-08-01 16:07:02.000000000 +0000 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysqldbimport\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/18/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/01/2016 .\" Manual: MySQL Utilities .\" Source: MySQL 1.6.3 .\" Language: English .\" -.TH "\FBMYSQLDBIMPORT\FR" "1" "03/18/2016" "MySQL 1\&.6\&.3" "MySQL Utilities" +.TH "\FBMYSQLDBIMPORT\FR" "1" "08/01/2016" "MySQL 1\&.6\&.3" "MySQL Utilities" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,19 +27,18 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysqldbimport -.\" utilities: mysqldbimport -.\" scripts .SH "NAME" -mysqldbimport \- Import Object Definitions or Data into a Databases +mysqldbimport \- Import Object Definitions or Data into a Database .SH "SYNOPSIS" .HP \w'\fBmysqldbimport\ [\fR\fB\fIoptions\fR\fR\fB]\ \fR\fB\fIimport_file\fR\fR\fB\ \&.\&.\&.\fR\ 'u \fBmysqldbimport [\fR\fB\fIoptions\fR\fR\fB] \fR\fB\fIimport_file\fR\fR\fB \&.\&.\&.\fR .SH "DESCRIPTION" .PP -This utility imports metadata (object definitions) or data or both for one or more databases from one or more files\&. +This utility imports metadata (object definitions), data, or both for one or more databases from one or more files\&. .PP -If an object exists on the destination server with the same name as an imported object, it is dropped first before importing the new object\&. +If an object exists on the destination server with the same name as an imported object, it may be dropped first by using the +\fB\-\-drop\-first\fR +option\&. .PP To skip objects by type, use the \fB\-\-skip\fR @@ -164,6 +163,9 @@ \fB\-\-quiet\fR option\&. .PP +You must provide connection parameters (user, host, password, and so forth) for an account that has the appropriate privileges to access all objects in the operation\&. For details, see +NOTES\&. +Changing Storage Engines.PP By default, the utility creates each table on the destination server using the same storage engine as the original table\&. To override this and specify the storage engine to use for all tables created on the destination server, use the \fB\-\-new\-storage\-engine\fR option\&. If the destination server supports the new engine, all tables use that engine\&. @@ -183,10 +185,7 @@ or \fB\-\-default\-storage\-engine\fR option is given and the destination server does not support the specified storage engine, a warning is issued and the server\*(Aqs default storage engine setting is used instead\&. -.PP -You must provide connection parameters (user, host, password, and so forth) for an account that has the appropriate privileges to access all objects in the operation\&. For details, see -NOTES\&. -.PP +Importing Data with GTIDs.PP If you attempt to import databases on a server with GTIDs enabled (GTID_MODE = ON), a warning will be generated if the import file did not include the GTID statements generated by \fBmysqldbexport\fR\&. .PP @@ -341,7 +340,7 @@ .nr an-no-space-flag 1 .nr an-break-flag 1 .br -.B Table\ \&5.1.\ \&mysqldbimport Import Types +.B Table\ \&5.2.\ \&mysqldbimport Import Types .TS allbox tab(:); lB lB. @@ -463,7 +462,7 @@ .sp Connection information for the server\&. .sp -To connect to a server, it is necessary to specify connection parameters such as user name, host name, password, and either a port or socket\&. MySQL Utilities provides a number of ways to supply this information\&. All of the methods require specifying your choice via a command\-line option such as \-\-server, \-\-master, \-\-slave, etc\&. The methods include the following in order of most secure to least secure\&. +To connect to a server, it is necessary to specify connection parameters such as the user name, host name, password, and either a port or socket\&. MySQL Utilities provides a number of ways to supply this information\&. All of the methods require specifying your choice via a command\-line option such as \-\-server, \-\-master, \-\-slave, etc\&. The methods include the following in order of most secure to least secure\&. .sp .RS 4 .ie n \{\ @@ -753,7 +752,7 @@ .\} .sp PERMISSIONS REQUIRED.PP -You also need permissions to create the new data directory and write data to it\&. +You also need permissions to create the new data directory and write data to it including permissions to create all objects in the import stream such as views, events, and stored routines\&. Thus, actual permissions vary based on the contents of the import stream\&. .SH "COPYRIGHT" .br .PP diff -Nru mysql-utilities-1.6.3/docs/man/mysqldiff.1 mysql-utilities-1.6.4/docs/man/mysqldiff.1 --- mysql-utilities-1.6.3/docs/man/mysqldiff.1 2016-03-18 20:24:05.000000000 +0000 +++ mysql-utilities-1.6.4/docs/man/mysqldiff.1 2016-08-01 16:07:02.000000000 +0000 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysqldiff\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/18/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/01/2016 .\" Manual: MySQL Utilities .\" Source: MySQL 1.6.3 .\" Language: English .\" -.TH "\FBMYSQLDIFF\FR" "1" "03/18/2016" "MySQL 1\&.6\&.3" "MySQL Utilities" +.TH "\FBMYSQLDIFF\FR" "1" "08/01/2016" "MySQL 1\&.6\&.3" "MySQL Utilities" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,9 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysqldiff -.\" utilities: mysqldiff -.\" scripts .SH "NAME" mysqldiff \- Identify Differences Among Database Objects .SH "SYNOPSIS" @@ -55,7 +52,7 @@ \fIdb\&.obj\fR format\&. For example, use the db1\&.obj1:db2\&.obj2 -format to compare two named objects, or db1\&.obj1 to compare an object with the same name in databases with the same name\&. It is not legal to mix a database name with an object name\&. For example, +format to compare two named objects, or db1\&.obj1 to compare an object with the same name in databases with the same name\&. It is not permitted to mix a database name with an object name\&. For example, db1\&.obj1:db2 and db1:db2\&.obj2 @@ -326,7 +323,7 @@ .sp Connection information for the first server\&. .sp -To connect to a server, it is necessary to specify connection parameters such as user name, host name, password, and either a port or socket\&. MySQL Utilities provides a number of ways to supply this information\&. All of the methods require specifying your choice via a command\-line option such as \-\-server, \-\-master, \-\-slave, etc\&. The methods include the following in order of most secure to least secure\&. +To connect to a server, it is necessary to specify connection parameters such as the user name, host name, password, and either a port or socket\&. MySQL Utilities provides a number of ways to supply this information\&. All of the methods require specifying your choice via a command\-line option such as \-\-server, \-\-master, \-\-slave, etc\&. The methods include the following in order of most secure to least secure\&. .sp .RS 4 .ie n \{\ @@ -377,7 +374,7 @@ .sp Connection information for the second server\&. .sp -To connect to a server, it is necessary to specify connection parameters such as user name, host name, password, and either a port or socket\&. MySQL Utilities provides a number of ways to supply this information\&. All of the methods require specifying your choice via a command\-line option such as \-\-server, \-\-master, \-\-slave, etc\&. The methods include the following in order of most secure to least secure\&. +To connect to a server, it is necessary to specify connection parameters such as the user name, host name, password, and either a port or socket\&. MySQL Utilities provides a number of ways to supply this information\&. All of the methods require specifying your choice via a command\-line option such as \-\-server, \-\-master, \-\-slave, etc\&. The methods include the following in order of most secure to least secure\&. .sp .RS 4 .ie n \{\ @@ -557,9 +554,7 @@ .sp Change the display width of the test report\&. The default is 75 characters\&. .RE -NOTES.PP -You must provide connection parameters (user, host, password, and so forth) for an account that has the appropriate privileges to access all objects to be compared\&. -.PP +SQL TRANSFORMATION LIMITATIONS.PP The SQL transformation feature has these known limitations: .sp .RS 4 @@ -626,6 +621,8 @@ .\} SQL extensions specific to MySQL Cluster are not supported\&. .RE +NOTES.PP +You must provide connection parameters (user, host, password, and so forth) for an account that has the appropriate privileges to access all objects to be compared\&. .PP For the \fB\-\-difftype\fR diff -Nru mysql-utilities-1.6.3/docs/man/mysqldiskusage.1 mysql-utilities-1.6.4/docs/man/mysqldiskusage.1 --- mysql-utilities-1.6.3/docs/man/mysqldiskusage.1 2016-03-18 20:24:05.000000000 +0000 +++ mysql-utilities-1.6.4/docs/man/mysqldiskusage.1 2016-08-01 16:07:02.000000000 +0000 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysqldiskusage\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/18/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/01/2016 .\" Manual: MySQL Utilities .\" Source: MySQL 1.6.3 .\" Language: English .\" -.TH "\FBMYSQLDISKUSAGE\FR" "1" "03/18/2016" "MySQL 1\&.6\&.3" "MySQL Utilities" +.TH "\FBMYSQLDISKUSAGE\FR" "1" "08/01/2016" "MySQL 1\&.6\&.3" "MySQL Utilities" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,9 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysqldiskusage -.\" utilities: mysqldiskusage -.\" scripts .SH "NAME" mysqldiskusage \- Show Database Disk Usage .SH "SYNOPSIS" @@ -287,7 +284,7 @@ .sp Connection information for the server\&. .sp -To connect to a server, it is necessary to specify connection parameters such as user name, host name, password, and either a port or socket\&. MySQL Utilities provides a number of ways to supply this information\&. All of the methods require specifying your choice via a command\-line option such as \-\-server, \-\-master, \-\-slave, etc\&. The methods include the following in order of most secure to least secure\&. +To connect to a server, it is necessary to specify connection parameters such as the user name, host name, password, and either a port or socket\&. MySQL Utilities provides a number of ways to supply this information\&. All of the methods require specifying your choice via a command\-line option such as \-\-server, \-\-master, \-\-slave, etc\&. The methods include the following in order of most secure to least secure\&. .sp .RS 4 .ie n \{\ @@ -506,7 +503,7 @@ .\} .sp PERMISSIONS REQUIRED.PP -The user must have permissions to read the data directory or use an administrator or super user (sudo) account to obtain access to the data directory\&. +The user must have permissions to read the data directory or use an administrator, super user (sudo), or an account with elevated privileges to obtain access to the data directory\&. .SH "COPYRIGHT" .br .PP diff -Nru mysql-utilities-1.6.3/docs/man/mysqlfailover.1 mysql-utilities-1.6.4/docs/man/mysqlfailover.1 --- mysql-utilities-1.6.3/docs/man/mysqlfailover.1 2016-03-18 20:24:05.000000000 +0000 +++ mysql-utilities-1.6.4/docs/man/mysqlfailover.1 2016-08-01 16:07:02.000000000 +0000 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysqlfailover\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/18/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/01/2016 .\" Manual: MySQL Utilities .\" Source: MySQL 1.6.3 .\" Language: English .\" -.TH "\FBMYSQLFAILOVER\FR" "1" "03/18/2016" "MySQL 1\&.6\&.3" "MySQL Utilities" +.TH "\FBMYSQLFAILOVER\FR" "1" "08/01/2016" "MySQL 1\&.6\&.3" "MySQL Utilities" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,22 +27,19 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysqlfailover -.\" utilities: mysqlfailover -.\" scripts .SH "NAME" -mysqlfailover \- Automatic replication failover +mysqlfailover \- Automatic replication master failover .SH "SYNOPSIS" .HP \w'\fBmysqlfailover\ [\fR\fB\fIoptions\fR\fR\fB]\fR\ 'u \fBmysqlfailover [\fR\fB\fIoptions\fR\fR\fB]\fR .SH "DESCRIPTION" .PP -This utility permits users to perform replication health monitoring and automatic failover on a replication topology consisting of a master and its slaves\&. The utility is designed to run interactively or continuously refreshing the health information at periodic intervals\&. Its primary mission is to monitor the master for failure and when a failure occurs, execute failover to the best slave available\&. The utility accepts a list of slaves to be considered the candidate slave\&. +This utility permits users to perform replication health monitoring and automatic failover on a replication topology consisting of a single master and its slaves\&. The utility is designed to run interactively or continuously refreshing the health information and checking the master status at periodic intervals\&. Its primary mission is to monitor the master for failure and when a failure occurs, execute failover to one of the slaves that is in a valid state\&. The utility accepts an optional list of slaves to be considered for the candidate slave\&. .PP This utility is designed to work exclusively for servers that support global transaction identifiers (GTIDs) and have gtid_mode=ON\&. MySQL server versions 5\&.6\&.5 and higher support GTIDs\&. See \m[blue]\fBReplication with Global Transaction Identifiers\fR\m[]\&\s-2\u[1]\d\s+2 -for more information\&. +for more information\&. Thus, this utility will not work with anonymous replication servers (binary log + position)\&. .PP The user can specify the interval in seconds to use for detecting the master status and generating the health report using the \fB\-\-interval\fR @@ -63,9 +60,7 @@ .IP \(bu 2.3 .\} \fBauto\fR -(default): Execute automatic failover to the list of candidates first and if no slaves are viable, continue to locate a viable candidate from the list of slaves\&. If no slaves are found to be a viable candidate, the utility will generate and error and exit\&. -.sp -Once a candidate is found, the utility will conduct failover to the best slave\&. The command will test each candidate slave listed for the prerequisites\&. Once a candidate slave is elected, it is made a slave of each of the other slaves thereby collecting any transactions executed on other slaves but not the candidate\&. In this way, the candidate becomes the most up\-to\-date slave\&. +(default): Execute automatic failover to the list of candidates first and if no slaves are viable, continue to search the remaining slaves for a viable candidate\&. The command will test each candidate slave listed for the prerequisites\&. Once a candidate slave is elected, it is made a slave of each of the other slaves thereby collecting any transactions executed on other slaves but not the candidate\&. In this way, the candidate becomes the most up\-to\-date slave\&. If no slave is found to be a viable candidate, the utility will generate an error and exit\&. .RE .sp .RS 4 @@ -76,7 +71,9 @@ .sp -1 .IP \(bu 2.3 .\} -\fBelect\fR: This mode is the same as auto, except if no candidates specified in the list of candidate slaves are viable, then it does not check the remaining slaves, and instead generates an error and then exits\&. +\fBelect\fR: This mode is the same as auto, except if no candidates specified in the list of candidate slaves are viable, then it does not check the remaining slaves, and instead generates an error and then exits\&. Use this option to force failover to one or more specific slaves using the +\fB\-\-candidates\fR +option\&. .RE .sp .RS 4 @@ -87,7 +84,7 @@ .sp -1 .IP \(bu 2.3 .\} -\fBfail\fR: This mode produces an error and does not failover when the master is downed\&. This mode is used to provide periodic health monitoring without the failover action taken\&. +\fBfail\fR: This mode produces an error and does not failover when the master is detected as down or unreachable\&. This mode is used to provide periodic health monitoring without the failover action taken\&. .RE .PP For all options that permit specifying multiple servers, the options require a comma\-separated list of connection parameters in the following form (where the password, port, and socket are optional)\&.: @@ -103,15 +100,39 @@ .RE .\} .PP -The utility permits users to discover slaves connected to the master\&. In order to use the discover slaves feature, all slaves must use the \-\-report\-host and \-\-report\-port startup variables to specify the correct hostname and port of the slave\&. If these are missing or report the incorrect information, the slave\*(Aqs health may not be reported correctly or the slave may not be listed at all\&. The discover slaves feature ignores any slaves to which it cannot connect\&. +The utility permits users to discover slaves connected to the master\&. In order to use the discover slaves feature, all slaves +\fBmust\fR +use the +\fB\-\-report\-host\fR +and +\fB\-\-report\-port\fR +startup variables for the slave to specify the correct hostname and port of the slave\&. If these are missing or report the incorrect information, the slave\*(Aqs health may not be reported correctly or the slave may not be found and thus not listed in the health report\&. The discover slaves feature ignores any slaves to which it cannot connect\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +.PP +If you have one or more slaves which do not report their hostname and port and should a failover event occur, those slaves will not be included in the resulting topology\&. That is, they will not become a slave of the new master\&. Be sure to check that all of your slaves are accounted for in the health report before relying on the utility for complete automatic failover\&. +.sp .5v +.RE .PP The discover slaves feature is run automatically on each interval\&. .PP +Furthermore, it is required that slaves use the \-\-master\-info\-repository=TABLE startup setting\&. +.PP The utility permits the user to specify an external script to execute before and after the switchover and failover commands\&. The user can specify these with the \fB\-\-exec\-before\fR and \fB\-\-exec\-after\fR -options\&. The return code of the script is used to determine success thus each script must report 0 (success) to be considered successful\&. If a script returns a value other than 0, the result code is presented in an error message\&. +options\&. The return code of the script is used to determine success\&. Each script must report 0 (success) to be considered successful\&. If a script returns a value other than 0, the result code is presented in an error message\&. .PP The utility also permits the user to specify a script to be used for detecting a downed master or an application\-level event to trigger failover\&. This can be specified using the \fB\-\-exec\-fail\-check\fR @@ -119,7 +140,7 @@ .PP The utility permits the user to log all actions taken during the commands\&. The \fB\-\-log\fR -option requires a valid path and file name of the file to use for logging operations\&. The log is active only when this option is specified\&. The option +option requires a valid path and filename of the file to use for logging operations\&. The log is active only when this option is specified\&. The option \fB\-\-log\-age\fR specifies the age in days that log entries are kept\&. The default is seven (7) days\&. Older entries are automatically deleted from the log file (but only if the \fB\-\-log\fR @@ -202,7 +223,7 @@ Use the \fB\-\-verbose\fR option to see additional information in the health report and additional messages during failover\&. -.PP +MODES OF OPERATION.PP The utility supports two modes of operation\&. The default mode, running as a console, works as described above\&. An additional mode that permits you to run the utility as a daemon is provided for POSIX platforms\&. .PP When run as a daemon, the utility does not have interactivity\&. However, all events are written to the log file\&. You can control what is written to the log by using the @@ -314,7 +335,7 @@ .sp Connection information for candidate slave servers\&. Valid only with failover command\&. List multiple slaves in comma\-separated list\&. .sp -To connect to a server, it is necessary to specify connection parameters such as user name, host name, password, and either a port or socket\&. MySQL Utilities provides a number of ways to supply this information\&. All of the methods require specifying your choice via a command\-line option such as \-\-server, \-\-master, \-\-slave, etc\&. The methods include the following in order of most secure to least secure\&. +To connect to a server, it is necessary to specify connection parameters such as the user name, host name, password, and either a port or socket\&. MySQL Utilities provides a number of ways to supply this information\&. All of the methods require specifying your choice via a command\-line option such as \-\-server, \-\-master, \-\-slave, etc\&. The methods include the following in order of most secure to least secure\&. .sp .RS 4 .ie n \{\ @@ -361,6 +382,19 @@ .sp -1 .IP \(bu 2.3 .\} +\-\-connection\-timeout= +.sp +Set the connection timeout for TCP and Unix socket connections for all master, slaves, and candidate slaves specified\&. This changes the connection timeout for the Connector/Python connection to the server\&. The default is 10 seconds as defined in the Connector/Python library\&. This setting may be helpful for installations with low network and server reliability\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} \-\-daemon= .sp Run as a daemon\&. The @@ -518,7 +552,7 @@ .sp Connection information for the master server\&. .sp -To connect to a server, it is necessary to specify connection parameters such as user name, host name, password, and either a port or socket\&. MySQL Utilities provides a number of ways to supply this information\&. All of the methods require specifying your choice via a command\-line option such as \-\-server, \-\-master, \-\-slave, etc\&. The methods include the following in order of most secure to least secure\&. +To connect to a server, it is necessary to specify connection parameters such as the user name, host name, password, and either a port or socket\&. MySQL Utilities provides a number of ways to supply this information\&. All of the methods require specifying your choice via a command\-line option such as \-\-server, \-\-master, \-\-slave, etc\&. The methods include the following in order of most secure to least secure\&. .sp .RS 4 .ie n \{\ @@ -565,6 +599,36 @@ .sp -1 .IP \(bu 2.3 .\} +\-\-master\-fail\-retry= +.sp +Time in seconds to wait to determine if the master is down\&. The failover check will be run again when the retry delay expires\&. Can be used to introduce a longer period between when master is detected as unavailable to declaring it down\&. This option is not used with +\fB\-\-exec\-fail\-check\fR +option\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +This option was added in MySQL Utilities 1\&.6\&.4\&. +.sp .5v +.RE +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} \-\-max\-position= .sp Used to detect slave delay\&. The maximum difference between the master\*(Aqs log position and the slave\*(Aqs reported read position of the master\&. A value greater than this means the slave is too far behind the master\&. Default = 0\&. @@ -744,7 +808,7 @@ .sp Connection information for slave servers\&. List multiple slaves in comma\-separated list\&. The list will be evaluated literally whereby each server is considered a slave to the master listed regardless if they are a slave of the master\&. .sp -To connect to a server, it is necessary to specify connection parameters such as user name, host name, password, and either a port or socket\&. MySQL Utilities provides a number of ways to supply this information\&. All of the methods require specifying your choice via a command\-line option such as \-\-server, \-\-master, \-\-slave, etc\&. The methods include the following in order of most secure to least secure\&. +To connect to a server, it is necessary to specify connection parameters such as the user name, host name, password, and either a port or socket\&. MySQL Utilities provides a number of ways to supply this information\&. All of the methods require specifying your choice via a command\-line option such as \-\-server, \-\-master, \-\-slave, etc\&. The methods include the following in order of most secure to least secure\&. .sp .RS 4 .ie n \{\ @@ -902,10 +966,6 @@ \fBSELECT\fR privileges are required to register the failover instance on the initial master or the new master (after a successful failover)\&. Therefore, since any slave can become the new master, slaves and candidates also require those privileges\&. The utility checks permissions for the master, slaves, and candidates at startup\&. .PP -At startup, the console will attempt to register itself with the master\&. If another console is already registered, and the failover mode is auto or elect, the console will be blocked from running failover\&. When a console quits, it unregisters itself from the master\&. If this process is broken, the user may override the registration check by using the -\fB\-\-force\fR -option\&. -.PP Mixing IP and hostnames is not recommended\&. The replication\-specific utilities will attempt to compare hostnames and IP addresses as aliases for checking slave connectivity to the master\&. However, if your installation does not support reverse name lookup, the comparison could fail\&. Without the ability to do a reverse name lookup, the replication utilities could report a false negative that the slave is (not) connected to the master\&. .PP For example, if you setup replication using MASTER_HOST=ubuntu\&.net on the slave and later connect to the slave with mysqlrplcheck and have the master specified as \-\-master=192\&.168\&.0\&.6 using the valid IP address for ubuntu\&.net, you must have the ability to do a reverse name lookup to compare the IP (192\&.168\&.0\&.6) and the hostname (ubuntu\&.net) to determine if they are the same machine\&. @@ -916,6 +976,10 @@ .PP The path to the MySQL client tools should be included in the PATH environment variable in order to use the authentication mechanism with login\-paths\&. This will allow the utility to use the my_print_defaults tools which is required to read the login\-path values from the login configuration file (\&.mylogin\&.cnf)\&. .PP +At startup, the console will attempt to register itself with the master\&. If another console is already registered, and the failover mode is auto or elect, the console will be blocked from running failover\&. When a console quits, it unregisters itself from the master\&. If this process is broken, the user may override the registration check by using the +\fB\-\-force\fR +option\&. +.PP The console creates a special table in the mysql database that is used to keep track of which instance is communicating with the master\&. If you use the \fB\-\-force\fR option, the console will remove the rows in this table\&. The table is constructed with: @@ -960,7 +1024,7 @@ .nr an-no-space-flag 1 .nr an-break-flag 1 .br -.B Table\ \&5.2.\ \&External Script Parameters +.B Table\ \&5.3.\ \&External Script Parameters .TS allbox tab(:); lB lB. @@ -1230,6 +1294,12 @@ .RE .\} .sp +LIMITATIONS.PP +When the +\fB\-\-master\-fail\-retry\fR +option is used, and the value specified exceeds the value of the +\fB\-\-interval\fR +option, it is possible for an interval event to be delayed if the master retry check is still processing\&. In this case, should the master not be down, the next interval will occur immediately after the check of the master is complete\&. PERMISSIONS REQUIRED.PP The user must have permissions to monitor the servers on the topology and configure replication to successfully perform the failover operation\&. Additional permissions are also required to register and unregister the running mysqlfailover instance on the master and slaves\&. Specifically, the login user must have the following privileges: SUPER, GRANT OPTION, REPLICATION SLAVE, RELOAD, DROP, CREATE, INSERT, and SELECT\&. .PP diff -Nru mysql-utilities-1.6.3/docs/man/mysqlfrm.1 mysql-utilities-1.6.4/docs/man/mysqlfrm.1 --- mysql-utilities-1.6.3/docs/man/mysqlfrm.1 2016-03-18 20:24:05.000000000 +0000 +++ mysql-utilities-1.6.4/docs/man/mysqlfrm.1 2016-08-01 16:07:02.000000000 +0000 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysqlfrm\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/18/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/01/2016 .\" Manual: MySQL Utilities .\" Source: MySQL 1.6.3 .\" Language: English .\" -.TH "\FBMYSQLFRM\FR" "1" "03/18/2016" "MySQL 1\&.6\&.3" "MySQL Utilities" +.TH "\FBMYSQLFRM\FR" "1" "08/01/2016" "MySQL 1\&.6\&.3" "MySQL Utilities" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,9 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysqlfrm -.\" utilities: mysqlfrm -.\" scripts .SH "NAME" mysqlfrm \- File reader for \&.frm files .SH "SYNOPSIS" @@ -45,7 +42,6 @@ \fICREATE\fR statement is usable for recreating the table on another server, or for extended diagnostics\&. However, some features are not saved in the \&.frm files and therefore will be omitted\&. The exclusions include but are not limited to: .PP -.sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c @@ -90,7 +86,7 @@ .PP You can specify the database name to be used in the resulting \fICREATE\fR -statement by prepending the \&.frm file with the name of the database followed by a colon\&. For example, oltp:t1\&.frm will use \*(Aqoltp\*(Aq for the database name in the +statement by adding the name of the database followed by a colon to the \&.frm filename\&. For example, oltp:t1\&.frm will use \*(Aqoltp\*(Aq for the database name in the \fICREATE\fR statement\&. The optional database name can also be used with paths\&. For example, \fI /home/me/oltp:t1\&.frm\fR @@ -195,7 +191,7 @@ \fB\-\-basedir\fR for the default mode\&. If provided with the diagnostic mode, the storage engine and character set information will be validated against this server\&. .sp -To connect to a server, it is necessary to specify connection parameters such as user name, host name, password, and either a port or socket\&. MySQL Utilities provides a number of ways to supply this information\&. All of the methods require specifying your choice via a command\-line option such as \-\-server, \-\-master, \-\-slave, etc\&. The methods include the following in order of most secure to least secure\&. +To connect to a server, it is necessary to specify connection parameters such as the user name, host name, password, and either a port or socket\&. MySQL Utilities provides a number of ways to supply this information\&. All of the methods require specifying your choice via a command\-line option such as \-\-server, \-\-master, \-\-slave, etc\&. The methods include the following in order of most secure to least secure\&. .sp .RS 4 .ie n \{\ @@ -516,8 +512,22 @@ will vary and depend entirely on how you use it\&. If you use the utility to read \&.frm files in a protected folder like the example above (in either mode), you must have the ability to run the spawned server with privileges that allow you to read the protected files\&. For example, you could use a user account that has root\-level privileges\&. .PP If you use the utility with a server connection, the user you use to connect must have the ability to read system variables at a minimum including read access to the mysql database\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br .PP You should never use the root user to spawn the server nor should you use the mysql user when spawning the server or running the utility\&. +.sp .5v +.RE .SH "COPYRIGHT" .br .PP diff -Nru mysql-utilities-1.6.3/docs/man/mysqlgrants.1 mysql-utilities-1.6.4/docs/man/mysqlgrants.1 --- mysql-utilities-1.6.3/docs/man/mysqlgrants.1 2016-03-18 20:24:05.000000000 +0000 +++ mysql-utilities-1.6.4/docs/man/mysqlgrants.1 2016-08-01 16:07:02.000000000 +0000 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysqlgrants\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/18/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/01/2016 .\" Manual: MySQL Utilities .\" Source: MySQL 1.6.3 .\" Language: English .\" -.TH "\FBMYSQLGRANTS\FR" "1" "03/18/2016" "MySQL 1\&.6\&.3" "MySQL Utilities" +.TH "\FBMYSQLGRANTS\FR" "1" "08/01/2016" "MySQL 1\&.6\&.3" "MySQL Utilities" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,9 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysqlgrants -.\" utilities: mysqlgrants -.\" scripts .SH "NAME" mysqlgrants \- Display grants per object .SH "SYNOPSIS" @@ -37,7 +34,7 @@ \fBmysqlgrants [\fR\fB\fIoptions\fR\fR\fB]\fR .SH "DESCRIPTION" .PP -Managing privileges can be a challenge\&. Sometimes all a DBA needs to know is which users have access to a given list of objects such as a list of databases, tables, etc\&. This utility allows DBAs to see which users have what level of access for each object listed\&. Objects supported include databases, tables, functions and procedures\&. The utility follows the grant hierarchy within MySQL displaying global\- and object\-level access +Managing privileges can be a challenge\&. Sometimes all a DBA needs to know is which users have access to a given list of objects such as a list of databases, tables, etc\&. This utility allows DBAs to see which users have what level of access for each object listed\&. Objects supported include databases, tables, functions, and procedures\&. The utility follows the grant hierarchy within MySQL displaying global\- and object\-level access GRANT statements\&. .if n \{\ @@ -234,7 +231,7 @@ .sp Connection information for the server\&. .sp -To connect to a server, it is necessary to specify connection parameters such as user name, host name, password, and either a port or socket\&. MySQL Utilities provides a number of ways to supply this information\&. All of the methods require specifying your choice via a command\-line option such as \-\-server, \-\-master, \-\-slave, etc\&. The methods include the following in order of most secure to least secure\&. +To connect to a server, it is necessary to specify connection parameters such as the user name, host name, password, and either a port or socket\&. MySQL Utilities provides a number of ways to supply this information\&. All of the methods require specifying your choice via a command\-line option such as \-\-server, \-\-master, \-\-slave, etc\&. The methods include the following in order of most secure to least secure\&. .sp .RS 4 .ie n \{\ @@ -376,7 +373,9 @@ \fB\-\-privileges\fR option\&. .PP -If you specify some privileges on the \-\-privileges option that are not valid for all the specified objects, any that do not apply are not included in the list\&. For example, the +If you specify some privileges on the +\fB\-\-privileges\fR +option that are not valid for all the specified objects, any that do not apply are not included in the list\&. For example, the SELECT privilege will be ignored for stored routines and the EXECUTE diff -Nru mysql-utilities-1.6.3/docs/man/mysqlindexcheck.1 mysql-utilities-1.6.4/docs/man/mysqlindexcheck.1 --- mysql-utilities-1.6.3/docs/man/mysqlindexcheck.1 2016-03-18 20:24:05.000000000 +0000 +++ mysql-utilities-1.6.4/docs/man/mysqlindexcheck.1 2016-08-01 16:07:02.000000000 +0000 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysqlindexcheck\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/18/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/01/2016 .\" Manual: MySQL Utilities .\" Source: MySQL 1.6.3 .\" Language: English .\" -.TH "\FBMYSQLINDEXCHECK\F" "1" "03/18/2016" "MySQL 1\&.6\&.3" "MySQL Utilities" +.TH "\FBMYSQLINDEXCHECK\F" "1" "08/01/2016" "MySQL 1\&.6\&.3" "MySQL Utilities" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,9 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysqlindexcheck -.\" utilities: mysqlindexcheck -.\" scripts .SH "NAME" mysqlindexcheck \- Identify Potentially Redundant Table Indexes .SH "SYNOPSIS" @@ -333,7 +330,7 @@ .sp Connection information for the server\&. .sp -To connect to a server, it is necessary to specify connection parameters such as user name, host name, password, and either a port or socket\&. MySQL Utilities provides a number of ways to supply this information\&. All of the methods require specifying your choice via a command\-line option such as \-\-server, \-\-master, \-\-slave, etc\&. The methods include the following in order of most secure to least secure\&. +To connect to a server, it is necessary to specify connection parameters such as the user name, host name, password, and either a port or socket\&. MySQL Utilities provides a number of ways to supply this information\&. All of the methods require specifying your choice via a command\-line option such as \-\-server, \-\-master, \-\-slave, etc\&. The methods include the following in order of most secure to least secure\&. .sp .RS 4 .ie n \{\ diff -Nru mysql-utilities-1.6.3/docs/man/mysqlmetagrep.1 mysql-utilities-1.6.4/docs/man/mysqlmetagrep.1 --- mysql-utilities-1.6.3/docs/man/mysqlmetagrep.1 2016-03-18 20:24:05.000000000 +0000 +++ mysql-utilities-1.6.4/docs/man/mysqlmetagrep.1 2016-08-01 16:07:02.000000000 +0000 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysqlmetagrep\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/18/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/01/2016 .\" Manual: MySQL Utilities .\" Source: MySQL 1.6.3 .\" Language: English .\" -.TH "\FBMYSQLMETAGREP\FR" "1" "03/18/2016" "MySQL 1\&.6\&.3" "MySQL Utilities" +.TH "\FBMYSQLMETAGREP\FR" "1" "08/01/2016" "MySQL 1\&.6\&.3" "MySQL Utilities" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,9 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysqlmetagrep -.\" utilities: mysqlmetagrep -.\" scripts .SH "NAME" mysqlmetagrep \- Search Database Object Definitions .SH "SYNOPSIS" @@ -561,7 +558,7 @@ .sp Connection information for a server\&. Use this option multiple times to search multiple servers\&. .sp -To connect to a server, it is necessary to specify connection parameters such as user name, host name, password, and either a port or socket\&. MySQL Utilities provides a number of ways to supply this information\&. All of the methods require specifying your choice via a command\-line option such as \-\-server, \-\-master, \-\-slave, etc\&. The methods include the following in order of most secure to least secure\&. +To connect to a server, it is necessary to specify connection parameters such as the user name, host name, password, and either a port or socket\&. MySQL Utilities provides a number of ways to supply this information\&. All of the methods require specifying your choice via a command\-line option such as \-\-server, \-\-master, \-\-slave, etc\&. The methods include the following in order of most secure to least secure\&. .sp .RS 4 .ie n \{\ diff -Nru mysql-utilities-1.6.3/docs/man/mysqlprocgrep.1 mysql-utilities-1.6.4/docs/man/mysqlprocgrep.1 --- mysql-utilities-1.6.3/docs/man/mysqlprocgrep.1 2016-03-18 20:24:05.000000000 +0000 +++ mysql-utilities-1.6.4/docs/man/mysqlprocgrep.1 2016-08-01 16:07:02.000000000 +0000 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysqlprocgrep\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/18/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/01/2016 .\" Manual: MySQL Utilities .\" Source: MySQL 1.6.3 .\" Language: English .\" -.TH "\FBMYSQLPROCGREP\FR" "1" "03/18/2016" "MySQL 1\&.6\&.3" "MySQL Utilities" +.TH "\FBMYSQLPROCGREP\FR" "1" "08/01/2016" "MySQL 1\&.6\&.3" "MySQL Utilities" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,9 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysqlprocgrep -.\" utilities: mysqlprocgrep -.\" scripts .SH "NAME" mysqlprocgrep \- Search Server Process Lists .SH "SYNOPSIS" @@ -427,7 +424,7 @@ .sp Connection information for a server\&. Use this option multiple times to search multiple servers\&. .sp -To connect to a server, it is necessary to specify connection parameters such as user name, host name, password, and either a port or socket\&. MySQL Utilities provides a number of ways to supply this information\&. All of the methods require specifying your choice via a command\-line option such as \-\-server, \-\-master, \-\-slave, etc\&. The methods include the following in order of most secure to least secure\&. +To connect to a server, it is necessary to specify connection parameters such as the user name, host name, password, and either a port or socket\&. MySQL Utilities provides a number of ways to supply this information\&. All of the methods require specifying your choice via a command\-line option such as \-\-server, \-\-master, \-\-slave, etc\&. The methods include the following in order of most secure to least secure\&. .sp .RS 4 .ie n \{\ diff -Nru mysql-utilities-1.6.3/docs/man/mysqlreplicate.1 mysql-utilities-1.6.4/docs/man/mysqlreplicate.1 --- mysql-utilities-1.6.3/docs/man/mysqlreplicate.1 2016-03-18 20:24:05.000000000 +0000 +++ mysql-utilities-1.6.4/docs/man/mysqlreplicate.1 2016-08-01 16:07:02.000000000 +0000 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysqlreplicate\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/18/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/01/2016 .\" Manual: MySQL Utilities .\" Source: MySQL 1.6.3 .\" Language: English .\" -.TH "\FBMYSQLREPLICATE\FR" "1" "03/18/2016" "MySQL 1\&.6\&.3" "MySQL Utilities" +.TH "\FBMYSQLREPLICATE\FR" "1" "08/01/2016" "MySQL 1\&.6\&.3" "MySQL Utilities" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,9 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysqlreplicate -.\" utilities: mysqlreplicate -.\" scripts .SH "NAME" mysqlreplicate \- Set Up and Start Replication Between Two Servers .SH "SYNOPSIS" @@ -37,9 +34,9 @@ \fBmysqlreplicate [\fR\fB\fIoptions\fR\fR\fB]\fR .SH "DESCRIPTION" .PP -This utility permits an administrator to start replication from one server (the master) to another (the slave)\&. The user provides login information for the slave and connection information for connecting to the master\&. It is also possible to specify a database to be used to test replication\&. +This utility permits an administrator to setup and start replication from one server (the master) to another (the slave)\&. The user provides login information for the slave and connection information for connecting to the master\&. It is also possible to specify a database to be used to test replication\&. .PP -The utility reports conditions where the storage engines on the master and the slave differ\&. It also reports a warning if the InnoDB storage engine differs on the master and slave\&. For InnoDB to be the same, both servers must be running the same "type" of InnoDB (built\-in or the InnoDB Plugin), and InnoDB on both servers must have the same major and minor version numbers and enabled state\&. +The utility reports conditions where the storage engines on the master and the slave differ for older versions of the server\&. It also reports a warning if the InnoDB storage engine type (plugin verus built\-in) differs on the master and slave\&. For InnoDB to be the same, both servers must be running the same "type" of InnoDB (built\-in or the InnoDB Plugin), and InnoDB on both servers must have the same major and minor version numbers and enabled state\&. .PP By default, the utility issues warnings for mismatches between the sets of storage engines, the default storage engine, and the InnoDB storage engine\&. To produce errors instead, use the \fB\-\-pedantic\fR @@ -156,7 +153,7 @@ .sp Connection information for the master server\&. .sp -To connect to a server, it is necessary to specify connection parameters such as user name, host name, password, and either a port or socket\&. MySQL Utilities provides a number of ways to supply this information\&. All of the methods require specifying your choice via a command\-line option such as \-\-server, \-\-master, \-\-slave, etc\&. The methods include the following in order of most secure to least secure\&. +To connect to a server, it is necessary to specify connection parameters such as the user name, host name, password, and either a port or socket\&. MySQL Utilities provides a number of ways to supply this information\&. All of the methods require specifying your choice via a command\-line option such as \-\-server, \-\-master, \-\-slave, etc\&. The methods include the following in order of most secure to least secure\&. .sp .RS 4 .ie n \{\ @@ -294,7 +291,7 @@ .sp Connection information for the slave server\&. .sp -To connect to a server, it is necessary to specify connection parameters such as user name, host name, password, and either a port or socket\&. MySQL Utilities provides a number of ways to supply this information\&. All of the methods require specifying your choice via a command\-line option such as \-\-server, \-\-master, \-\-slave, etc\&. The methods include the following in order of most secure to least secure\&. +To connect to a server, it is necessary to specify connection parameters such as the user name, host name, password, and either a port or socket\&. MySQL Utilities provides a number of ways to supply this information\&. All of the methods require specifying your choice via a command\-line option such as \-\-server, \-\-master, \-\-slave, etc\&. The methods include the following in order of most secure to least secure\&. .sp .RS 4 .ie n \{\ diff -Nru mysql-utilities-1.6.3/docs/man/mysqlrpladmin.1 mysql-utilities-1.6.4/docs/man/mysqlrpladmin.1 --- mysql-utilities-1.6.3/docs/man/mysqlrpladmin.1 2016-03-18 20:24:05.000000000 +0000 +++ mysql-utilities-1.6.4/docs/man/mysqlrpladmin.1 2016-08-01 16:07:02.000000000 +0000 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysqlrpladmin\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/18/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/01/2016 .\" Manual: MySQL Utilities .\" Source: MySQL 1.6.3 .\" Language: English .\" -.TH "\FBMYSQLRPLADMIN\FR" "1" "03/18/2016" "MySQL 1\&.6\&.3" "MySQL Utilities" +.TH "\FBMYSQLRPLADMIN\FR" "1" "08/01/2016" "MySQL 1\&.6\&.3" "MySQL Utilities" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,26 +27,118 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysqlrpladmin -.\" utilities: mysqlrpladmin -.\" scripts .SH "NAME" -mysqlrpladmin \- Administration utility for MySQL replication +mysqlrpladmin \- Administration Utility for MySQL replication .SH "SYNOPSIS" .HP \w'\fBmysqlrpladmin\ [\fR\fB\fIoptions\fR\fR\fB]\fR\ 'u \fBmysqlrpladmin [\fR\fB\fIoptions\fR\fR\fB]\fR .SH "DESCRIPTION" .PP -This utility permits users to perform administrative actions on a replication topology consisting of a master and its slaves\&. The utility is designed to make it easy to recover from planned maintenance of the master, or from an event that takes the master offline unexpectedly\&. +This utility permits users to perform administrative actions on a replication topology consisting of a single master and its slaves\&. The utility is designed to make it easy to recover from planned maintenance of the master, or from an event that takes the master offline unexpectedly\&. .PP The act of taking the master offline intentionally and switching control to another slave is called switchover\&. In this case, there is no loss of transactions as the master is locked and all slaves are allowed to catch up to the master\&. Once the slaves have read all events from the master, the master is shutdown and control switched to a slave (in this case called a candidate slave)\&. .PP -Recovering from the loss of a downed master is more traumatic and since there is no way to know what transactions the master may have failed to send, the new master (called a candidate slave) must be the slave that is most up\-to\-date\&. How this is determined depends on the version of the server (see below)\&. However, it can result in the loss of some transactions that were executed on the downed master but not sent\&. The utility accepts a list of slaves to be considered the candidate slave\&. If no slave is found to meet the requirements, the operation will search the list of known slaves\&. +Recovering from the loss of a downed master is more traumatic and since there is no way to know what transactions the master may have failed to send, the new master (called a candidate slave) must be the slave that is most up\-to\-date\&. How this is determined depends on the version of the server (see below)\&. However, it can result in the loss of some transactions that were executed on the downed master but not sent to the slaves\&. .PP +The utility accepts a list of slaves to be considered the candidate slave\&. If no slave is found to meet the requirements, the operation will search the list of known slaves\&. +.PP +Detection of a downed master is performed as follows\&. If the connection to the master is lost, wait +\fB\-\-ping\fR +seconds and check again\&. If the master connection is lost and the master cannot be pinged or reconnected, the failover event occurs\&. +.PP +For all commands that require specifying multiple servers, the options require a comma\-separated list of connection parameters in the following form (where the password, port, and socket are optional)\&.: +.sp +.if n \{\ +.RS 4 +.\} +.nf +<*user*>[:<*passwd*>]@<*host*>[:<*port*>][:<*socket*>] or +<*login\-path*>[:<*port*>][:<*socket*>] +.fi +.if n \{\ +.RE +.\} +.PP +The utility permits users to discover slaves connected to the master\&. In order to use the discover slaves feature, all slaves must use the +\fB\-\-report\-host\fR +and +\fB\-\-report\-port\fR +startup variables to specify the correct hostname and ip port of the slave\&. If these are missing or report the incorrect information, the slaves health may not be reported correctly or the slave may not be listed at all\&. The \*(Aqdiscover slaves\*(Aq feature ignores any slaves it cannot connect to, or if the IO thread stopped (it is not connected to the master)\&. +.PP +The utility permits the user to demote a master to a slave during the switchover operation\&. The +\fB\-\-demote\-master\fR +option tells the utility to, once the new master is established, make the old master a slave of the new master\&. This permits rotation of the master role among a set of servers\&. +.PP +The utility permits the user to specify an external script to execute before and after the switchover and failover commands\&. The user can specify these with the +\fB\-\-exec\-before\fR +and +\fB\-\-exec\-after\fR +options\&. The return code of the script is used to determine success thus each script must report 0 (success) to be considered successful\&. If a script returns a value other than 0, the result code is presented in an error message\&. +.PP +The utility permits the user to log all actions taken during the commands\&. The +\fB\-\-log\fR +option requires a valid path and filename of the file to use for logging operations\&. The log is active only when this option is specified\&. The option +\fB\-\-log\-age\fR +specifies the age in days that log entries are kept\&. The default is seven (7) days\&. Older entries are automatically deleted from the log file (but only if the +\fB\-\-log\fR +option is specified)\&. +.PP +The format of the log file includes the date and time of the event, the level of the event (informational \- INFO, warning \- WARN, error \- ERROR, critical failure \- CRITICAL), and the message reported by the utility\&. +.PP +The utility has a number of options each explained in more detail below\&. Some of the options are specific to certain commands\&. Warning messages are issued whenever an option is used that does not apply to the command requested\&. A brief overview of each command and its options is presented in the following paragraphs\&. +.PP +The start, stop, and reset commands require the +\fB\-\-slaves\fR +option to list all of the slaves in the topology\&. Optionally, the +\fB\-\-master\fR +option can be specified for the utility to check if the specified slaves are associated to the given master before executing the command, making sure that the command is only applied to slaves connected to the right replication master\&. +.PP +The options required for the elect, health and gtid commands include the +\fB\-\-master\fR +option to specify the existing master, and either the +\fB\-\-slaves\fR +option to list all of the slaves in the topology or the +\fB\-\-discover\-slaves\-login\fR +option to provide the user name and password to discover any slaves in the topology that are registered and connected to the master\&. +.PP +The options required for switchover include the +\fB\-\-master\fR +option to specify the existing master, the +\fB\-\-new\-master\fR +option to specify the candidate slave (the slave to become the new master), and either the +\fB\-\-slaves\fR +option to list the considered slaves in the topology or the +\fB\-\-discover\-slaves\-login\fR +option to provide the user name and password to discover any slaves in the topology that are registered and connected to the master\&. +.PP +The failover command requires only the +\fB\-\-slaves\fR +option to explicitly list all of the slaves in the topology because it is expected that the master is down when this command is used\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +.PP +The option to pass in \-\-slaves without also passing in \-\-master was added in MySQL Utilities 1\&.6\&.0\&. +.sp .5v +.RE +.PP +Use the +\fB\-\-verbose\fR +option to see additional information in the health report and additional messages during switchover or failover\&. +COMMANDS.PP The utility also provides a number of useful commands for managing a replication topology including the following\&. .PP \fBelect\fR -This command is available to only those servers supporting global transaction identifiers (GTIDs), perform best slave election and report best slave to use in the event a switchover or failover is required\&. Best slave election is simply the first slave to meet the prerequisites\&. GTIDs are supported in version 5\&.6\&.5 and higher\&. This command requires the options +This command is available to only those servers supporting global transaction identifiers (GTIDs), perform slave election and report the candidate slave to use in the event a switchover or failover is required\&. Slave election is simply the first slave to meet the prerequisites\&. GTIDs are supported in version 5\&.6\&.5 and higher\&. This command requires the options \fB\-\-master\fR and either \fB\-\-slaves\fR @@ -197,99 +289,6 @@ and \fB\-\-discover\-slaves\-login\fR .RE -.PP -Detection of a downed master is performed as follows\&. If the connection to the master is lost, wait -\fB\-\-ping\fR -seconds and check again\&. If the master connection is lost and the master cannot be pinged or reconnected, the failover event occurs\&. -.PP -For all commands that require specifying multiple servers, the options require a comma\-separated list of connection parameters in the following form (where the password, port, and socket are optional)\&.: -.sp -.if n \{\ -.RS 4 -.\} -.nf -<*user*>[:<*passwd*>]@<*host*>[:<*port*>][:<*socket*>] or -<*login\-path*>[:<*port*>][:<*socket*>] -.fi -.if n \{\ -.RE -.\} -.PP -The utility permits users to discover slaves connected to the master\&. In order to use the discover slaves feature, all slaves must use the -\fB\-\-report\-host\fR -and -\fB\-\-report\-port\fR -startup variables to specify the correct hostname and ip port of the slave\&. If these are missing or report the incorrect information, the slaves health may not be reported correctly or the slave may not be listed at all\&. The \*(Aqdiscover slaves\*(Aq feature ignores any slaves it cannot connect to, or if the IO thread stopped (it is not connected to the master)\&. -.PP -The utility permits the user to demote a master to a slave during the switchover operation\&. The -\fB\-\-demote\-master\fR -option tells the utility to, once the new master is established, make the old master a slave of the new master\&. This permits rotation of the master role among a set of servers\&. -.PP -The utility permits the user to specify an external script to execute before and after the switchover and failover commands\&. The user can specify these with the -\fB\-\-exec\-before\fR -and -\fB\-\-exec\-after\fR -options\&. The return code of the script is used to determine success thus each script must report 0 (success) to be considered successful\&. If a script returns a value other than 0, the result code is presented in an error message\&. -.PP -The utility permits the user to log all actions taken during the commands\&. The -\fB\-\-log\fR -option requires a valid path and file name of the file to use for logging operations\&. The log is active only when this option is specified\&. The option -\fB\-\-log\-age\fR -specifies the age in days that log entries are kept\&. The default is seven (7) days\&. Older entries are automatically deleted from the log file (but only if the -\fB\-\-log\fR -option is specified)\&. -.PP -The format of the log file includes the date and time of the event, the level of the event (informational \- INFO, warning \- WARN, error \- ERROR, critical failure \- CRITICAL), and the message reported by the utility\&. -.PP -The utility has a number of options each explained in more detail below\&. Some of the options are specific to certain commands\&. Warning messages are issued whenever an option is used that does not apply to the command requested\&. A brief overview of each command and its options is presented in the following paragraphs\&. -.PP -The start, stop, and reset commands require the -\fB\-\-slaves\fR -option to list all of the slaves in the topology\&. Optionally, the -\fB\-\-master\fR -option can be specified for the utility to check if the specified slaves are associated to the given master before executing the command, making sure that the command is only applied to slaves connected to the right replication master\&. -.PP -The options required for the elect, health and gtid commands include the -\fB\-\-master\fR -option to specify the existing master, and either the -\fB\-\-slaves\fR -option to list all of the slaves in the topology or the -\fB\-\-discover\-slaves\-login\fR -option to provide the user name and password to discover any slaves in the topology that are registered and connected to the master\&. -.PP -The options required for switchover include the -\fB\-\-master\fR -option to specify the existing master, the -\fB\-\-new\-master\fR -option to specify the candidate slave (the slave to become the new master), and either the -\fB\-\-slaves\fR -option to list the considered slaves in the topology or the -\fB\-\-discover\-slaves\-login\fR -option to provide the user name and password to discover any slaves in the topology that are registered and connected to the master\&. -.PP -The failover command requires only the -\fB\-\-slaves\fR -option to explicitly list all of the slaves in the topology because it is expected that the master is down when this command is used\&. -.if n \{\ -.sp -.\} -.RS 4 -.it 1 an-trap -.nr an-no-space-flag 1 -.nr an-break-flag 1 -.br -.ps +1 -\fBNote\fR -.ps -1 -.br -.PP -The option to pass in \-\-slaves without also passing in \-\-master was added in MySQL Utilities 1\&.6\&.0\&. -.sp .5v -.RE -.PP -Use the -\fB\-\-verbose\fR -option to see additional information in the health report and additional messages during switchover or failover\&. OPTIONS.PP \fBmysqlrpladmin\fR accepts the following command\-line options: @@ -332,7 +331,7 @@ .sp Connection information for candidate slave servers for failover\&. Valid only with failover command\&. List multiple slaves in comma\-separated list\&. .sp -To connect to a server, it is necessary to specify connection parameters such as user name, host name, password, and either a port or socket\&. MySQL Utilities provides a number of ways to supply this information\&. All of the methods require specifying your choice via a command\-line option such as \-\-server, \-\-master, \-\-slave, etc\&. The methods include the following in order of most secure to least secure\&. +To connect to a server, it is necessary to specify connection parameters such as the user name, host name, password, and either a port or socket\&. MySQL Utilities provides a number of ways to supply this information\&. All of the methods require specifying your choice via a command\-line option such as \-\-server, \-\-master, \-\-slave, etc\&. The methods include the following in order of most secure to least secure\&. .sp .RS 4 .ie n \{\ @@ -491,7 +490,7 @@ .sp Connection information for the master server\&. .sp -To connect to a server, it is necessary to specify connection parameters such as user name, host name, password, and either a port or socket\&. MySQL Utilities provides a number of ways to supply this information\&. All of the methods require specifying your choice via a command\-line option such as \-\-server, \-\-master, \-\-slave, etc\&. The methods include the following in order of most secure to least secure\&. +To connect to a server, it is necessary to specify connection parameters such as the user name, host name, password, and either a port or socket\&. MySQL Utilities provides a number of ways to supply this information\&. All of the methods require specifying your choice via a command\-line option such as \-\-server, \-\-master, \-\-slave, etc\&. The methods include the following in order of most secure to least secure\&. .sp .RS 4 .ie n \{\ @@ -555,7 +554,7 @@ .sp Connection information for the slave to be used to replace the master for switchover\&. Valid only with switchover command\&. .sp -To connect to a server, it is necessary to specify connection parameters such as user name, host name, password, and either a port or socket\&. MySQL Utilities provides a number of ways to supply this information\&. All of the methods require specifying your choice via a command\-line option such as \-\-server, \-\-master, \-\-slave, etc\&. The methods include the following in order of most secure to least secure\&. +To connect to a server, it is necessary to specify connection parameters such as the user name, host name, password, and either a port or socket\&. MySQL Utilities provides a number of ways to supply this information\&. All of the methods require specifying your choice via a command\-line option such as \-\-server, \-\-master, \-\-slave, etc\&. The methods include the following in order of most secure to least secure\&. .sp .RS 4 .ie n \{\ @@ -690,7 +689,7 @@ .sp Connection information for slave servers\&. List multiple slaves in comma\-separated list\&. The list will be evaluated literally whereby each server is considered a slave to the master listed regardless if they are a slave of the master\&. .sp -To connect to a server, it is necessary to specify connection parameters such as user name, host name, password, and either a port or socket\&. MySQL Utilities provides a number of ways to supply this information\&. All of the methods require specifying your choice via a command\-line option such as \-\-server, \-\-master, \-\-slave, etc\&. The methods include the following in order of most secure to least secure\&. +To connect to a server, it is necessary to specify connection parameters such as the user name, host name, password, and either a port or socket\&. MySQL Utilities provides a number of ways to supply this information\&. All of the methods require specifying your choice via a command\-line option such as \-\-server, \-\-master, \-\-slave, etc\&. The methods include the following in order of most secure to least secure\&. .sp .RS 4 .ie n \{\ diff -Nru mysql-utilities-1.6.3/docs/man/mysqlrplcheck.1 mysql-utilities-1.6.4/docs/man/mysqlrplcheck.1 --- mysql-utilities-1.6.3/docs/man/mysqlrplcheck.1 2016-03-18 20:24:05.000000000 +0000 +++ mysql-utilities-1.6.4/docs/man/mysqlrplcheck.1 2016-08-01 16:07:02.000000000 +0000 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysqlrplcheck\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/18/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/01/2016 .\" Manual: MySQL Utilities .\" Source: MySQL 1.6.3 .\" Language: English .\" -.TH "\FBMYSQLRPLCHECK\FR" "1" "03/18/2016" "MySQL 1\&.6\&.3" "MySQL Utilities" +.TH "\FBMYSQLRPLCHECK\FR" "1" "08/01/2016" "MySQL 1\&.6\&.3" "MySQL Utilities" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,11 +27,8 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysqlrplcheck -.\" utilities: mysqlrplcheck -.\" scripts .SH "NAME" -mysqlrplcheck \- Check Replication Prerequisitiess +mysqlrplcheck \- Check Replication Prerequisites .SH "SYNOPSIS" .HP \w'\fBmysqlrplcheck\ [\fR\fB\fIoptions\fR\fR\fB]\fR\ 'u \fBmysqlrplcheck [\fR\fB\fIoptions\fR\fR\fB]\fR @@ -218,7 +215,7 @@ .sp Connection information for the master server\&. .sp -To connect to a server, it is necessary to specify connection parameters such as user name, host name, password, and either a port or socket\&. MySQL Utilities provides a number of ways to supply this information\&. All of the methods require specifying your choice via a command\-line option such as \-\-server, \-\-master, \-\-slave, etc\&. The methods include the following in order of most secure to least secure\&. +To connect to a server, it is necessary to specify connection parameters such as the user name, host name, password, and either a port or socket\&. MySQL Utilities provides a number of ways to supply this information\&. All of the methods require specifying your choice via a command\-line option such as \-\-server, \-\-master, \-\-slave, etc\&. The methods include the following in order of most secure to least secure\&. .sp .RS 4 .ie n \{\ @@ -312,7 +309,7 @@ .sp Connection information for the slave server\&. .sp -To connect to a server, it is necessary to specify connection parameters such as user name, host name, password, and either a port or socket\&. MySQL Utilities provides a number of ways to supply this information\&. All of the methods require specifying your choice via a command\-line option such as \-\-server, \-\-master, \-\-slave, etc\&. The methods include the following in order of most secure to least secure\&. +To connect to a server, it is necessary to specify connection parameters such as the user name, host name, password, and either a port or socket\&. MySQL Utilities provides a number of ways to supply this information\&. All of the methods require specifying your choice via a command\-line option such as \-\-server, \-\-master, \-\-slave, etc\&. The methods include the following in order of most secure to least secure\&. .sp .RS 4 .ie n \{\ diff -Nru mysql-utilities-1.6.3/docs/man/mysqlrplms.1 mysql-utilities-1.6.4/docs/man/mysqlrplms.1 --- mysql-utilities-1.6.3/docs/man/mysqlrplms.1 2016-03-18 20:24:05.000000000 +0000 +++ mysql-utilities-1.6.4/docs/man/mysqlrplms.1 2016-08-01 16:07:02.000000000 +0000 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysqlrplms\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/18/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/01/2016 .\" Manual: MySQL Utilities .\" Source: MySQL 1.6.3 .\" Language: English .\" -.TH "\FBMYSQLRPLMS\FR" "1" "03/18/2016" "MySQL 1\&.6\&.3" "MySQL Utilities" +.TH "\FBMYSQLRPLMS\FR" "1" "08/01/2016" "MySQL 1\&.6\&.3" "MySQL Utilities" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,21 +27,16 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysqlrplms -.\" utilities: mysqlrplms -.\" scripts .SH "NAME" -mysqlrplms \- Set Up and Start Replication Among a Slave and Multiple Masters +mysqlrplms \- Set Up and Start Replication from a Slave to Multiple Masters .SH "SYNOPSIS" .HP \w'\fBmysqlrplms\ [\fR\fB\fIoptions\fR\fR\fB]\fR\ 'u \fBmysqlrplms [\fR\fB\fIoptions\fR\fR\fB]\fR .SH "DESCRIPTION" .PP -This utility permits a user to start replication from multiple master servers (also called sources) to a single slave\&. The user provides login information for the slave and each of the masters\&. +This utility permits a user to start replication from multiple master servers (also called multi\-source replication) to a single slave\&. The user provides login information for the slave and each of the masters\&. .PP -The utility reports conditions where the storage engines on the masters and the slave differ\&. It also reports a warning if the InnoDB storage engine differs on the master and slave\&. For InnoDB to be the same, both servers must be running the same "type" of InnoDB (built\-in or the InnoDB Plugin), and InnoDB on both servers must have the same major and minor version numbers and enabled state\&. -.PP -By default, the utility issues warnings for mismatches between the sets of storage engines, the default storage engine, and the InnoDB storage engine\&. +The utility reports conditions where the storage engines on the masters and the slave differ\&. It also reports a warning if the InnoDB storage engine differs on the master and slave\&. For InnoDB to be the same, both servers must be running the same "type" of InnoDB (built\-in or the InnoDB Plugin), and InnoDB on both servers must have the same major and minor version numbers and enabled state\&. By default, the utility issues warnings for mismatches between the sets of storage engines, the default storage engine, and the InnoDB storage engine\&. .PP The \fB\-vv\fR @@ -59,7 +54,7 @@ .sp -1 .IP \(bu 2.3 .\} -All servers have GTIDs enabled\&. +All servers must have GTIDs enabled\&. .RE .sp .RS 4 @@ -200,7 +195,7 @@ .sp Connection information for master servers\&. List multiple masters in comma\-separated list\&. .sp -To connect to a server, it is necessary to specify connection parameters such as user name, host name, password, and either a port or socket\&. MySQL Utilities provides a number of ways to supply this information\&. All of the methods require specifying your choice via a command\-line option such as \-\-server, \-\-master, \-\-slave, etc\&. The methods include the following in order of most secure to least secure\&. +To connect to a server, it is necessary to specify connection parameters such as the user name, host name, password, and either a port or socket\&. MySQL Utilities provides a number of ways to supply this information\&. All of the methods require specifying your choice via a command\-line option such as \-\-server, \-\-master, \-\-slave, etc\&. The methods include the following in order of most secure to least secure\&. .sp .RS 4 .ie n \{\ @@ -322,7 +317,7 @@ .sp Connection information for the slave server\&. .sp -To connect to a server, it is necessary to specify connection parameters such as user name, host name, password, and either a port or socket\&. MySQL Utilities provides a number of ways to supply this information\&. All of the methods require specifying your choice via a command\-line option such as \-\-server, \-\-master, \-\-slave, etc\&. The methods include the following in order of most secure to least secure\&. +To connect to a server, it is necessary to specify connection parameters such as the user name, host name, password, and either a port or socket\&. MySQL Utilities provides a number of ways to supply this information\&. All of the methods require specifying your choice via a command\-line option such as \-\-server, \-\-master, \-\-slave, etc\&. The methods include the following in order of most secure to least secure\&. .sp .RS 4 .ie n \{\ diff -Nru mysql-utilities-1.6.3/docs/man/mysqlrplshow.1 mysql-utilities-1.6.4/docs/man/mysqlrplshow.1 --- mysql-utilities-1.6.3/docs/man/mysqlrplshow.1 2016-03-18 20:24:05.000000000 +0000 +++ mysql-utilities-1.6.4/docs/man/mysqlrplshow.1 2016-08-01 16:07:02.000000000 +0000 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysqlrplshow\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/18/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/01/2016 .\" Manual: MySQL Utilities .\" Source: MySQL 1.6.3 .\" Language: English .\" -.TH "\FBMYSQLRPLSHOW\FR" "1" "03/18/2016" "MySQL 1\&.6\&.3" "MySQL Utilities" +.TH "\FBMYSQLRPLSHOW\FR" "1" "08/01/2016" "MySQL 1\&.6\&.3" "MySQL Utilities" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,9 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysqlrplshow -.\" utilities: mysqlrplshow -.\" scripts .SH "NAME" mysqlrplshow \- Show Slaves for Master Server .SH "SYNOPSIS" @@ -37,7 +34,7 @@ \fBmysqlrplshow [\fR\fB\fIoptions\fR\fR\fB]\fR .SH "DESCRIPTION" .PP -This utility shows the replication slaves for a master\&. It prints a graph of the master and its slaves labeling each with the host name and port number\&. +This utility shows the replication slaves for a master\&. It prints a graph of the master and the slaves connected labeling each with the host name and port number\&. .PP You must specify the \fB\-\-discover\-slaves\-login \fR @@ -249,7 +246,7 @@ .sp Connection information for the master server\&. .sp -To connect to a server, it is necessary to specify connection parameters such as user name, host name, password, and either a port or socket\&. MySQL Utilities provides a number of ways to supply this information\&. All of the methods require specifying your choice via a command\-line option such as \-\-server, \-\-master, \-\-slave, etc\&. The methods include the following in order of most secure to least secure\&. +To connect to a server, it is necessary to specify connection parameters such as the user name, host name, password, and either a port or socket\&. MySQL Utilities provides a number of ways to supply this information\&. All of the methods require specifying your choice via a command\-line option such as \-\-server, \-\-master, \-\-slave, etc\&. The methods include the following in order of most secure to least secure\&. .sp .RS 4 .ie n \{\ diff -Nru mysql-utilities-1.6.3/docs/man/mysqlrplsync.1 mysql-utilities-1.6.4/docs/man/mysqlrplsync.1 --- mysql-utilities-1.6.3/docs/man/mysqlrplsync.1 2016-03-18 20:24:05.000000000 +0000 +++ mysql-utilities-1.6.4/docs/man/mysqlrplsync.1 2016-08-01 16:07:02.000000000 +0000 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysqlrplsync\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/18/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/01/2016 .\" Manual: MySQL Utilities .\" Source: MySQL 1.6.3 .\" Language: English .\" -.TH "\FBMYSQLRPLSYNC\FR" "1" "03/18/2016" "MySQL 1\&.6\&.3" "MySQL Utilities" +.TH "\FBMYSQLRPLSYNC\FR" "1" "08/01/2016" "MySQL 1\&.6\&.3" "MySQL Utilities" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,9 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysqlrplsync -.\" utilities: mysqlrplsync -.\" scripts .SH "NAME" mysqlrplsync \- Replication synchronization checker .SH "SYNOPSIS" @@ -37,9 +34,9 @@ \fBmysqlrplsync [\fR\fB\fIoptions\fR\fR\fB]\fR .SH "DESCRIPTION" .PP -This utility permits you to check replication servers for synchronization\&. It checks data consistency between a master and slaves or between two slaves\&. The utility reports missing objects as well as missing data\&. +This utility permits you to check replication servers for synchronization of replicated events\&. The utility permits users to check data consistency between a master and slaves or between two slaves\&. The utility reports missing objects as well as missing data\&. The utility can also be used to synchronize the replicated data on the servers\&. .PP -The utility can operate on an active replication topology, applying a synchronization process to check the data\&. Those servers where replication is not active can still be checked but the synchronization process will be skipped\&. In that case, it is up to the user to manually synchronize the servers\&. +The utility can operate on an active replication topology applying a synchronization process to check the data\&. Those servers where replication is not active can still be checked but the synchronization process will be skipped\&. In that case, it is up to the user to manually synchronize the servers\&. .PP The user must provide connection parameters for the servers\&. That is, the utility requires the master and slaves using the \fB\-\-master\fR @@ -93,11 +90,9 @@ .sp -1 .IP \(bu 2.3 .\} -\-\-checksum\-timeout= -.sp -Maximum timeout in seconds to wait for the checksum query to complete\&. +\-\-help .sp -Default = 3 seconds\&. +Display a help message and exit\&. .RE .sp .RS 4 @@ -108,9 +103,9 @@ .sp -1 .IP \(bu 2.3 .\} -\-\-discover\-slaves\-login= +\-\-license .sp -Detect registered slaves at startup and use the user name and password specified to connect in the format: <\fIuser\fR> [:<\fIpassword\fR>] or <\fIlogin\-path\fR>\&. For example, \-\-discover\-slaves\-login=joe:secret will use \*(Aqjoe\*(Aq as the user and \*(Aqsecret\*(Aq as the password for each discovered slave\&. +Display license information and exit\&. .RE .sp .RS 4 @@ -121,9 +116,11 @@ .sp -1 .IP \(bu 2.3 .\} -\-\-exclude= +\-\-checksum\-timeout= .sp -Fully qualified name for the databases or tables to exclude: <\fIdb_name\fR> [\&.<\fItbl_name\fR>]\&. List multiple data objects in a comma\-separated list\&. +Maximum timeout in seconds to wait for the checksum query to complete\&. +.sp +Default = 3 seconds\&. .RE .sp .RS 4 @@ -134,9 +131,9 @@ .sp -1 .IP \(bu 2.3 .\} -\-\-help +\-\-discover\-slaves\-login= .sp -Display a help message and exit\&. +Detect registered slaves at startup and use the user name and password specified to connect in the format: <\fIuser\fR> [:<\fIpassword\fR>] or <\fIlogin\-path\fR>\&. For example, \-\-discover\-slaves\-login=joe:secret will use \*(Aqjoe\*(Aq as the user and \*(Aqsecret\*(Aq as the password for each discovered slave\&. .RE .sp .RS 4 @@ -147,11 +144,9 @@ .sp -1 .IP \(bu 2.3 .\} -\-\-interval=, \-i -.sp -Interval in seconds for periodically polling the slaves sync status to verify if the sync point was reached\&. +\-\-exclude= .sp -Default = 3 seconds\&. +Fully qualified name for the databases or tables to exclude: <\fIdb_name\fR> [\&.<\fItbl_name\fR>]\&. List multiple data objects in a comma\-separated list\&. .RE .sp .RS 4 @@ -162,9 +157,11 @@ .sp -1 .IP \(bu 2.3 .\} -\-\-license +\-\-interval=, \-i .sp -Display license information and exit\&. +Interval in seconds for periodically polling the slaves sync status to verify if the sync point was reached\&. +.sp +Default = 3 seconds\&. .RE .sp .RS 4 @@ -179,7 +176,7 @@ .sp Connection information for the master server\&. .sp -To connect to a server, it is necessary to specify connection parameters such as user name, host name, password, and either a port or socket\&. MySQL Utilities provides a number of ways to supply this information\&. All of the methods require specifying your choice via a command\-line option such as \-\-server, \-\-master, \-\-slave, etc\&. The methods include the following in order of most secure to least secure\&. +To connect to a server, it is necessary to specify connection parameters such as the user name, host name, password, and either a port or socket\&. MySQL Utilities provides a number of ways to supply this information\&. All of the methods require specifying your choice via a command\-line option such as \-\-server, \-\-master, \-\-slave, etc\&. The methods include the following in order of most secure to least secure\&. .sp .RS 4 .ie n \{\ @@ -245,7 +242,7 @@ .sp Connection information for slave servers \&. List multiple slaves in comma\-separated list\&. .sp -To connect to a server, it is necessary to specify connection parameters such as user name, host name, password, and either a port or socket\&. MySQL Utilities provides a number of ways to supply this information\&. All of the methods require specifying your choice via a command\-line option such as \-\-server, \-\-master, \-\-slave, etc\&. The methods include the following in order of most secure to least secure\&. +To connect to a server, it is necessary to specify connection parameters such as the user name, host name, password, and either a port or socket\&. MySQL Utilities provides a number of ways to supply this information\&. All of the methods require specifying your choice via a command\-line option such as \-\-server, \-\-master, \-\-slave, etc\&. The methods include the following in order of most secure to least secure\&. .sp .RS 4 .ie n \{\ @@ -368,7 +365,7 @@ Display version information and exit\&. .RE NOTES.PP -The data consistency check is performed per table using a checksum table\&. If the calculated checksum differs, it indicates the tables are not synchronized\&. Nevertheless, since the checksum operation is not collision free, there is a very small probability that two different tables can produce the same checksum\&. +The data consistency check is performed per table using a checksum on the table\&. If the calculated checksum differs, it indicates the tables are not synchronized\&. Nevertheless, since the checksum operation is not collision free, there is a very small probability that two tables with differing data can produce the same checksum\&. .PP Mixing IP and hostnames is not recommended\&. The replication\-specific utilities will attempt to compare hostnames and IP addresses as aliases for checking slave connectivity to the master\&. However, if your installation does not support reverse name lookup, the comparison could fail\&. Without the ability to do a reverse name lookup, the replication utilities could report a false negative that the slave is (not) connected to the master\&. .PP diff -Nru mysql-utilities-1.6.3/docs/man/mysqlserverclone.1 mysql-utilities-1.6.4/docs/man/mysqlserverclone.1 --- mysql-utilities-1.6.3/docs/man/mysqlserverclone.1 2016-03-18 20:24:05.000000000 +0000 +++ mysql-utilities-1.6.4/docs/man/mysqlserverclone.1 2016-08-01 16:07:02.000000000 +0000 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysqlserverclone\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/18/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/01/2016 .\" Manual: MySQL Utilities .\" Source: MySQL 1.6.3 .\" Language: English .\" -.TH "\FBMYSQLSERVERCLONE\" "1" "03/18/2016" "MySQL 1\&.6\&.3" "MySQL Utilities" +.TH "\FBMYSQLSERVERCLONE\" "1" "08/01/2016" "MySQL 1\&.6\&.3" "MySQL Utilities" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,9 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysqlserverclone -.\" utilities: mysqlserverclone -.\" scripts .SH "NAME" mysqlserverclone \- Clone Existing Server to Create New Server .SH "SYNOPSIS" @@ -41,13 +38,15 @@ .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\&. +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: @@ -247,7 +246,7 @@ .sp Connection information for the server to be cloned\&. .sp -To connect to a server, it is necessary to specify connection parameters such as user name, host name, password, and either a port or socket\&. MySQL Utilities provides a number of ways to supply this information\&. All of the methods require specifying your choice via a command\-line option such as \-\-server, \-\-master, \-\-slave, etc\&. The methods include the following in order of most secure to least secure\&. +To connect to a server, it is necessary to specify connection parameters such as the user name, host name, password, and either a port or socket\&. MySQL Utilities provides a number of ways to supply this information\&. All of the methods require specifying your choice via a command\-line option such as \-\-server, \-\-master, \-\-slave, etc\&. The methods include the following in order of most secure to least secure\&. .sp .RS 4 .ie n \{\ diff -Nru mysql-utilities-1.6.3/docs/man/mysqlserverinfo.1 mysql-utilities-1.6.4/docs/man/mysqlserverinfo.1 --- mysql-utilities-1.6.3/docs/man/mysqlserverinfo.1 2016-03-18 20:24:05.000000000 +0000 +++ mysql-utilities-1.6.4/docs/man/mysqlserverinfo.1 2016-08-01 16:07:02.000000000 +0000 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysqlserverinfo\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/18/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/01/2016 .\" Manual: MySQL Utilities .\" Source: MySQL 1.6.3 .\" Language: English .\" -.TH "\FBMYSQLSERVERINFO\F" "1" "03/18/2016" "MySQL 1\&.6\&.3" "MySQL Utilities" +.TH "\FBMYSQLSERVERINFO\F" "1" "08/01/2016" "MySQL 1\&.6\&.3" "MySQL Utilities" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,9 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysqlserverinfo -.\" utilities: mysqlserverinfo -.\" scripts .SH "NAME" mysqlserverinfo \- Display Common Diagnostic Information from a Server .SH "SYNOPSIS" @@ -113,7 +110,7 @@ .sp -1 .IP \(bu 2.3 .\} -Current binary log coordinates (file name and position) +Current binary log coordinates (filename and position) .RE .sp .RS 4 @@ -124,7 +121,7 @@ .sp -1 .IP \(bu 2.3 .\} -Current relay log coordinates (file name and position) +Current relay log coordinates (filename and position) .RE .PP This utility can be used to see the diagnostic information for servers that are running or offline\&. If you want to see information about an offline server, the utility starts the server in read\-only mode\&. In this case, you must specify the @@ -337,7 +334,7 @@ .sp Connection information for a server\&. Use this option multiple times to see information for multiple servers\&. .sp -To connect to a server, it is necessary to specify connection parameters such as user name, host name, password, and either a port or socket\&. MySQL Utilities provides a number of ways to supply this information\&. All of the methods require specifying your choice via a command\-line option such as \-\-server, \-\-master, \-\-slave, etc\&. The methods include the following in order of most secure to least secure\&. +To connect to a server, it is necessary to specify connection parameters such as the user name, host name, password, and either a port or socket\&. MySQL Utilities provides a number of ways to supply this information\&. All of the methods require specifying your choice via a command\-line option such as \-\-server, \-\-master, \-\-slave, etc\&. The methods include the following in order of most secure to least secure\&. .sp .RS 4 .ie n \{\ diff -Nru mysql-utilities-1.6.3/docs/man/mysqlslavetrx.1 mysql-utilities-1.6.4/docs/man/mysqlslavetrx.1 --- mysql-utilities-1.6.3/docs/man/mysqlslavetrx.1 2016-03-18 20:24:05.000000000 +0000 +++ mysql-utilities-1.6.4/docs/man/mysqlslavetrx.1 2016-08-01 16:07:02.000000000 +0000 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysqlslavetrx\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/18/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/01/2016 .\" Manual: MySQL Utilities .\" Source: MySQL 1.6.3 .\" Language: English .\" -.TH "\FBMYSQLSLAVETRX\FR" "1" "03/18/2016" "MySQL 1\&.6\&.3" "MySQL Utilities" +.TH "\FBMYSQLSLAVETRX\FR" "1" "08/01/2016" "MySQL 1\&.6\&.3" "MySQL Utilities" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,9 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysqlslavetrx -.\" utilities: mysqlslavetrx -.\" scripts .SH "NAME" mysqlslavetrx \- Slave transaction skip utility .SH "SYNOPSIS" @@ -37,11 +34,25 @@ \fBmysqlslavetrx \-\-gtid\-set=\fR\fB\fIGTID_SET\fR\fR\fB \-\-slaves=\fR\fB\fISLAVES\fR\fR .SH "DESCRIPTION" .PP -This utility allows users to skip multiple transactions on slaves in a single step\&. In particular, it injects empty transactions on all specified slaves for each GTID in the specified GTID set\&. +This utility allows users to skip multiple transactions on slaves in a single step for gtid\-enabled servers\&. In particular, it injects empty transactions on all specified slaves for each GTID in the specified GTID set\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br .PP Skipping transactions can be useful to recover from erroneous situations that can occur during the replication process\&. However, this technique must be applied with extreme caution and full knowledge of its consequences because it might lead to data inconsistencies between the replication servers\&. .PP For example, let\*(Aqs consider that a transaction that inserts some data \*(Aqrow1\*(Aq into table \*(Aqt1\*(Aq fails on \*(Aqslave1\*(Aq\&. If that transaction is simply skipped to quickly resume replication on \*(Aqslave1\*(Aq without any additional intervention, then \*(Aqrow1\*(Aq will be missing from that slave\&. Moreover, \*(Aqrow1\*(Aq will no longer be replicated from the master since the GTID for the skipped transaction will be associated to an empty transaction\&. As a consequence, the data for table \*(Aqt1\*(Aq on \*(Aqslave1\*(Aq will be inconsistent with the one on the master and other slaves because \*(Aqrow1\*(Aq will be missing\&. For this reason, we should make sure that the technique to skip transactions is applied in the right situations and that all additional operations to keep the data consistent are also taken\&. +.sp .5v +.RE .PP Skipping transactions is also useful to ignore errant transactions on slaves in order to avoid those transactions from being replicated if a failover occurs\&. For example, consider that some transactions with custom data changes were accidentally committed on a slave without turning off binary logging, and that those changes are specific to that slave and should not be replicated (e\&.g\&., additional data for reporting purposes, data mining, or local administrative commands)\&. If that slave becomes the new master as a result of a failover or switchover, then those errant transactions will start being replicated across the topology\&. In order to avoid this situation, errant transactions should be skipped on all slaves\&. .if n \{\ @@ -149,7 +160,7 @@ .sp Connection information for slave servers\&. List multiple slaves in comma\-separated list\&. .sp -To connect to a server, it is necessary to specify connection parameters such as user name, host name, password, and either a port or socket\&. MySQL Utilities provides a number of ways to supply this information\&. All of the methods require specifying your choice via a command\-line option such as \-\-server, \-\-master, \-\-slave, etc\&. The methods include the following in order of most secure to least secure\&. +To connect to a server, it is necessary to specify connection parameters such as the user name, host name, password, and either a port or socket\&. MySQL Utilities provides a number of ways to supply this information\&. All of the methods require specifying your choice via a command\-line option such as \-\-server, \-\-master, \-\-slave, etc\&. The methods include the following in order of most secure to least secure\&. .sp .RS 4 .ie n \{\ diff -Nru mysql-utilities-1.6.3/docs/man/mysqluc.1 mysql-utilities-1.6.4/docs/man/mysqluc.1 --- mysql-utilities-1.6.3/docs/man/mysqluc.1 2016-03-18 20:24:05.000000000 +0000 +++ mysql-utilities-1.6.4/docs/man/mysqluc.1 2016-08-01 16:07:02.000000000 +0000 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysqluc\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/18/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/01/2016 .\" Manual: MySQL Utilities .\" Source: MySQL 1.6.3 .\" Language: English .\" -.TH "\FBMYSQLUC\FR" "1" "03/18/2016" "MySQL 1\&.6\&.3" "MySQL Utilities" +.TH "\FBMYSQLUC\FR" "1" "08/01/2016" "MySQL 1\&.6\&.3" "MySQL Utilities" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,9 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysqluc -.\" utilities: mysqluc -.\" scripts .SH "NAME" mysqluc \- Command line client for running MySQL Utilities .SH "SYNOPSIS" @@ -39,11 +36,11 @@ .PP This utility provides a command line environment for running MySQL Utilities\&. .PP -The mysqluc utility, hence console, allows users to execute any of the currently installed MySQL Utilities command\&. The option +The mysqluc utility, hence console, allows users to execute any of the currently installed MySQL Utilities commands (the MySQL Utility scripts such as mysqluserclone)\&. The option \fB\-\-utildir\fR -is used to provide a path to the MySQL Utilities if the location is different from when the utility is executed\&. +is used to provide a path to the MySQL Utilities scripts if the location is different from where the utility is executed\&. .PP -The console has a list of console or base commands\&. These allow the user to interact with the features of the console itself\&. The list of base commands is shown below along with a brief description\&.: +The console has a list of console or base commands\&. These allow the user to interact with the features of the console itself\&. The list of base commands is shown below along with a brief description\&. .sp .if n \{\ .RS 4 @@ -72,7 +69,7 @@ .RE .\} .PP -One of the most helpful base commands is the ability to see the options for a given utility by typing \*(Aqhelp \*(Aq\&. When the user types this command and presses ENTER, the console will display a list of all of the options for the utility\&. +One of the most helpful base commands is the ability to see the options for a given utility by typing \*(Aqhelp \*(Aq\&. When the user enters this command, the console will display a list of all of the options for the utility\&. .PP The console provides tab completion for all commands, options for utilities, and user\-defined variables\&. Tab completion for commands allows users to specify the starting N characters of a command and press TAB to complete the command\&. If there are more than one command that matches the prefix, and the user presses TAB twice, a list of all possible matches is displayed\&. .PP @@ -96,7 +93,7 @@ .sp .5v .RE .PP -Executing utilities is accomplished by typing the complete command and pressing ENTER\&. The user does not have to type \*(Aqpython\*(Aq or provide the \*(Aq\&.py\*(Aq file extension\&. The console will add these if needed\&. +Executing utilities is accomplished by typing the complete command and pressing ENTER\&. The user does not have to type \*(Aqpython\*(Aq or provide the \*(Aq\&.py\*(Aq file extension\&. The console will add these if needed when the command is executed\&. .PP The user can also run commands using the option \fB\-\-execute\fR\&. The value for this option is a semi\-colon separated list of commands to execute\&. These can be base commands or MySQL Utility commands\&. The console will execute each command and display the output\&. All commands to be run by the console must appear inside a quoted string and separated by semi\-colons\&. Commands outside of the quoted string will be treated as arguments for the mysqluc utility itself and thus ignored for execution\&. diff -Nru mysql-utilities-1.6.3/docs/man/mysqluserclone.1 mysql-utilities-1.6.4/docs/man/mysqluserclone.1 --- mysql-utilities-1.6.3/docs/man/mysqluserclone.1 2016-03-18 20:24:05.000000000 +0000 +++ mysql-utilities-1.6.4/docs/man/mysqluserclone.1 2016-08-01 16:07:02.000000000 +0000 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysqluserclone\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/18/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/01/2016 .\" Manual: MySQL Utilities .\" Source: MySQL 1.6.3 .\" Language: English .\" -.TH "\FBMYSQLUSERCLONE\FR" "1" "03/18/2016" "MySQL 1\&.6\&.3" "MySQL Utilities" +.TH "\FBMYSQLUSERCLONE\FR" "1" "08/01/2016" "MySQL 1\&.6\&.3" "MySQL Utilities" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,9 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysqluserclone -.\" utilities: mysqluserclone -.\" scripts .SH "NAME" mysqluserclone \- Clone Existing User to Create New User .SH "SYNOPSIS" @@ -145,7 +142,7 @@ .sp Connection information for the destination server\&. .sp -To connect to a server, it is necessary to specify connection parameters such as user name, host name, password, and either a port or socket\&. MySQL Utilities provides a number of ways to supply this information\&. All of the methods require specifying your choice via a command\-line option such as \-\-server, \-\-master, \-\-slave, etc\&. The methods include the following in order of most secure to least secure\&. +To connect to a server, it is necessary to specify connection parameters such as the user name, host name, password, and either a port or socket\&. MySQL Utilities provides a number of ways to supply this information\&. All of the methods require specifying your choice via a command\-line option such as \-\-server, \-\-master, \-\-slave, etc\&. The methods include the following in order of most secure to least secure\&. .sp .RS 4 .ie n \{\ @@ -288,7 +285,7 @@ .sp Connection information for the source server\&. .sp -To connect to a server, it is necessary to specify connection parameters such as user name, host name, password, and either a port or socket\&. MySQL Utilities provides a number of ways to supply this information\&. All of the methods require specifying your choice via a command\-line option such as \-\-server, \-\-master, \-\-slave, etc\&. The methods include the following in order of most secure to least secure\&. +To connect to a server, it is necessary to specify connection parameters such as the user name, host name, password, and either a port or socket\&. MySQL Utilities provides a number of ways to supply this information\&. All of the methods require specifying your choice via a command\-line option such as \-\-server, \-\-master, \-\-slave, etc\&. The methods include the following in order of most secure to least secure\&. .sp .RS 4 .ie n \{\ @@ -411,22 +408,6 @@ Display version information and exit\&. .RE NOTES.PP -You must provide connection parameters (user, host, password, and so forth) for an account that has the appropriate privileges to access all objects in the operation\&. -.PP -The account used to connect to the source server must have privileges to read the -\fBmysql\fR -database\&. -.PP -The account used to connect to the destination server must have privileges to execute -\fBCREATE USER\fR -(and -\fBDROP USER\fR -if the -\fB\-\-force\fR -option is given), and privileges to execute -\fBGRANT\fR -for all privileges to be granted to the new accounts\&. -.PP For the \fB\-\-format\fR option, the permitted values are not case sensitive\&. In addition, values may be specified as any unambiguous prefix of a valid value\&. For example, @@ -434,6 +415,8 @@ specifies the grid format\&. An error occurs if a prefix matches more than one valid value\&. .PP The path to the MySQL client tools should be included in the PATH environment variable in order to use the authentication mechanism with login\-paths\&. This will allow the utility to use the my_print_defaults tools which is required to read the login\-path values from the login configuration file (\&.mylogin\&.cnf)\&. +.PP +When cloning users that are defined with an authentication plugin, the utility will attempt to use the authentication plugin for the destination user(s)\&. The utility will issue an error if the plugin is not on the destination machine or is inactive and the operation will be aborted\&. A warning is issued if a password is assigned to a new user when the source user has an authentication plugin\&. In this case, the utility will use the password and not the authentication plugin for the new user\&. EXAMPLES.PP To clone joe @@ -483,7 +466,17 @@ .\} .sp PERMISSIONS REQUIRED.PP -The permissions required include the ability to read the mysql database and to have read access to the data directory\&. +The account used on the source server must have privileges to read the +\fBmysql\fR +database\&. The account used to connect to the destination server must have privileges to execute +\fBCREATE USER\fR +(and +\fBDROP USER\fR +if the +\fB\-\-force\fR +option is given), and privileges to execute +\fBGRANT\fR +for all privileges to be granted to the new accounts\&. .SH "COPYRIGHT" .br .PP diff -Nru mysql-utilities-1.6.3/mysql/utilities/command/dbcopy.py mysql-utilities-1.6.4/mysql/utilities/command/dbcopy.py --- mysql-utilities-1.6.3/mysql/utilities/command/dbcopy.py 2016-03-18 20:05:45.000000000 +0000 +++ mysql-utilities-1.6.4/mysql/utilities/command/dbcopy.py 2016-08-01 15:54:49.000000000 +0000 @@ -1,5 +1,5 @@ # -# Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -48,6 +48,46 @@ "%s server does support GTIDs. To suppress this warning, " "use the --skip-gtid option when copying %s a non-GTID " "enabled server.") +_CHECK_BLOBS_NOT_NULL = """ + SELECT DISTINCT TABLE_SCHEMA, TABLE_NAME, COLUMN_NAME + FROM INFORMATION_SCHEMA.COLUMNS + WHERE (COLUMN_TYPE LIKE '%BLOB%' OR COLUMN_TYPE LIKE '%TEXT%') AND + IS_NULLABLE = 'NO' AND TABLE_SCHEMA IN ({0}); +""" +_BLOBS_NOT_NULL_ERROR = ("ERROR: The following tables have blob fields set to " + "NOT NULL. The copy operation cannot proceed unless " + "the blob fields permit NULL values. To copy data " + "with NOT NULL blob fields, first remove the NOT " + "NULL restriction, copy the data, then add the NOT " + "NULL restriction using ALTER TABLE statements.") + + +def check_blobs_not_null(server, db_list): + """ + Check for any blob fields that have NOT null set. Prints error message + if any are encountered. + + server[in] Server class instance + db_list[in] List of databases to be copied in form + (src, dst) + + Returns: bool - True = blobs with NOT NULL, False = none found + """ + if not db_list: + return False + db_name_include = "" + for db in db_list: + if not db_name_include == "": + db_name_include = "{0},".format(db_name_include) + db_name_include = "{0}'{1}'".format(db_name_include, db[0]) + res = server.exec_query(_CHECK_BLOBS_NOT_NULL.format(db_name_include)) + if res: + print(_BLOBS_NOT_NULL_ERROR) + for row in res: + print(" {0}.{1} Column {2}".format(row[0], row[1], row[2])) + print + return True + return False def _copy_objects(source, destination, db_list, options, diff -Nru mysql-utilities-1.6.3/mysql/utilities/command/dbexport.py mysql-utilities-1.6.4/mysql/utilities/command/dbexport.py --- mysql-utilities-1.6.3/mysql/utilities/command/dbexport.py 2016-03-18 20:05:45.000000000 +0000 +++ mysql-utilities-1.6.4/mysql/utilities/command/dbexport.py 2016-08-01 15:54:49.000000000 +0000 @@ -530,7 +530,6 @@ skip_blobs = options.get("skip_blobs", False) quiet = options.get("quiet", False) file_per_table = options.get("file_per_tbl", False) - sql_mode = source_srv.select_variable("SQL_MODE") # Handle source server instance or server connection values. # Note: For multiprocessing the use of connection values instead of a @@ -546,6 +545,9 @@ servers = connect_servers(source_srv, None, conn_options) source = servers[0] + # Must be after the connection test to get SQL_MODE + sql_mode = source.select_variable("SQL_MODE") + # Handle qualified table name (with backtick quotes). db_name = table[0] tbl_name = "{0}.{1}".format(db_name, table[1]) diff -Nru mysql-utilities-1.6.3/mysql/utilities/command/rpl_admin.py mysql-utilities-1.6.4/mysql/utilities/command/rpl_admin.py --- mysql-utilities-1.6.3/mysql/utilities/command/rpl_admin.py 2016-03-18 20:05:45.000000000 +0000 +++ mysql-utilities-1.6.4/mysql/utilities/command/rpl_admin.py 2016-08-01 15:54:49.000000000 +0000 @@ -1,5 +1,5 @@ # -# Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -811,6 +811,7 @@ exec_fail = self.options.get("exec_fail", None) post_fail = self.options.get("post_fail", None) pedantic = self.options.get('pedantic', False) + fail_retry = self.options.get('fail_retry', None) # Only works for GTID_MODE=ON if not self.topology.gtid_enabled(): @@ -907,6 +908,19 @@ except: pass + # If user specified a master fail retry, wait for the + # predetermined time and attempt to check the master again. + if fail_retry is not None and \ + not self.topology.master.is_alive(): + msg = "Master is still not reachable. Waiting for %s " \ + "seconds to retry detection." % fail_retry + self._report(msg, logging.INFO, False) + time.sleep(fail_retry) + try: + self.topology.master.connect() + except: + pass + # Check the master again. If no connection or lost connection, # try ping. This performs the timeout threshold for detecting # a down master. If still not alive, try to reconnect and if @@ -929,6 +943,9 @@ if failover: self._report("Failed to reconnect to the master after " "3 attemps.", logging.INFO) + else: + self._report("Master is Ok. Resuming watch.", + logging.INFO) if failover: self._report("Master is confirmed to be down or unreachable.", diff -Nru mysql-utilities-1.6.3/mysql/utilities/command/serverclone.py mysql-utilities-1.6.4/mysql/utilities/command/serverclone.py --- mysql-utilities-1.6.3/mysql/utilities/command/serverclone.py 2016-03-18 20:05:45.000000000 +0000 +++ mysql-utilities-1.6.4/mysql/utilities/command/serverclone.py 2016-08-01 15:54:49.000000000 +0000 @@ -1,5 +1,5 @@ # -# Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -307,9 +307,10 @@ if os.name == "posix": try: os.kill(proc.pid, subprocess.signal.SIGTERM) - except OSError: - raise UtilError("Failed to kill process with pid '{0}'" - "".format(proc.pid)) + except OSError as error: + if not error.strerror.startswith("No such process"): + raise UtilError("Failed to kill process with pid '{0}'" + "".format(proc.pid)) else: ret_code = subprocess.call("taskkill /F /T /PID " "{0}".format(proc.pid), shell=True) diff -Nru mysql-utilities-1.6.3/mysql/utilities/command/serverinfo.py mysql-utilities-1.6.4/mysql/utilities/command/serverinfo.py --- mysql-utilities-1.6.3/mysql/utilities/command/serverinfo.py 2016-03-18 20:05:45.000000000 +0000 +++ mysql-utilities-1.6.4/mysql/utilities/command/serverinfo.py 2016-08-01 15:54:49.000000000 +0000 @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -382,8 +382,10 @@ args.extend(server_args) socket = server_val.get('unix_socket', None) + if not socket and post_5_7_4 and os.name == "posix": + socket = os.path.normpath(os.path.join(datadir, "mysql.sock")) if socket is not None: - args.append("--socket=%(unix_socket)s" % server_val) + args.append("--socket={0}".format(socket)) if verbosity > 0: subprocess.Popen(args, shell=False) else: diff -Nru mysql-utilities-1.6.3/mysql/utilities/common/console.py mysql-utilities-1.6.4/mysql/utilities/common/console.py --- mysql-utilities-1.6.3/mysql/utilities/common/console.py 2016-03-18 20:05:45.000000000 +0000 +++ mysql-utilities-1.6.4/mysql/utilities/common/console.py 2016-08-01 15:54:49.000000000 +0000 @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -321,8 +321,10 @@ self.command += old_command[self.position + 1:] sys.stdout.write(self.command[self.position:]) self.length = len(self.command) - if self.length > 0: + spaces = len(self.command[self.position:]) + for i in range(0, spaces): sys.stdout.write('\b') + sys.stdout.flush() def backspace_keypress(self): """Execute the 'BACKSPACE' key press. diff -Nru mysql-utilities-1.6.3/mysql/utilities/common/dbcompare.py mysql-utilities-1.6.4/mysql/utilities/common/dbcompare.py --- mysql-utilities-1.6.3/mysql/utilities/common/dbcompare.py 2016-03-18 20:05:45.000000000 +0000 +++ mysql-utilities-1.6.4/mysql/utilities/common/dbcompare.py 2016-08-01 15:54:49.000000000 +0000 @@ -603,6 +603,20 @@ object1_create = get_create_object(server1, object1, options, object_type) object2_create = get_create_object(server2, object2, options, object_type) + # Only target CREATE DATABASE difference if decorations differ, + # not just the database names. So we isolate the CREATE statement + # without the names or +/- and compare. If different, print the + # difference report otherwise, ignore it. + if (object_type == "DATABASE") and (object1 != object2): + quotes = ["'", '"', "`"] + db1 = object1.translate(None, "".join(quotes)) + db2 = object2.translate(None, "".join(quotes)) + first = object1_create.replace(db1, "")[1::] + second = object2_create.replace(db2, "")[1::] + if first == second: + object1_create = "" + object2_create = "" + if not quiet: msg = "# Comparing {0} to {1} ".format(object1, object2) print msg, diff -Nru mysql-utilities-1.6.3/mysql/utilities/common/messages.py mysql-utilities-1.6.4/mysql/utilities/common/messages.py --- mysql-utilities-1.6.3/mysql/utilities/common/messages.py 2016-03-18 20:05:45.000000000 +0000 +++ mysql-utilities-1.6.4/mysql/utilities/common/messages.py 2016-08-01 15:54:49.000000000 +0000 @@ -189,3 +189,6 @@ MSG_UTILITIES_VERSION = "MySQL Utilities {utility} version {version}." MSG_MYSQL_VERSION = "Server '{server}' is using MySQL version {version}." + +USER_PASSWORD_FORMAT = ("Format of {0} option is incorrect. Use userid:passwd " + "or userid.") diff -Nru mysql-utilities-1.6.3/mysql/utilities/common/options.py mysql-utilities-1.6.4/mysql/utilities/common/options.py --- mysql-utilities-1.6.3/mysql/utilities/common/options.py 2016-03-18 20:05:45.000000000 +0000 +++ mysql-utilities-1.6.4/mysql/utilities/common/options.py 2016-08-01 15:54:49.000000000 +0000 @@ -557,6 +557,48 @@ "transaction.") +def add_exclude(parser, object_type="objects", + example1="db1.t1", example2="db1.t% or db%.%"): + """Add the --exclude option. + + parser[in] the parser instance + example1[in] + example2[in] + """ + parser.add_option("-x", "--exclude", action="append", dest="exclude", + type="string", default=None, help="exclude one or more " + "{0} from the operation using either a specific " + "name (e.g. {1}), a LIKE pattern (e.g. {2}) or a REGEXP " + "search pattern. To use a REGEXP search pattern for all " + "exclusions, you must also specify the --regexp option. " + "Repeat the --exclude option for multiple exclusions." + "".format(object_type, example1, example2)) + + +def check_exclude_pattern(exclude_list, use_regexp): + """Check the --exclude pattern to determine if there are special symbols + that may be regexp symbols and the --use-regexp option is not specified. + Prints warning if this is true. + + parser[in] the parser instance + use_regexp[in] the option to use regexp + """ + # ignore null lists + if not exclude_list: + return True + for row in exclude_list: + # replace _ and % and see if still not alnum() + test = row.replace('_', '').replace('%', '').replace('`', '') + test = test.replace("'", "").replace('.', '').replace('"', '') + if len(test) > 0 and not test.isalnum() and not use_regexp: + print "# WARNING: One or more of your --exclude patterns " \ + "contains symbols that could be regexp patterns. You may " \ + "need to include --regexp to ensure your exclude pattern " \ + "is evaluated as REGEXP and not a SQL LIKE expression." + return False + return True + + def add_regexp(parser): """Add the --regexp option. @@ -836,8 +878,8 @@ """ if options is None: options = {} - # Split on the ':' to determine if a login-path is used. - login_values = userpass_values.split(':') + # Split on the first ':' to determine if a login-path is used. + login_values = userpass_values.split(':', 1) if len(login_values) == 1: # Format is config-path, login-path or user (without a password): # First check if the value is a config-path @@ -892,9 +934,9 @@ return login_values[0], login_values[1] else: # Invalid user credentials format - return FormatError("Unable to parse the specified user credentials " - "(accepted formats: [: or " - "): %s" % userpass_values) + raise FormatError("Unable to parse the specified user credentials " + "(accepted formats: [: or " + "): %s" % userpass_values) def add_basedir_option(parser): diff -Nru mysql-utilities-1.6.3/mysql/utilities/common/replication_ms.py mysql-utilities-1.6.4/mysql/utilities/common/replication_ms.py --- mysql-utilities-1.6.3/mysql/utilities/common/replication_ms.py 2016-03-18 20:05:45.000000000 +0000 +++ mysql-utilities-1.6.4/mysql/utilities/common/replication_ms.py 2016-08-01 15:54:49.000000000 +0000 @@ -1,5 +1,5 @@ # -# Copyright (c) 2014, Oracle and/or its affiliates. All rights +# Copyright (c) 2014, 2016 Oracle and/or its affiliates. All rights # reserved. # # This program is free software; you can redistribute it and/or modify @@ -26,7 +26,7 @@ import time import logging -from mysql.utilities.exception import UtilError, UtilRplError +from mysql.utilities.exception import FormatError, UtilError, UtilRplError from mysql.utilities.common.daemon import Daemon from mysql.utilities.common.format import print_list from mysql.utilities.common.ip_parser import hostname_is_ip @@ -38,6 +38,7 @@ from mysql.utilities.common.replication import Replication, Master, Slave from mysql.utilities.common.topology import Topology from mysql.utilities.common.user import User +from mysql.utilities.common.messages import USER_PASSWORD_FORMAT _MIN_SERVER_VERSION = (5, 6, 9) @@ -358,7 +359,10 @@ raise UtilRplError(msg) else: # Parse user and password (support login-paths) - (r_user, r_pass,) = parse_user_password(self.rpl_user) + try: + (r_user, r_pass,) = parse_user_password(self.rpl_user) + except FormatError: + raise UtilError (USER_PASSWORD_FORMAT.format("--rpl-user")) # Switch master and start slave slave.switch_master(master, r_user, r_pass) diff -Nru mysql-utilities-1.6.3/mysql/utilities/common/replication.py mysql-utilities-1.6.4/mysql/utilities/common/replication.py --- mysql-utilities-1.6.3/mysql/utilities/common/replication.py 2016-03-18 20:05:45.000000000 +0000 +++ mysql-utilities-1.6.4/mysql/utilities/common/replication.py 2016-08-01 15:54:49.000000000 +0000 @@ -25,11 +25,13 @@ import socket from mysql.utilities.exception import UtilError, UtilRplWarn, UtilRplError +from mysql.utilities.exception import FormatError from mysql.utilities.common.options import parse_user_password from mysql.utilities.common.server import Server from mysql.utilities.common.user import User from mysql.utilities.common.ip_parser import clean_IPv6, format_IPv6 from mysql.utilities.common.format import format_tabular_list +from mysql.utilities.common.messages import USER_PASSWORD_FORMAT _MASTER_INFO_COL = [ @@ -175,7 +177,10 @@ passwd = res[0][1] else: # Parse username and password (supports login-paths) - uname, passwd = parse_user_password(rpl_user, options=options) + try: + uname, passwd = parse_user_password(rpl_user, options=options) + except FormatError as fmt_err: + raise UtilError (USER_PASSWORD_FORMAT.format("--rpl-user")) if not passwd: passwd = '' @@ -566,7 +571,10 @@ result = True # Parse user and password (support login-paths) - r_user, r_pass = parse_user_password(rpl_user) + try: + r_user, r_pass = parse_user_password(rpl_user) + except FormatError as fmt_err: + raise UtilError (USER_PASSWORD_FORMAT.format("--rpl-user")) # Check to see if rpl_user is present, else create her if not self.create_rpl_user(r_user, r_pass)[0]: @@ -1978,25 +1986,52 @@ "(slave status is empty)" ".".format(self.host, self.port)) return False - # pylint: disable=W0633 - m_host, m_port = self.get_master_host_port() - # Suppose the state is True for "Waiting for master to send event" - # so we can ignore it if verify_state is not given as True. - if verify_state: - state = self.get_state() == "Waiting for master to send event" - if not state: - if raise_error: - raise UtilRplError("Slave '{0}:{1}' is not waiting for " - "events from master.".format(self.host, - self.port)) - return False - if not master.is_alias(m_host) or int(m_port) != int(master.port): + # We must not assume there is one and only one master for a slave. + # Starting with 5.7.6, multi-master means a slave could have many + # masters, each connected via a replication channel. Thus, we must + # loop through the rows in the SHOW SLAVE STATUS and check every + # master listed. If no matches to this master is found, we can + # declare the slave not connected to the master otherwise, we can + # stop the loop when the master is found. + m_host = "" + m_port = None + master_found = False + for row in res: + # pylint: disable=W0633 + m_host = row[_SLAVE_MASTER_HOST] # get master host + m_port = row[_SLAVE_MASTER_PORT] # get master port + # Suppose the state is True for "Waiting for master to send event" + # so we can ignore it if verify_state is not given as True. + if verify_state: + state = (row[_SLAVE_IO_STATE] == + "Waiting for master to send event") + if not state: + if raise_error: + raise UtilRplError("Slave '{0}:{1}' is not waiting" + " for events from master." + "".format(self.host, self.port)) + return False + # If we find a match, stop. + if master.is_alias(m_host) and int(m_port) == int(master.port): + master_found = True + break + # If no master found, report what we did find or in the case of + # multi-master (more than one row in SHOW SLAVE STATUS), state this + # master is not among the masters listed for the slave. + if not master_found: if raise_error: - raise UtilRplError("Slave '{0}:{1}' is configured for master " - "'{2}:{3}' and not '{4}:{5}'" - ".".format(self.host, self.port, m_host, - m_port, master.host, - master.port)) + if len(res) > 1: + raise UtilRplError("The list of masters for slave " + "'{0}:{1}' does not include master" + " '{2}:{3}'" + ".".format(self.host, self.port, + master.host, master.port)) + else: + raise UtilRplError("Slave '{0}:{1}' is configured for " + "master '{2}:{3}' and not '{4}:{5}'" + ".".format(self.host, self.port, + m_host, m_port, + master.host, master.port)) return False return True diff -Nru mysql-utilities-1.6.3/mysql/utilities/common/server.py mysql-utilities-1.6.4/mysql/utilities/common/server.py --- mysql-utilities-1.6.3/mysql/utilities/common/server.py 2016-03-18 20:05:45.000000000 +0000 +++ mysql-utilities-1.6.4/mysql/utilities/common/server.py 2016-08-01 15:54:49.000000000 +0000 @@ -842,14 +842,20 @@ # Add alias with and without suffix from self.aliases for alias in self.aliases: if alias.endswith(suffix): - host, _ = alias.rsplit('.') - no_suffix_server_aliases.add(host) + try: + host, _ = alias.rsplit('.', 1) + no_suffix_host_aliases.add(host) + except: + pass # Ok if parts don't split correctly no_suffix_server_aliases.add(alias) # Add alias with and without suffix from host_aliases for alias in host_or_ip_aliases: if alias.endswith(suffix): - host, _ = alias.rsplit('.') - no_suffix_host_aliases.add(host) + try: + host, _ = alias.rsplit('.', 1) + no_suffix_host_aliases.add(host) + except: + pass # Ok if parts don't split correctly no_suffix_host_aliases.add(alias) # Check if there is any alias in common common_alias = no_suffix_host_aliases.intersection( diff -Nru mysql-utilities-1.6.3/mysql/utilities/common/table.py mysql-utilities-1.6.4/mysql/utilities/common/table.py --- mysql-utilities-1.6.3/mysql/utilities/common/table.py 2016-03-18 20:05:45.000000000 +0000 +++ mysql-utilities-1.6.4/mysql/utilities/common/table.py 2016-08-01 15:54:49.000000000 +0000 @@ -363,6 +363,7 @@ self.unique_not_null_indexes = None self.text_columns = [] self.blob_columns = [] + self.bit_columns = [] self.column_format = None self.column_names = [] self.column_name_type = [] @@ -452,6 +453,9 @@ col_format_values[col] = "%s" elif "date" in col_type or "time" in col_type: col_format_values[col] = "'%s'" + elif "bit" in col_type: + self.bit_columns.append(col) + col_format_values[col] = "%d" else: col_format_values[col] = "%s" self.column_format = "%s%s%s" % \ @@ -616,6 +620,11 @@ row_vals.append("NULL") else: row_vals.append(convert_special_characters(column)) + elif index in self.bit_columns: + if column is None: + row_vals.append("NULL") + else: + row_vals.append(converter._BIT_to_python(column)) else: if column is None: row_vals.append("NULL") @@ -680,6 +689,11 @@ # Apply escape sequences to special characters values[col] = convert_special_characters(values[col]) + for col in self.bit_columns: + if values[col] is not None: + # Convert BIT to INTEGER for dump. + values[col] = MySQLConverter()._BIT_to_python(values[col]) + # Build string (add quotes to "string" like types) val_str = self.column_format % tuple(values) diff -Nru mysql-utilities-1.6.3/mysql/utilities/common/tools.py mysql-utilities-1.6.4/mysql/utilities/common/tools.py --- mysql-utilities-1.6.3/mysql/utilities/common/tools.py 2016-03-18 20:05:45.000000000 +0000 +++ mysql-utilities-1.6.4/mysql/utilities/common/tools.py 2016-08-01 15:54:49.000000000 +0000 @@ -1,5 +1,5 @@ # -# Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -244,6 +244,25 @@ return (ret_val == 0) +def parse_mysqld_version(vers_str): + pattern = r"mysqld(?:\.exe)?\s+Ver\s+(\d+\.\d+\.\S+)\s" + match = re.search(pattern, vers_str) + if not match: + return None + version = match.group(1) + num_dots = vers_str.count('.') + try: + # get the version digits. If more than 2, we get first 3 parts + if num_dots == 2: + maj_ver, min_ver, dev = version.split(".", 2) + else: + maj_ver, min_ver, dev, __ = version.split(".", 3) + rel = dev.split("-", 1) + return (maj_ver, min_ver, rel[0]) + except: + return None + + def get_mysqld_version(mysqld_path): """Return the version number for a mysqld executable. @@ -270,19 +289,7 @@ if line is None: return None - pattern = r"mysqld(?:\.exe)?\s+Ver\s+(\d+\.\d+\.\S+)\s" - match = re.search(pattern, line) - if not match: - return None - version = match.group(1) - try: - maj_ver, min_ver, dev = version.split(".") - rel = dev.split("-") - return (maj_ver, min_ver, rel[0]) - except: - return None - - return None + return parse_mysqld_version(line) def show_file_statistics(file_name, wild=False, out_format="GRID"): diff -Nru mysql-utilities-1.6.3/mysql/utilities/common/topology_map.py mysql-utilities-1.6.4/mysql/utilities/common/topology_map.py --- mysql-utilities-1.6.3/mysql/utilities/common/topology_map.py 2016-03-18 20:05:45.000000000 +0000 +++ mysql-utilities-1.6.4/mysql/utilities/common/topology_map.py 2016-08-01 15:54:49.000000000 +0000 @@ -1,5 +1,5 @@ # -# Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -26,7 +26,8 @@ from mysql.utilities.common.replication import Slave from mysql.utilities.common.server import connect_servers from mysql.utilities.common.user import User -from mysql.utilities.exception import UtilError +from mysql.utilities.exception import FormatError, UtilError +from mysql.utilities.common.messages import USER_PASSWORD_FORMAT _START_PORT = 3306 @@ -201,7 +202,10 @@ return # Get user and password (supports login-paths) - user, password = parse_user_password(discover, options=self.options) + try: + user, password = parse_user_password(discover, options=self.options) + except FormatError: + raise UtilError (USER_PASSWORD_FORMAT.format("--discover-slaves")) # Get replication topology slaves = master.get_slaves(user, password) diff -Nru mysql-utilities-1.6.3/mysql/utilities/common/topology.py mysql-utilities-1.6.4/mysql/utilities/common/topology.py --- mysql-utilities-1.6.3/mysql/utilities/common/topology.py 2016-03-18 20:05:45.000000000 +0000 +++ mysql-utilities-1.6.4/mysql/utilities/common/topology.py 2016-08-01 15:54:49.000000000 +0000 @@ -38,6 +38,7 @@ from mysql.utilities.common.server import (get_server_state, get_server, get_connection_dictionary, log_server_version) +from mysql.utilities.common.messages import USER_PASSWORD_FORMAT _HEALTH_COLS = ["host", "port", "role", "state", "gtid_mode", "health"] @@ -85,6 +86,13 @@ Returns tuple - (master, slaves, candidates) dictionaries """ + try: + timeout = options.conn_timeout + except: + timeout = None + if timeout and options.verbosity > 2: + print("Note: running with --connection-timeout={0}".format(timeout)) + # Create a basic configuration reader, without looking for the tool # my_print_defaults to avoid raising exceptions. This is used for # optimization purposes, to reuse data and avoid repeating the execution of @@ -96,6 +104,9 @@ try: master_val = parse_connection(options.master, config_reader, options) + # Add connection timeout if present in options + if timeout: + master_val['connection_timeout'] = timeout except FormatError as err: msg = ("Master connection values invalid or cannot be parsed: %s " "(%s)." % (options.master, err)) @@ -114,6 +125,9 @@ for slave in slaves: try: s_values = parse_connection(slave, config_reader, options) + # Add connection timeout if present in options + if timeout: + s_values['connection_timeout'] = timeout slaves_val.append(s_values) except FormatError as err: msg = ("Slave connection values invalid or cannot be parsed: " @@ -130,6 +144,9 @@ for slave in candidates: try: s_values = parse_connection(slave, config_reader, options) + # Add connection timeout if present in options + if timeout: + s_values['connection_timeout'] = timeout candidates_val.append(s_values) except FormatError as err: msg = "Candidate connection values invalid or " + \ @@ -370,7 +387,10 @@ return # Get user and password (support login-path) - user, password = parse_user_password(discover, options=self.options) + try: + user, password = parse_user_password(discover, options=self.options) + except FormatError: + raise UtilError (USER_PASSWORD_FORMAT.format("--discover-slaves")) # Find discovered slaves new_slaves_found = False @@ -565,7 +585,10 @@ return (user, passwd) # Get user and password (support login-path) - user, passwd = parse_user_password(self.rpl_user, options=self.options) + try: + user, passwd = parse_user_password(self.rpl_user, options=self.options) + except FormatError: + raise UtilError (USER_PASSWORD_FORMAT.format("--rpl-user")) return (user, passwd) def run_script(self, script, quiet, options=None): @@ -747,7 +770,10 @@ raise # Get user and password (support login-path) - user, _ = parse_user_password(self.rpl_user) + try: + user, _ = parse_user_password(self.rpl_user) + except FormatError: + raise UtilError (USER_PASSWORD_FORMAT.format("--rpl-user")) # Make new master forget was a slave using slave methods s_candidate = self._change_role(slave, slave=False) diff -Nru mysql-utilities-1.6.3/mysql/utilities/common/user.py mysql-utilities-1.6.4/mysql/utilities/common/user.py --- mysql-utilities-1.6.3/mysql/utilities/common/user.py 2016-03-18 20:05:45.000000000 +0000 +++ mysql-utilities-1.6.4/mysql/utilities/common/user.py 2016-08-01 15:54:49.000000000 +0000 @@ -205,7 +205,10 @@ """ self.server1 = server1 - self.sql_mode = self.server1.select_variable("SQL_MODE") + if server1.db_conn: + self.sql_mode = self.server1.select_variable("SQL_MODE") + else: + self.sql_mode = "" self.user, self.passwd, self.host = parse_user_host(user) self.verbosity = verbosity self.current_user = None @@ -217,7 +220,7 @@ 'fetch': False } - def create(self, new_user=None): + def create(self, new_user=None, authentication=None): """Create the user Attempts to create the user. If the operation fails, an error is @@ -226,8 +229,11 @@ new_user[in] MySQL user string (user@host:passwd) (optional) If omitted, operation is performed on the class instance user name. + authentication[in] Special authentication clause for non-native + authentication plugins """ - + auth_str = "SELECT * FROM INFORMATION_SCHEMA.PLUGINS WHERE " \ + "PLUGIN_NAME = '{0}' AND PLUGIN_STATUS = 'ACTIVE';" query_str = "CREATE USER " user, passwd, host = None, None, None if new_user: @@ -237,8 +243,19 @@ query_str += "'%s'@'%s' " % (self.user, self.host) passwd = self.passwd + if passwd and authentication: + print("WARNING: using a password and an authentication plugin is " + "not permited. The password will be used instead of the " + "authentication plugin.") if passwd: - query_str += "IDENTIFIED BY '%s'" % (passwd) + query_str += "IDENTIFIED BY '{0}'".format(passwd) + elif authentication: + # need to validate authentication plugin + res = self.server1.exec_query(auth_str.format(authentication)) + if (res is None) or (res == []): + raise UtilDBError("Plugin {0} not loaded or not active. " + "Cannot create user.".format(authentication)) + query_str += "IDENTIFIED WITH '{0}'".format(authentication) if self.verbosity > 0: print query_str @@ -609,6 +626,15 @@ for grant_tuple in res: print grant_tuple[0] + def _get_authentication(self): + res = self.server1.exec_query("SELECT plugin FROM mysql.user " + "WHERE user='{0}' and host='{1}'" + "".format(self.user, self.host)) + if res == [] or res[0][0] == 'mysql_native_password': + return None + return res[0][0] + + def clone(self, new_user, destination=None, globals_privs=False): """Clone the current user to the new user @@ -632,7 +658,10 @@ # Create an instance of the user class. user = User(server, new_user, self.verbosity) if not user.exists(): - user.create() + # Get authentication plugin if different from native plugin + auth = self._get_authentication() + # Add authentication if available + user.create(authentication=auth) if globals_privs and '%' in row[0]: base_user_ticks = "'" + self.user + "'@'" + '%' + "'" diff -Nru mysql-utilities-1.6.3/mysql/utilities/common/utilities.py mysql-utilities-1.6.4/mysql/utilities/common/utilities.py --- mysql-utilities-1.6.3/mysql/utilities/common/utilities.py 2016-03-18 20:05:45.000000000 +0000 +++ mysql-utilities-1.6.4/mysql/utilities/common/utilities.py 2016-08-01 15:54:49.000000000 +0000 @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -541,3 +541,32 @@ return False return util_info['usage'] + + +def kill_process(pid, force=False, silent=False): + """This function tries to kill the given subprocess. + + pid [in] Process id of the subprocess to kill. + force [in] Boolean value, if False try to kill process with SIGTERM + (Posix only) else kill it forcefully. + silent[in] If true, do no print message + + Returns True if operation was successful and False otherwise. + """ + res = True + if os.name == "posix": + if force: + os.kill(pid, subprocess.signal.SIGABRT) + else: + os.kill(pid, subprocess.signal.SIGTERM) + else: + with open(os.devnull, 'w') as f_out: + ret_code = subprocess.call("taskkill /F /T /PID {0}".format(pid), + shell=True, stdout=f_out, stdin=f_out) + if ret_code not in (0, 128): + res = False + if not silent: + print("Unable to successfully kill process with PID " + "{0}".format(pid)) + return res + diff -Nru mysql-utilities-1.6.3/mysql/utilities/__init__.py mysql-utilities-1.6.4/mysql/utilities/__init__.py --- mysql-utilities-1.6.3/mysql/utilities/__init__.py 2016-03-18 20:05:45.000000000 +0000 +++ mysql-utilities-1.6.4/mysql/utilities/__init__.py 2016-08-01 15:54:49.000000000 +0000 @@ -1,5 +1,5 @@ # -# Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -18,7 +18,7 @@ """mysql.utilities""" # Major, Minor, Patch, Status -VERSION = (1, 6, 3, 'GA', 0) +VERSION = (1, 6, 4, 'GA', 0) # Future versions will have to include only the X, Y (no Z). VERSION_STRING = "%s.%s.%s" % VERSION[0:3] diff -Nru mysql-utilities-1.6.3/PKG-INFO mysql-utilities-1.6.4/PKG-INFO --- mysql-utilities-1.6.3/PKG-INFO 2016-03-18 20:44:47.000000000 +0000 +++ mysql-utilities-1.6.4/PKG-INFO 2016-08-01 16:26:18.000000000 +0000 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: mysql-utilities -Version: 1.6.3 +Version: 1.6.4 Summary: MySQL Utilities Home-page: http://dev.mysql.com Author: Oracle diff -Nru mysql-utilities-1.6.3/scripts/mysqldbcompare.py mysql-utilities-1.6.4/scripts/mysqldbcompare.py --- mysql-utilities-1.6.3/scripts/mysqldbcompare.py 2016-03-18 20:05:45.000000000 +0000 +++ mysql-utilities-1.6.4/scripts/mysqldbcompare.py 2016-08-01 15:54:49.000000000 +0000 @@ -54,7 +54,8 @@ add_character_set_option, add_ssl_options, get_ssl_dict, setup_common_options, - check_password_security) + check_password_security, + add_exclude, check_exclude_pattern) from mysql.utilities.common.server import connect_servers from mysql.utilities.common.sql_transform import (is_quoted_with_backticks, remove_backtick_quoting, @@ -141,13 +142,7 @@ default=False, help="check all databases") # Add the exclude database option - parser.add_option("-x", "--exclude", action="append", dest="exclude", - type="string", default=None, help="exclude one or more " - "databases from the operation using either a specific " - "name (e.g. db1), a LIKE pattern (e.g. db%) or a REGEXP " - "search pattern. To use a REGEXP search pattern for all " - "exclusions, you must also specify the --regexp option. " - "Repeat the --exclude option for multiple exclusions.") + add_exclude(parser, "databases", "db1", "db%") # Add compact option for resulting diff parser.add_option("-c", "--compact", action="store_true", @@ -229,6 +224,9 @@ print(WARN_OPT_ONLY_USED_WITH.format(opt='--regexp', used_with='the --exclude option')) + # Check for regexp symbols + check_exclude_pattern(exclude_list, opt.use_regexp) + db_idxes_l = None # Set options for database operations. diff -Nru mysql-utilities-1.6.3/scripts/mysqldbcopy.py mysql-utilities-1.6.4/scripts/mysqldbcopy.py --- mysql-utilities-1.6.3/scripts/mysqldbcopy.py 2016-03-18 20:05:45.000000000 +0000 +++ mysql-utilities-1.6.4/scripts/mysqldbcopy.py 2016-08-01 15:54:49.000000000 +0000 @@ -46,7 +46,8 @@ add_rpl_user, add_ssl_options, get_ssl_dict, setup_common_options, add_character_set_option, - check_password_security) + check_password_security, + add_exclude, check_exclude_pattern) from mysql.utilities.common.server import connect_servers from mysql.utilities.common.sql_transform import (is_quoted_with_backticks, remove_backtick_quoting) @@ -99,14 +100,7 @@ dest="do_drop") # Add the exclude database option - parser.add_option("-x", "--exclude", action="append", dest="exclude", - type="string", default=None, help="exclude one or more " - "objects from the operation using either a specific " - "name (e.g. db1.t1), a LIKE pattern (e.g. db1.t% or " - "db%.%) or a REGEXP search pattern. To use a REGEXP " - "search pattern for all exclusions, you must also " - "specify the --regexp option. Repeat the --exclude " - "option for multiple exclusions.") + add_exclude(parser) # Add the all database options add_all(parser, "databases") @@ -183,6 +177,9 @@ else: exclude_list = opt.exclude + # Check for regexp symbols + check_exclude_pattern(exclude_list, opt.use_regexp) + # Check multiprocessing options. if opt.multiprocess < 0: parser.error("Number of processes '{0}' must be greater or equal than " @@ -271,6 +268,7 @@ 'quiet': True, 'version': "5.1.30", } + servers = None try: servers = connect_servers(source_values, dest_values, conn_opts) src_sql_mode = servers[0].select_variable("SQL_MODE") @@ -333,6 +331,10 @@ db_entry = (orig_db, new_db) db_list.append(db_entry) + # Check databases for blob fields set to NOT NULL + if servers and dbcopy.check_blobs_not_null(servers[0], db_list): + sys.exit(1) + try: # Record start time. if opt.verbosity >= 3: diff -Nru mysql-utilities-1.6.3/scripts/mysqldbexport.py mysql-utilities-1.6.4/scripts/mysqldbexport.py --- mysql-utilities-1.6.3/scripts/mysqldbexport.py 2016-03-18 20:05:45.000000000 +0000 +++ mysql-utilities-1.6.4/scripts/mysqldbexport.py 2016-08-01 15:54:49.000000000 +0000 @@ -41,7 +41,7 @@ add_no_headers_option, add_regexp, add_rpl_mode, add_rpl_user, add_skip_options, add_verbosity, check_all, check_rpl_options, check_skip_options, check_verbosity, setup_common_options, - check_password_security, get_ssl_dict, + check_password_security, get_ssl_dict, add_exclude, check_exclude_pattern ) from mysql.utilities.common.server import connect_servers from mysql.utilities.common.sql_transform import (is_quoted_with_backticks, @@ -120,14 +120,7 @@ "or --export=both.") # Add the exclude database option - parser.add_option("-x", "--exclude", action="append", dest="exclude", - type="string", default=None, help="exclude one or more " - "objects from the operation using either a specific " - "name (e.g. db1.t1), a LIKE pattern (e.g. db1.t% or " - "db%.%) or a REGEXP search pattern. To use a REGEXP " - "search pattern for all exclusions, you must also " - "specify the --regexp option. Repeat the --exclude " - "option for multiple exclusions.") + add_exclude(parser) # Add the all database options add_all(parser, "databases") @@ -223,6 +216,9 @@ else: exclude_list = opt.exclude + # Check for regexp symbols + check_exclude_pattern(exclude_list, opt.use_regexp) + # Check multiprocessing options. if opt.multiprocess < 0: parser.error("Number of processes '{0}' must be greater or equal than " diff -Nru mysql-utilities-1.6.3/scripts/mysqlfailover.py mysql-utilities-1.6.4/scripts/mysqlfailover.py --- mysql-utilities-1.6.3/scripts/mysqlfailover.py 2016-03-18 20:05:45.000000000 +0000 +++ mysql-utilities-1.6.4/scripts/mysqlfailover.py 2016-08-01 15:54:49.000000000 +0000 @@ -1,6 +1,6 @@ #!/usr/bin/env python # -# Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -197,6 +197,29 @@ "values can be used separated by commas. The " "default is health.") + # Add connection timeout for C/Py connections + # + # Note: we do not set a default here as we want C/Py to host the + # default. Utilities need not control the default, rather, we only + # want to provide an option for the user to set it should she have + # need to tune for a particular failover scenario. See BUG#22932375 + # for more details. + parser.add_option("--connection-timeout", action="store", type="int", + dest = "conn_timeout", default = None, help = "set the " + "connection timeout for TCP and Unix socket " + "connections for all master, slaves, and candidate " + "slaves specified. Default is 10 as provided in the " + "Connector/Python module.") + + # Add master failover delay check + parser.add_option("--master-fail-retry", action="store", dest="fail_retry", + type="int", default=None, help="time in seconds to wait " + "to determine master is down. The failover check will " + "be run again when the retry delay expires. Can be used " + "to introduce a longer period between when master is " + "detected as unavailable to declaring it down. This " + "option is not used with --exec-fail-check. ") + # Add verbosity mode add_verbosity(parser, False) @@ -241,6 +264,14 @@ parser.error("Failover mode = 'elect' requires at least one " "candidate.") + if opt.fail_retry and opt.exec_fail: + parser.error("The --master-fail-retry option cannot be used " + "with --exec-fail-check.") + + if opt.fail_retry and opt.fail_retry < 1: + parser.error("The --master-fail-retry option must be a positive " + "integer > 0.") + # Parse the master, slaves, and candidates connection parameters try: master_val, slaves_val, candidates_val = parse_topology_connections( @@ -285,6 +316,7 @@ 'pidfile': opt.pidfile, 'report_values': opt.report_values, 'script_threshold': opt.script_threshold, + 'fail_retry': opt.fail_retry, } # Purge log file of old data diff -Nru mysql-utilities-1.6.3/unit_tests/test_server_version.py mysql-utilities-1.6.4/unit_tests/test_server_version.py --- mysql-utilities-1.6.3/unit_tests/test_server_version.py 1970-01-01 00:00:00.000000000 +0000 +++ mysql-utilities-1.6.4/unit_tests/test_server_version.py 2016-08-01 15:54:49.000000000 +0000 @@ -0,0 +1,41 @@ +# +# Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +""" +This files contains unit tests for parsing the server version. +""" +import unittest + +from mysql.utilities.common.tools import parse_mysqld_version + +version_list = [ + ("mysqld Ver 5.5.49 for Linux on x86_64 (Source distribution)", ('5','5','49')), + ("mysqld Ver 5.6.30 for Linux on x86_64 (Source distribution)", ('5','6','30')), + ("mysqld Ver 5.7.13-0ubuntu0.16.04.2 for Linux on x86_64 ((Ubuntu))", ('5','7','13')), +] + + +class TestServerVersion(unittest.TestCase): + + def test_valid(self): + for version in version_list: + result = parse_mysqld_version(version[0]) + frmt = u"{0}: was {1}, expected {2}" + msg = frmt.format(version[0], result, version[1]) + self.assertEqual(version[1], result, msg) + +if __name__ == "__main__": + unittest.main() diff -Nru mysql-utilities-1.6.3/unit_tests/test_utilities_console.py mysql-utilities-1.6.4/unit_tests/test_utilities_console.py --- mysql-utilities-1.6.3/unit_tests/test_utilities_console.py 2016-03-18 20:05:45.000000000 +0000 +++ mysql-utilities-1.6.4/unit_tests/test_utilities_console.py 2016-08-01 15:54:49.000000000 +0000 @@ -1,5 +1,5 @@ # -# Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -92,6 +92,28 @@ self.util_con._process_command_keys('BACKSPACE_WIN') self.assertEqual("123", self.util_con.cmd_line.command) + def test_arrow_delete(self): + """Test console response to using arrow keys and the + DELETE KEY when the cursor is in the end of the line. + """ + + self.util_con.cmd_line.command = "12345-123" + self.util_con.cmd_line.length = 9 + self.util_con.cmd_line.position = 9 + for i in range(0, 5): + self.util_con._process_command_keys('ARROW_LT') + self.assertEqual("12345-123", self.util_con.cmd_line.command) + self.util_con._process_command_keys('ARROW_RT') + self.assertEqual("12345-123", self.util_con.cmd_line.command) + self.util_con._process_command_keys('DELETE_POSIX') + self.assertEqual("12345123", self.util_con.cmd_line.command) + self.assertEqual(5, self.util_con.cmd_line.position) + self.assertEqual(8, self.util_con.cmd_line.length) + self.util_con._process_command_keys('DELETE_POSIX') + self.assertEqual("1234523", self.util_con.cmd_line.command) + self.assertEqual(5, self.util_con.cmd_line.position) + self.assertEqual(7, self.util_con.cmd_line.length) + def test_home_key(self): """Test console response to HOME KEY. """