Questions tagged [binlog]

60 questions
2
votes
1 answer

Why mysqlbinlog utility displays two values instead of one?

I am trying investigate something in binlog by mysqlbinlog utility. When I add verbose parameter -vv I see INSERT query with this part @2=-27170 (38366) /* SHORTINT meta=0 nullable=0 is_null=0 */ Does any one know why are there two numbers? What…
howkey
  • 21
  • 3
2
votes
1 answer

How to get all the MySQL binlog event info using T-SQL

I am researching the possibility to log all the changes made to a MySQL database including DDL statements that may occur and use that information so it can be synchronized with a remote database. The application itself is written in C# so the best…
flipm0de
  • 183
  • 1
  • 10
2
votes
1 answer

How can I perform multi-table delete in safe mode with binary logging enabled?

Let's pretend, that I have following data structure: DROP TABLE IF EXISTS `A`; DROP TABLE IF EXISTS `B`; DROP TABLE IF EXISTS `C`; CREATE TABLE IF NOT EXISTS `C` ( `ID_C` INT UNSIGNED NOT NULL AUTO_INCREMENT, …
BlitZ
  • 12,038
  • 3
  • 49
  • 68
2
votes
3 answers

How can I use the TRUNCATE sentence avoiding MySql to write it into the binlog?

It seems MySQL does not support the flag "NO_ WRITE_ TO_ BINLOG" for TRUNCATE. So I have to wait until delay is 0, then stop the replication, make the TRUNCATE of the table/s, reset the master, and then start replication again. Really painful. Any…
Lucas
2
votes
1 answer

Mysql: When exactly an event is logged in the binary log on the master

When exactly an event on the master(update/insert/alter) is logged on the binary log ? When it started on the master server, it will be written to the bin log When it started and completed on the master, then will be logged In specific, I would…
Uday
  • 1,480
  • 4
  • 27
  • 44
1
vote
1 answer

When are mysql save a new binlog file?

I'm developing 1 java application to reading a binlog file to catch query event. Everything would be fine without exception. But what will happen if my application was crashed, i will miss many event to from my database. So i wondering when mysql…
1
vote
2 answers

Can MySql binlog have more than one open transaction?

Can MySql binlog have more than one open transaction at the same time (= events of different transactions are interleaved in binlog) ? There is XID event that contains transaction ID but there is no event that denotes beginning of transaction and…
expert
  • 29,290
  • 30
  • 110
  • 214
1
vote
0 answers

Debezium reads binlog newest if offset storage is empty or just created&

I am running reading binlogs with Debezium, but when I start new reading thread it reads all create statements for table from the beginning, but I dont need them(op=c). I need to handle create/update/delete events that happens after I run code first…
Dima Dehtiarov
  • 95
  • 1
  • 10
1
vote
0 answers

How to let Debezium switch to next binlog automatically

In my project, Debezium still pointing on the same binlog, he doesn't switch to the next binlog. I have always to restart the connector debezium so he can read from the current binlog. How can I let debezium do this automatically please ?
1
vote
2 answers

How to let debezium start reading binlog from the last row

I'm trying to let Debezium start reading the binlog from the bottom of the file directly. Could someone help in this matter please ?
1
vote
1 answer

How can i listen MySQL database changes in real time with Node.js or PHP

I need to create a system with multiple databases one of this is the master database this database need to replicate only structural changes to other databases for example: When I register a new user in the system, the system creates automatically a…
Brayan Caldera
  • 2,001
  • 2
  • 11
  • 20
1
vote
0 answers

how to recover mysql data without binary logs

I wanna recover some data that were deleted by accident, but mysql binary log is off. no bin-log file for recovering the history data. is there any other approach to solve the problem ?
1
vote
0 answers

converting mysql binlogs to text format without using mysqlbinlog tool

I need to convert the mysql binlogs to text format in PHP script. I am aware of using mysqlbinlog tool to convert it to text. But I am not supposed to run any system commands(or any shell command) in my script. Is there any other way to do it using…
Ahalya Hegde
  • 1,571
  • 2
  • 18
  • 41
1
vote
2 answers

Expire bin log in minutes

In the mysql conf file my.cnf, I want to add expiry time for the bin-logs. After doing a quick research on that, I got to know how to set it for days.i.e., expire_logs_days=3. I want to set the expiry time for every 5 minutes. Is it possible ? How…
Shashi kumar S
  • 873
  • 3
  • 10
  • 21
1
vote
1 answer

MySQL - Find bin log position based on timestamp

I am using shyiko connector to stream bin log changes from a mysql cluster to downstream database systems. A cluster = MySQL master + Primary slave + Secondary slave When the listening MySQL system goes down for whatever reason, the mechanism is to…
Greedy Coder
  • 1,256
  • 1
  • 15
  • 36