Questions tagged [binary-log]
40 questions
36
votes
2 answers
How do i run a query in MYSQL without writing it to the binary log
I want to run an import of a large file into MySQL. However, I don't want it written to the binary log, because the import will take a long time, and cause the slaves to fall far behind. I would rather run it seperately on the slaves, after the…

Kibbee
- 65,369
- 27
- 142
- 182
18
votes
4 answers
Is it safe to delete rotated MySQL binary logs?
I have a MySQL server with binary logging active. Once a day logs file is "rotated", i.e. MySQL seems to stop writing to it and creates and new log file. For example, I currently have these files in /var/lib/mysql
-rw-rw---- 1 mysql mysql 10485760…

Milan Babuškov
- 59,775
- 49
- 126
- 179
14
votes
4 answers
How to compute log base 2 using bitwise operators?
I need to compute the log base 2 of a number in C but I cannot use the math library. The answer doesn't need to be exact, just to the closest int. I've thought about it and I know I could just use a while loop and keep dividing the number by 2 until…

SKLAK
- 3,825
- 9
- 33
- 57
12
votes
3 answers
MAMP Mysql Error - Failed to open log
I've been working with a MAMP installation for several weeks now, and when I started it up today it would not start. No mysql process was running so I checked the error log which shows the following when I start the server:
130826 14:19:55…

Johannes
- 6,232
- 9
- 43
- 59
10
votes
2 answers
MySQL replication for fallback scenario
When I have two mysql servers that have different jobs (holding different databases) but want to be able to use one of them to slip in when the other one fails, what would you suggest how I keep the data on both of them equal "close to realtime"?…

BlaM
- 28,465
- 32
- 91
- 105
10
votes
4 answers
The ultimate MySQL legacy database nightmare
Table1:
Everything including the kitchen sink. Dates in the wrong format (year last so you cannot sort on that column), Numbers stored as VARCHAR, complete addresses in the 'street' column, firstname and lastname in the firstname column, city in the…

Mike Trader
- 8,564
- 13
- 55
- 66
7
votes
0 answers
How to filter output of "SHOW BINLOG EVENTS"
Without talking about master/slave replication, I just want to customize which entries I see when querying the MySQL Binary-Logs with SHOW BINLOG EVENTS. Already tried to find the same information in information_schema and performance_schema so that…

AdrienW
- 3,092
- 6
- 29
- 59
5
votes
2 answers
mysqlbinarylog - uniqueness of table_id in TABLE_MAP_EVENT
I am trying to manually decode the mysql binary log ROW format. Every update/insert/delete event is preceeded by an TABLE_MAP_EVENT.
This event contains a table_id. I am using this id to build up an cache for the column definition of this table.…

bjoernhaeuser
- 407
- 5
- 11
4
votes
1 answer
MySQL binlog_expire_logs_seconds not working
I have configured the database using SET GLOBAL binlog_expire_logs_seconds = 259200; query to purge binary logs older then 3 days. Using MySQL 8.0.22. This does not seem to have any effect. bin logs are accumulating under…

rubenhak
- 830
- 2
- 10
- 28
3
votes
4 answers
how to exclude some tables from being binlogged in mysql?
I need to exclude some files from being logged in the binary log to avoid wasting my network bandwidth and time on replication of caching tables.
i know there is
[mysqld]
binlog-ignore-db=DB_TO_BE_SKIPPED
how can i do so for specific tables…

Alaa
- 4,471
- 11
- 50
- 67
3
votes
1 answer
what is the difference between master binary log and slave binary log in MySQL? How can I achieve same binary logs on both servers?
I have master and slave servers. Replication done. Now I did follow the below steps on both servers.
mysql> show binary logs;
+------------------+-----------+
| Log_name | File_size |
+------------------+-----------+
| mysql-bin.000001 | …

Vasantha Kumar G
- 33
- 9
3
votes
4 answers
MySQL binary log location Windows 2008 Server
I'm running a Windows 2008 Server with IIS, PHP and MySQL. MySQL is installed as a service. There's software on the server that uses a database that I need good backups of, including transaction logging. I've turned on Binary Logging via setting…

Rich Hewett
- 31
- 1
- 4
3
votes
1 answer
Create hamming distance function in mysql without super privilege
I would like to use the hamming distance in my MySQL database (used over phpMyAdmin) but did not succeed in creating the function with the code given here.
I'm refering to this code:
CREATE FUNCTION HAMMINGDISTANCE(
A0 BIGINT, A1 BIGINT, A2 BIGINT,…

olenska
- 31
- 2
2
votes
1 answer
MySQL binary log timestamps non sequential?
I do have a binary log dump here from MySQL 5.5.20 (row based). Now my slave stopped because the UPDATE event is before the INSERT event:
5424240-SET TIMESTAMP=1327402568/*!*/;
5424241-BEGIN
5424242-/*!*/;
5424243-# at 25715325
5424244-# at…

Steven Van Ingelgem
- 872
- 2
- 9
- 25
2
votes
2 answers
Does MySQL binary log support logging Uid's?
I would like to know if it's possible using MySQL Binary Log to record Uid's (usernames) of the users who make modifications to the DB.
This is necessary for the audit purpose.
Is that possible?

SharpAffair
- 5,558
- 13
- 78
- 158