1. Executable programs or shell commands

Enter a Linux command to search for:

FBMYSQLBINLOGROTATE

Section: MySQL Utilities (1)
Updated: 01/14/2017
Index  |  Return to Main Contents
 

NAME

mysqlbinlogrotate - Binary log rotate utility  

SYNOPSIS

mysqlbinlogrotate [options] --server
 

DESCRIPTION

This utility rotates the binary log by closing the active binary log file and opening a new binary log file.

The user must provide the server connection parameters with the --server option.

The user can also use the --min-size option to conditionally rotate the active binary log file only if the file size exceeds the specified value in bytes. OPTIONS.PP mysqlbinlogrotate accepts the following command-line options:

• --version

Shows the program's version number.

• --help

Displays the help message.

• --server=server_connection

Connection information for the server.

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.

• Use login-paths from your .mylogin.cnf file (encrypted, not visible). Example : login-path[:port][:socket]

• Use a configuration file (unencrypted, not visible) Note: available in release-1.5.0. Example : configuration-file-path[:section]

• Specify the data on the command-line (unencrypted, visible). Example : user[:passwd]@host[:port][:socket]

• --ssl

Specifies if the server connection requires use of SSL. If an encrypted connection cannot be established, the connection attempt fails. By default 0 (SSL not required).

• --ssl-ca

The path to a file that contains a list of trusted SSL CAs.

• --ssl-cert

The name of the SSL certificate file to use for establishing a secure connection.

• --ssl-key

The name of the SSL key file to use for establishing a secure connection.

• --min-size=min-size

Rotate the active binary log file only if the file size exceeds the specified value in bytes.

• --verbose, -v

Specify how much information to display. Use this option multiple times to increase the amount of information. For example, -v = verbose, -vv = more verbose, -vvv = debug.

NOTES.PP By default, the utility rotates only the active binary log file, but for MySQL Server versions prior to 5.5.3, other log files (i.e, error log, relay log, slow log) are also rotated.

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 permits 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 the new filename.

shell> mysqlbinlogrotate --server=root:root@localhost:3310 -v
# Checking user permission to rotate binary logs...
#
# Active binlog file: 'mysql-bin.000002' (size: 32054 bytes)
# The binlog file has been rotated.
# New active binlog file: 'mysql-bin.000003'

Rotate the active binary log file only if his size exceeds 1GB (1073741824 bytes) and display new filename.

shell> mysqlbinlogrotate --server=root:root@localhost:3310 \
          --min-size=1073741824 -v
# Checking user permission to rotate binary logs...
#
# Active binlog file: 'mysql-bin.000002' (size: 1610612736 bytes)
# The binlog file has been rotated.
# New active binlog file: 'mysql-bin.000003'

PERMISSIONS REQUIRED.PP By default, the user used to connect to the server must have permissions to rotate the binary logs, more precisely the SUPER and REPLICATION SLAVE privileges are required.  

COPYRIGHT


Copyright © 2006, 2017, Oracle and/or its affiliates. All rights reserved.

This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.

This documentation 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 the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/.

 

SEE ALSO

For more information, please refer to the MySQL Utilities and Fabric documentation, which is available online at http://dev.mysql.com/doc/index-utils-fabric.html  

AUTHOR

Oracle Corporation (http://dev.mysql.com/).


 

Index

NAME
SYNOPSIS
DESCRIPTION
COPYRIGHT
SEE ALSO
AUTHOR

Return to Main Contents

Close

Search

Close

Share

Close

Dialog