FBMYSQLBINLOGROTATESection: MySQL Utilities (1)
Index | Return to Main Contents
NAMEmysqlbinlogrotate - Binary log rotate utility
- mysqlbinlogrotate [options] --server
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:
Shows the program's version number.
Displays the help message.
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]
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).
The path to a file that contains a list of trusted SSL CAs.
The name of the SSL certificate file to use for establishing a secure connection.
The name of the SSL key file to use for establishing a secure connection.
Rotate the active binary log file only if the file size exceeds the specified value in bytes.
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.
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'
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 ALSOFor 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
AUTHOROracle Corporation (http://dev.mysql.com/).
Return to Main Contents