Questions tagged [binlog]
122 questions
152
votes
4 answers
Is it safe to delete mysql-bin files?
I have MM Replication in mysql, and I want to squeeze some free space in the box be deleting unnecessary files, I came across these mysql-bin files inside /var/db/mysql/ There are hundreds of those files like mysql-bin.000123, mysql-bin.000223 etc.…
user18530
79
votes
6 answers
Disable MySQL binary logging with log_bin variable
Default MySQL config file /etc/mysql/my.cnf installed by some debian package using APT often set log_bin variable, so binlog are enabled:
log_bin = /var/log/mysql/mysql-bin.log
When I want to disable binary logging on such installation, comment out…
Nicolas Payart
- 2,508
- 5
- 28
- 36
31
votes
2 answers
What is the safest way to switch the binlog format at runtime?
Because of the following warning in mysqld.log:
[Warning] Unsafe statement written to the binary log using statement
format since BINLOG_FORMAT = STATEMENT. The statement is unsafe
because it uses a LIMIT clause. This is unsafe because the set…
quanta
- 1,006
- 9
- 22
- 36
22
votes
1 answer
How soon after updating expire_logs_days param and restarting sql will old binlogs get deleted?
MySQL 5.1.x | InnoDB | Windows
My mysql data directory is starting to fill up with bin logs.
I currently have the following settings configured in my windows mysql server:…
Mike B
- 617
- 4
- 10
- 17
19
votes
5 answers
Why do the MySQL bin log files still exist after a purge or flush?
I've used PURGE BINARY LOGS as well as FLUSH LOGS, but the mysql directory still contains these files:
mysql-bin.000025
mysql-bin.000024
mysql-bin.000023
mysql-bin.000022
mysql-bin.000021
mysql-bin.000020
mysql-bin.000019
mysql-bin.index
Is there a…
lamp_scaler
- 293
- 1
- 2
- 4
12
votes
2 answers
MySQL binary logs - skip a table
Is there a way to skip a specific table in the binary logs?
I've got binary logs configured as my incremental backup strategy between nightly backups. But we have one huge reference table that we're going to update nightly from a batch process (70GB…
David Parks
- 551
- 3
- 6
- 13
9
votes
2 answers
How do I make binlog-format=ROW the start up default in the /etc/my.cnf file?
I can run the query SET GLOBAL binlog_format = 'ROW' and it works for that session.
How do I make this setting stick after stopping and restarting MySQL?
NOTE: I am on version 5.5.19 of MySQL (with Moodle) and I just upgraded from MyISAM to InnoDB…
Constance
- 91
- 1
- 1
- 3
7
votes
2 answers
enabling BINARY LOG on AWS RDS MySQL
Context
I am trying to enable BINARY LOGs on a MySQL RDS instance.
Issue
I used CALL mysql.rds_set_configuration('binlog retention hours', 24) without encountering an error.
And using CALL mysql.rds_show_configuration says "binlog retention hours"…
Hugo
- 171
- 1
- 1
- 3
7
votes
2 answers
MySQL - Binary Log File size growing more than the maximum limit
I have a MySQL 5.7 running on a Centos 6. I enabled Binary Logging and didn't provide any custom value for the maximum size of Binary Log in my configuration file. By default, the parameter max_binlog_size = 1073741824 which is equivalent to 1GB.…
Yashwanth Aluru
- 183
- 1
- 1
- 8
6
votes
2 answers
Binlog has bad magic number
I keep getting this error whenever I start MySQL.
121028 1:38:55 [Note] Plugin 'FEDERATED' is disabled.
121028 1:38:55 InnoDB: The InnoDB memory heap is disabled
121028 1:38:55 InnoDB: Mutexes and rw_locks use Windows interlocked functions
121028…
laggingreflex
- 162
- 1
- 5
6
votes
1 answer
MySQL Exec_Master_Log_Pos value greater than Read_Master_Log_Pos
I am trying to repair one MySQL replication setup. One of the database's table at slave side is deleted and the updates from master side are received but because of missing table these updates are not written to the database. This setup is not…
V R Murthy Korimilli
- 71
- 1
- 2
- 5
6
votes
3 answers
Maximum overall size of MariaDB binary logs
I am looking for a way to prevent MariaDB binary logs from taking a huge size when they grow faster than usual.
variable max_binlog_size set the maximum size of ONE binary logfile.
variable expire_log_days set the number of days after which the…
Nicolas Payart
- 2,508
- 5
- 28
- 36
6
votes
3 answers
MySQL replication slave hangs after encountering SET @@SESSION.GTID_NEXT= 'ANONYMOUS';
I recently installed two identical default installations of MySQL 5.7 under Ubuntu Server 16.04, and configured them to do a binary log replication. Until now this has been working fine, but suddenly the replication stops continuing and the slave…
mauritslamers
- 163
- 1
- 4
6
votes
3 answers
In MySQL, how exactly does data flows from query to disk?
I would like to have clarity on how exactly data flows from the the time of firing a query till it goes to disk. (I have rough idea it will go to buffers, then to redo logs then disk files) but then how about bin_log_cache is used.
I have googled…
AnonDude
- 71
- 1
- 5
5
votes
2 answers
pt-table-checksum and row-based replication
The set up I work with is MySQL 5.5 in a master-slave replication configuration, but we have to use "MIXED" replication (statement and row-based) because we use an application that requires it, and it happens to be on our same server.
We had…
dmgig
- 291
- 1
- 4
- 10