Skip navigation links
Showing entries 1 to 5

Tags Filter: binlog (reset)

Articles
Add to Favourites +2 Vote Up -0Vote Down
"There are 10 types of people in the world -- those who understand binary, and those who don't."The term "binary" in MySQL has many different meanings. How many can you come up with? I have 6, but I am willing to believe there are more!0) "Binary distribution" is the name for the package that contains a binary. Another use is "binary installation" but that's pretty much the same usage pattern as "binary distribution", so I won't count "binary installation" as
Articles
Add to Favourites +0 Vote Up -0Vote Down
So, you have a binlog. You want to find out something specific that happened inside of it. What to do? "mysqlbinlog" has some neat features, which I thought we would look at here. I should first explain what "mysqlbinlog" really is. It is a tool that lets you analyze and view the binlogs/relaylogs from mysql, which are stored in binary format. This tool converts them to plaintext, so that they're human-readable.For the first tip, let's start with the "--read-from-remote-server" option, which allows you to examine a binlog on a master server in order, perhaps, to dump it onto your slave and compare master/slave logs for potential problems*.$ mysqlbinlog --read-from-remote-server -uwesterlund -p mysql-bin.000001 -h 127.0.0.1 -P 3306 | head -5Enter password: /*!40019 SET @@session.max_insert_delayed_threads=0*/;/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;DELIMITER /*!*/;#  []
Articles
Add to Favourites +0 Vote Up -0Vote Down
Or, When MySQL Lies!When I do a "show slave status\\G", sometimes mysqld will lie to me and give me a wrong "Exec_Master_Log_Pos". Let me explain with a situation from last night.This is the output of "show slave status\\G" from mysql version 5.0.41-community-log:mysql> show slave status \\G*************************** 1. row *************************** Slave_IO_State: Waiting for master to send event Master_Host: XXX.XXX.XXX.XXX Master_User: replic_username Master_Port: 3306 Connect_Retry: 60 Master_Log_File: mysql-bin.000480 Read_Master_Log_Pos: 690470773 Relay_Log_File: db2-relay-bin.000028 Relay_Log_Pos: 683977007 Relay_Master_Log_File: mysql-bin.000480 Slave_IO_Running: Yes Slave_SQL_Running: No  []
Articles
Add to Favourites +4 Vote Up -0Vote Down
There is a cool option for mysqlbinlog for disabling the binary log when doing recovery using binary logs, namely --disable-log-bin. There are various ways for doing this.
Articles
Add to Favourites +3 Vote Up -0Vote Down
The title says it all, and the explanation is very interesting. The consequences of disabling binlog due to lack of storage are catastrophic. Entertaining and worrying at the same time.
Showing entries 1 to 5