I want to have my database safer by using redo logfiles.
I read some articles about it online, but I have no idea where to start using this.
Where and how can I configure this?
Asked
Active
Viewed 65 times
0

Webdeveloper_Jelle
- 2,868
- 4
- 29
- 55
-
1You might be misunderstanding what a redo log is. MySQL is using a redo log file anyway, it's a fundamental part of data integrity. (Well, technically you can disable it, but don't, because, well, remember the "fundamental part of data integrity"-part?). Do you maybe mean "replication" (mirroring/...), which would allow you to keep a just-in-time-backup of your data (in addition to regular backups). An integral part (not enabled by default) is ["binary logging"](https://dev.mysql.com/doc/refman/8.0/en/binary-log.html), which you might mix up with redo log. – Solarflare Dec 27 '22 at 17:06
-
In general though, questions about how the server (technically) works, how to configurate it to your liking, how to setup a backup strategy, how to make it safer (or if you need to make is safer), ... probably fit better on the [dba stackexchange](https://dba.stackexchange.com/). – Solarflare Dec 27 '22 at 17:07
-
@Solarflare well my colleague told me I should research how to use redo logs with mysql. I couldn't find anything. If your telling me its already using it, how does it work then? How can I access these logs to reset the data to that backup? – Webdeveloper_Jelle Dec 28 '22 at 12:26
-
See [Redo Log](https://dev.mysql.com/doc/refman/8.0/en/innodb-redo-log.html). If the server crashes at a bad time, MySQL uses this *itself* to fix the data. You usually don't do anything with it yourself (maybe except set its size). As I said, what I think you *might* be looking for is e.g. [Point-in-Time Recovery Using Binary Log](https://dev.mysql.com/doc/refman/8.0/en/point-in-time-recovery-binlog.html), so using the *binary log* to replay ("redo"?) anything that happened since the last backup. You have to enable and use it yourself. But I don't know if it's what your colleague meant. – Solarflare Dec 28 '22 at 13:59