When I try to view a binary log file on my Free BSD server (/var/lib/mysql/ib_logfile0) with mysqlbinlog using the following command:
I get the error "File is not a binary log file."
$ sudo mysqlbinlog -f ib_logfile0 > ib_0.sql
After that, ib_0.sql contains:
{ /*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
DELIMITER /*!*/;
ERROR: File is not a binary log file
}
I've verified that it is a binary file and I have read there is a possibility that file is an innodb log file. Anyway, I can't read that file and I don't find any solution. Is there another way to view this file?
You can use mysqlbinlog to read binary log files directly and apply them to the local MySQL server. You can also read binary logs from a remote server by using the --read-from-remote-server option. To read remote binary logs, the connection parameter options can be given to indicate how to connect to the server.
Enabling the binary logs MySQL binary logs can be enabled or disabled by adding or removing the log-bin configuration option. The log-bin parameter is in the configuration files named my. ini. When we install MySQL Server, the configuration file is created in C:\ProgramData\MySQL\MySQL Server 8.0 directory.
The transaction log in MySQL is not enabled by default and must be enabled in order to log transactions. To determine if the transaction log is active you can use the “show binary logs” statement: SHOW BINARY LOGS; If binary logging is disabled you will receive an error stating “you are not using binary logging”.
The binary log is a set of log files that contain information about data modifications made to a MySQL server instance. The log is enabled by starting the server with the --log-bin option. The binary log was introduced in MySQL 3.23. 14. It contains all statements that update data.
Same question here - but I found an answer. These are transaction logs, not query logs, that are not for human consumption.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With