Questions tagged [binlog]

60 questions
23
votes
2 answers

What is binlog in mysql?

I've set mysql parameter innodb_flush_log_at_trx_commit=0. It means that mysql flushes transactions to HDD 1 time per second. Is it true that if mysql will fail with this flush (because of power off) i will lose my data from these transactions. Or…
SerjKol
12
votes
6 answers

MySQL Binary Log Replication: Can it be set to ignore errors?

I'm running a master-slave MySQL binary log replication system (phew!) that, for some data, is not in sync (meaning, the master holds more data than the slave). But the slave stops very frequently on the slightest MySQL error, can this be disabled?…
mauriciopastrana
  • 5,010
  • 7
  • 35
  • 36
10
votes
2 answers

Want to do an incremental backup for mongodb. Journaling? Oplog?

I want to daily backups for a single mongodb database, probably with mongodump. To not lose any data, I would like this to be incremental so if something goes wrong in the middle of the day, I need to be able to replay changes for that day up til…
Alex Lopatin
  • 965
  • 2
  • 7
  • 8
7
votes
4 answers

Searching MySQL Bin Log for a Query

Is it possible to query the mysql bin log for a particular query? For example, suppose I want to know if anyone in the last hour did a specific query (like 'Update tableX where userName = 'bob'"). I just want to see if a particular query has been…
David
  • 407
  • 3
  • 8
  • 13
7
votes
3 answers

Binlog MySQL Replication is a "Bag of Hurt". Are there any good alternatives?

I've honestly tried this left and right and still find that my mirror server, set up as a replication slave still lags behind. My app's user base keeps growing and now Ive reached the point where I can't keep "shutting down" to "resync" databases…
mauriciopastrana
  • 5,010
  • 7
  • 35
  • 36
6
votes
1 answer

Slow insert and update commands during mysql to redshift replication

I am trying to make a replication server from MySQL to redshift, for this, I am parsing the MySQL binlog. For initial replication, I am taking the dump of the mysql table, converting it into a CSV file and uploading the same to S3 and then I use the…
5
votes
1 answer

MySQL - Is there a way to include the bin log position in the dump file without scripting

Is there a way to include the replication bin log position in the dump file without scripting? I know there are ways through scripting, appending a line to the dump file etc. But I remember once reading that it's possible through a simple argument…
Jake Armstrong
  • 569
  • 4
  • 21
5
votes
2 answers

Reading mongoDB Binlogs

In mysql I debug how a record has changed by doing mysqlbinlog bin-88.log | grep "record-id" --before=2 --after=2 How do I do something similar with mongo? Thanks!
Prasanna
  • 735
  • 7
  • 10
4
votes
1 answer

why issue 'reset master' when resyncing a mysql slave

Ive recently needed to perform some DB resync's and have a question regarding (what appears to be) the common practice of issuing a 'RESET MASTER' before dumping the DB on the master. Just about all of the documentation i have found surrounding this…
Mark V
  • 185
  • 2
  • 9
4
votes
1 answer

Gather ID of mysql table

Currently working on a binary log parser, that reads out the binary log written by a mysql database to write and convert changes into a MongoDB. This way I want to create "materialized views" transformed into Json to use that for further processing.…
MatthiasLaug
  • 2,924
  • 6
  • 28
  • 43
3
votes
0 answers

MySQL: programatically get list of binlog files

How can I programatically get a list of a particular mysql instance's binlogs? ie. the same information provided by mysql> show binary logs; update: version 5.6 / AWS Aurora preferred.
Mark Harrison
  • 297,451
  • 125
  • 333
  • 465
3
votes
1 answer

How to understand the timestamp in the mysql binlog?

the binlog always looks like this: #140105 18:49:33 server id 2 end_log_pos 354 Query thread_id=1 exec_time=0 error_code=0 SET TIMESTAMP=1388918973/*!*/; /* some SQL statement */ /*!*/; The illustration from the official site is…
welkinwalker
  • 2,062
  • 3
  • 18
  • 21
3
votes
1 answer

Is it possible to use the binlog from 1 schema and use mysqlbinlog to send them to another schema?

Each night we run mysqldump from production and dump it to another schema to use as a test or development server, on the same server. As the databases grow it is taking much of the night to finish. I'm trying to think of a way to speed this up. …
Jeff Viola
  • 31
  • 2
2
votes
0 answers

mysql-binlog-connector-java - Could not find first log file name in binary log index file

I am doing a POC on this library, and I am having some difficulties setting it up. I have an extremly simple MySQL setup: - a single VM (no master-slaves) - centos 7 - MySQL version 5.7 Here is the code I have until now: public static void…
SockworkOrange
  • 355
  • 4
  • 14
2
votes
3 answers

Using python Django and Mysql. Data won't inserted into MySQL due to Binlog

When I use django to design a website and delopy, I find I have some trouble if I use MySQL that the Binlog is activate( format:STATEMENT). There are my settings for this deployment: Django based website uwsgi Ningx MySQL The first step, I need…
Derek
  • 21
  • 3
1
2 3 4