Back to Browse

How to Enable Binary Logging for MySQL Server on Windows and Linux Machine - MySQL DBA Tutorial

11.9K views
Nov 25, 2018
22:04

The binary log contains a record of all changes ( CREATE, ALTER, INSERT, UPDATE and DELETE) to the databases, both data and structure. It consists of a set of binary log files and an index file which contains name of binary log files. The data is saved in binary format. Binary Log File in Windows: If Binary logs are enabled without providing the location for binary log file, then by default location for the binary log will be "C:\ProgramData\MySQL\MySQL Server 8.0\Data" and file name will be "HostName-bin.00000x". To make change for binary log file location and name , you can go to my.ini file on below path "C:\ProgramData\MySQL\MySQL Server 8.0", Look for # Binary Logging. log-bin="ProvideBinaryLogFileName-bin" Binary Log File in Linux: The default location for Binary log file for MySQL installed on Linux is /var/lib/MySQL. If you need to make changes to default location and binary file name, you can go to /etc/my.cnf file and update it. Read Binary Log File: To read binary log file in Windows, you need to go to bin folder where mysqlbinlog application exists and then use below command on cmd. mysqlbinlog -v binary-log-filename.00000X On Linux, you should be able to run the same command. mysqlbinlog is the program that is used to read the binary log file into more readable format. To follow step by step tutorial for MySQL DBA for beginner to Advance http://www.techbrothersit.com/2018/11/mysql-dba-tutorial-beginner-to-advance.html MySQL Logging Tutorial MySQL Workbench Tutorial MySQL DBA Certification Training MySQL DBA Tutorial Step by Step MySQL DBA Training online free MySQL Real Time DBA Tutorial MySQL Administration Course step by Step MySQL Tools for Development and Admin

Download

0 formats

No download links available.

How to Enable Binary Logging for MySQL Server on Windows and Linux Machine - MySQL DBA Tutorial | NatokHD