Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

To replay a MySQL binary log manually, inspect the required event range and pipe mysqlbinlog output into the mysql client: mysqlbinlog binlog_files | mysql -u root -p. The safe starting point is the source log file and position recorded with the consistent snapshot that your replica already contains. Stop normal replication appliers before replaying into a configured replica, review transaction boundaries, and validate coordinates and application data afterward.

What manual binary-log replay does

MySQL writes committed changes to binary-log files. The mysqlbinlog utility reads those files and emits statements or event representations that the mysql client can execute on a target server. Oracle’s MySQL 8.4 Reference Manual describes the recovery pattern as processing mysqlbinlog output with the mysql client.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Manual replay is useful when you need to apply a precisely bounded range, recover after a damaged or missing replication interval, bring a restored server forward from a known snapshot, or work while the normal source connection is unavailable. It is not a substitute for a consistent snapshot: replaying the wrong range, replaying against a different dataset, or allowing two appliers to run concurrently can permanently diverge the replica.

Before you run anything

Confirm the topology and version

The commands in this guide target the MySQL 8.4 Reference Manual syntax retrieved on October 15, 2026. Privilege names and replication statements can differ on older releases, so check the exact server version in production before execution.

#1 Best Overall
Sale
Compressed Air Duster,130000RPM Super Power Cordless Air Duster,Rechargeable Brushless Blower,3 Gear Adjustable Blower with LED Light,Dust Remover for Computer/House/Outdoor/Car
  • Powerful Turbo Fan:CAGIWIRU Electric Air Duster have reached speed up to 130000RPM,Can efficient remove dust and debris.With LED light and Three Adjustable Speed to meet with different cleaning tasks.
  • With Attached USB C Fasting Charging cable.Charing 3 hours,Enjoy up to 240 minutes of use on the lowest setting, For third speed can use for 25mins.with four charging options to meet with your needs.
  • Wide Application:Upgraded attached 5 different nozzles,making it suitable for a variety of scenes, such as car,pet, pc, keyboards, and other electronic devices. It also serves for office and home clean duster.
  • Handy Design & Portable:Cordless air duster electric nozzle is Light weight and small size, design and comfortable to hold and space saving, convenient to carry around. You can put it in your room or inside the car without taking up space.
  • Warranty & Support: Our Electric air duster comes with 5 years warranty and 24/7 customer service. During this period, if you have any questions,pls kindly feel free to contact us.
  • Binary logging must be enabled on the source that produced the files.
  • Every server in the topology must have a unique, nonzero server_id.
  • Decide whether the topology uses file-and-position replication or GTIDs. Do not mix GTID auto-positioning with file and position options.
  • Identify whether the files are local to the host running mysqlbinlog or must be streamed from the source.

Have a matching snapshot and coordinate

Start from a consistent snapshot or dump of the replica’s data. Record the source binary-log file and position that correspond to that snapshot. Those coordinates define the first source events that can be applied safely; a position copied from a different dump or taken after unrelated changes is not a valid starting point.

Keep the original snapshot, binary-log files, command lines, standard output, error output, and replication status. These records let you prove what was applied and are essential if you later need to reconstruct a failed operation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Stop competing appliers

If the target is already configured as a replica, stop or isolate its normal receiver and applier threads before manual replay. Two appliers changing the same tables at the same time can interleave transactions, produce duplicate changes, or leave the metadata coordinates inconsistent with the data. Use a maintenance window or an isolated clone whenever possible.

Check privileges

The account that executes generated binary-log statements needs BINLOG_ADMIN (or the deprecated SUPER privilege). An account with REPLICATION_APPLIER may be used when it also has every privilege required by the individual events being replayed. A missing privilege can stop a stream partway through a transaction, so verify permissions before starting a long range.

Understand file and position coordinates

A binary log is a sequence of files such as binlog.000123. Each file contains events at byte positions. A file-position replica records both values, while a GTID replica identifies transactions by global transaction identifiers.

For file-position replication, SOURCE_LOG_POS=4 represents the start of events in a binary-log file. The position recorded with your snapshot, rather than an arbitrary position or the end of the file, determines where replay must begin. If you select a bounded range, make sure the range starts and ends at deliberate event-group or transaction boundaries.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Do not assume that a visually interesting row event is a safe stopping point. A transaction may contain table-map, row, and commit events; stopping in the middle can leave the target in an invalid state. Review the surrounding events and use a complete transaction boundary whenever you can.

Rank #2
EVEO® Screen Cleaner Spray Kit (Streak-Free) TV Screen Cleaner for Smart TV, Lcd, LEd, Oled | Computer Screen Cleaner Spray and Wipe Microfiber Cloth - TV, Monitor, Laptop, iPad, Car - 6.7oz 1 Pack
  • Screen Cleaner is Your Screen’s New Bestfriend! - EVEO is proud to present a screen cleaner that’s perfectly suited for your TV. Meet your new screen cleaner, computer screen cleaner, laptop cleaner, iPad cleaner, Macbook,tv cleaner or any other electronic device. Our screen cleaner spray and wipe along with the included plush microfiber cloth, easily removes dust, fingerprints & other smudges on the screen’s surface. Clean effectively for a streak-free screen
  • Gentle on your Screens - Our screen cleaner spray and wipes is compatible to be used even for the most sensitive LCD, LED, CRT, and OLED screens in proper use. Be at ease knowing that this product is compatible with all the major brands: LG, SONY, Samsung, Sharp, iPad, iPhone, Android screens, Kindle, PC monitors - we’ve got you covered! Can be used as LCD screen cleaner, tv cleaner, smart tv screen cleaner, and more
  • Premium Super Soft Plush Microfiber Cloth - Included in this efficient screen cleaning kit. This screen cleaner spray and wipe has our signature plush microfiber cloth specially designed to comply with screens and monitors and leave them streak-free. Has been shown to effectively absorbs stubborn stains, zero streaks, and no fiber shedding. Always use this together with our screen cleaner for the best results
  • Easy-to-Use Screen Cleaner Kit + microfiber cleaning cloth - The EVEO Screen Cleaning Kit will easily be your new favorite tool when it comes to taking care of the things you love most, quick and easy solution for a streak-free screen. Simply screw on the sprayer gun on the screen cleaner bottle. Spray the cleaning liquid onto the microfiber cloth, then wipe the screen until desired cleanliness & shine is achieved.
  • Quality Screen Care Kit Worth Purchasing - Enjoy a convenient Screen Cleaner anytime, anywhere you need it. Your satisfaction is our top priority. We stand behind the quality of our products and that’s why, you shouldn’t be worrying at all. We manufacture the Best Screen Cleaner. and can be used for laptop cleaning kit, laptop screen cleaner, tv screen cleaner for smart tv. MacBook screen cleaner, monitor cleaner or screen cleaner spray for electronic devices with microfiber cleaning cloth

Inspect the binary log before applying it

Inspection separates readable diagnostics from the representation that must actually be executed. For row-based logs, decode rows and request verbose output:

mysqlbinlog --base64-output=DECODE-ROWS --verbose 
  --start-position=START_POS --stop-position=STOP_POS binlog.000123 | less

The output helps you identify database names, table-map events, row operations, transaction markers, and positions. Decoded row text is for human review; it is not the input you should copy and edit manually. The actual replay should use the original event representation generated by mysqlbinlog.

Check that the file name, start coordinate, end coordinate, source server, and transaction sequence match the snapshot and incident notes. If the inspection reveals a DDL statement, filtered database, unexpected source, or incomplete transaction, stop and resolve that discrepancy before applying anything.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Apply a local binary-log range

Replay one complete file or stream

For the documented point-in-time recovery pattern, pipe one or more binary-log files directly into the target client:

mysqlbinlog binlog_files | mysql -u root -p

The client prompts for the password. Avoid placing passwords in the command line or shell history. The target account must have the privileges described earlier, and the target should be the server whose snapshot matches the source coordinates.

Replay an exact range

After reviewing the range, apply the same file with explicit boundaries:

mysqlbinlog --start-position=START_POS --stop-position=STOP_POS 
  binlog.000123 | mysql --binary-mode=1 -u root -p

--binary-mode=1 tells the client to handle binary data without treating it as interactive input. Keep the command exactly aligned with the inspected range. Do not replace generated statements, remove a suspected event, or change character handling simply to make a line look readable.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
BladeHawks RGB Gaming Mouse Pad Extra Large Extended 31.5x12 Inch-Black
  • 【Large size】:Measuring 800 x 300 mm/ 31. 5×12 inches, which is wider and taller than others. Large mouse pad can perfectly fit your keyboard and mouse of any size, and there is also ample space for peripherals such as phones, tablets, etc.
  • 【LED backlight mouse pad】:Blade Hawks RGB mouse pad provides 7 static modes and 7 dynamic modes will give you the options you are looking for. Power-off memory function remembers the last lighting mode you selected. The super glow fiber Chroma will give you a colorful gaming setup that you want.
  • 【Anti-slip rubber base】:Made from Natural rubber, this gaming mousepad will firmly grip your desktop, allowing you to enjoy the ultimate precision in the games you are most passionate about. It also comes with a texture that enhances this ability even further.
  • 【Smooth and waterproof surface】: Micro-textured cloth surface, for extremely precise mouse control and a smooth movement. When liquid splashes on the gaming mouse pad, it forms water droplets and slides down. Will not delay your work or gameplay.
  • 【Plug and play】: This mouse and keyboard pad is powered by USB, plug and play, no driver required. One button control light modes. Press one time to change the lighting mode, press twice to change the brightness, press and hold about 3 seconds turn ON/OFF.

Apply consecutive files in order

When the required interval crosses a file rotation, list every file in chronological order. Begin at the recorded position in the first file and allow subsequent files to continue in sequence. Preserve the original files; do not rename them in a way that obscures their source order.

mysqlbinlog --start-position=START_POS 
  binlog.000123 binlog.000124 binlog.000125 
  | mysql --binary-mode=1 -u root -p

If the stop point falls in a later file, add --stop-position=STOP_POS while ensuring that the option applies to the intended final range. Inspect the combined stream when the operation is sensitive or crosses a transaction boundary.

Read logs from the source or over protected transport

Use remote reading when the files are not stored on the replay host, when they are encrypted at rest on the source, or when copying them would create an unnecessary second artifact. MySQL documents the --read-from-remote-server (short form -R) option:

mysqlbinlog --read-from-remote-server 
  --host=source.example --port=3306 
  --user=binlog_reader --password 
  --ssl-mode=VERIFY_IDENTITY binlog.000123 
  | mysql -u root -p

Use a dedicated account with only the access needed to read the source log and apply the target stream. The example uses VERIFY_IDENTITY, which verifies the server certificate and hostname. MySQL recommends VERIFY_CA or VERIFY_IDENTITY over REQUIRED when possible. Confirm certificate trust, hostname matching, firewall rules, and source availability before starting a long transfer.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Remote streaming does not remove the need to inspect the interval. You can first stream the selected range to a review file or a pager, then run the same coordinates for the actual apply. Protect any captured stream because it can contain sensitive row values.

Resume normal replication after manual replay

File-and-position topology

Once the manual range has completed and validation shows that the target data is consistent, configure the replica with the next deliberate source coordinates:

CHANGE REPLICATION SOURCE TO
  SOURCE_HOST='source_host',
  SOURCE_USER='replication_user',
  SOURCE_PASSWORD='password',
  SOURCE_LOG_FILE='binlog.000123',
  SOURCE_LOG_POS=START_POS;
START REPLICA;

Use the file and position that represent the next events the replica must receive, based on the range you actually applied. Do not guess by using the current end of the source file. A wrong coordinate can replay an event twice or skip part of a transaction.

Rank #4
Sale
Vaydeer Wrist Rest for Keyboard and Mouse, Computer Ergonomic Wrist Support Pad, Soft Memory Foam Arm Cushion for Desk, Palm Hand Office Laptop Typing
  • 【Softer and More Comfortable】Vaydeer wrist rest has unique diamond pattern, which is the combination of softness and aesthetics. The materials of wrist rest are improved into higher quality memory foam and covered with silky smooth lycra. The computer wrist rest makes you as comfortable and cushiony as like rest your wrists on clouds.
  • 【Ergonomic Wrist Saver】The wrist rests for keyboard and mouse comes with a 17.32×3.15×0.83 inch keyboard wrist pad and a 5.94×3.15×0.83 inch mouse wrist support. Based on ergonomic design, the unique concave shape is the perfect fit for your wrist joints. The wrist rest pad fits most computer keyboards and laptops, improve hand and wrist posture, release your wrist and arm stress.
  • 【Non-Slip Rubber Bottom】Featuring an anti-skid silicone base on the bottom, this wrist keyboard support stays firmly in place on your desk, preventing the padding from sliding around, ensuring stable and consistent wrist support during extended computer sessions.
  • 【Better Experience & Pain Relief】Our keyboard arm rest is beneficial to alleviate the soreness caused by direct contact and friction between your arm and a hard desk surface, reducing the risk of wrist fatigue or carpal tunnel. The soft texture of memory foam can evenly distribute the pressure around your wrists and provide good support with just enough give.
  • 【Helpful in Multiple Scenarios】Whether you're working, studying, writing, typing, gaming, this keyboard and mouse rest combo is an essential accessory to add comfort and support to your hands and wrists. It’s also a great gift for men, women, family, friend, coworker, gamer, teacher, etc.

Store credentials securely rather than leaving them in shell history or shared incident notes. The statement shown here illustrates the documented syntax; adapt credential handling to your server’s supported configuration.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

GTID topology

If both source and replica use GTIDs, configure automatic positioning instead of file and position coordinates. Set SOURCE_AUTO_POSITION = 1 in the replication configuration appropriate for your version and topology. Do not combine auto-positioning with SOURCE_LOG_FILE or SOURCE_LOG_POS. The replica should determine missing transactions from executed GTID sets, not from a manually guessed byte offset.

Manual replay still requires care in a GTID environment: confirm which GTIDs were executed by the direct apply, whether the server recorded them as expected, and whether the replication metadata recognizes those transactions before starting the receiver.

Skipping a failed transaction

A failed apply is not evidence that the transaction can simply be skipped. First stop both the receiver and applier, preserve the source and replica binary logs, save SHOW REPLICA STATUS output, and capture the error log. Determine whether the failure is caused by permissions, missing objects, filtering, a mismatched schema, corrupted input, or a genuinely conflicting row.

Identify the next valid event-group or transaction boundary. Then set restart coordinates deliberately, documenting exactly which transaction was omitted and why. Skipping inside a transaction can apply only part of its changes; restarting from the wrong byte can execute an event twice. After any skip, perform application-level checks rather than relying only on a running thread.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Validate the result

Check replication metadata

Run SHOW REPLICA STATUS after the manual apply and again after restarting replication. Review source and replica file positions, receiver and applier status, error numbers and messages, lag indicators, and executed GTID sets where applicable. A thread that is running does not prove that every intended transaction was applied correctly.

Compare data at the application level

Use row counts, checksums, or other deterministic application checks for the databases and tables touched by the range. Compare the same scope on source and replica, account for expected filtering, and investigate every difference. A mismatched snapshot, an incorrect start position, a filtering rule, or a concurrent applier can produce divergence even when the command exits successfully.

Best Value
Sale
Under Desk Cable Management Tray No Drill, Metal Mesh Cable Management Under Desk with Clamp Mount, 2 Hole Cable Tray with Wire Management and Cord Organizer for Home Office Standing Desk
  • 【No Drill Mounted】Cable management tray can be assembled in as little as 3 minutes or less-simply. Side clips easily clampe the edge of desk, pass through the holes on the sides, and secure excess cables with baskets. Desk cable management supports inward or outward installation to meet your needs in different scenarios, and provides you with great convenience when collecting and organizing wires.
  • 【Rubber Pad Protects Desk】Wire organizer under desk built-in soft rubber pads on the clamp protect your desk from scratches, so you will not damage your furniture or office.
  • 【Sturdy and Beautiful】Cord management under desk is made of high-quality carbon steel and holds about 15 lbs. The wire basket has 2 holes on each side of the tray to enable your cables to pass freely. Cable baskets are suitable for desk thickness use from 0.4" to 2.4".
  • 【Space Saving & Keep Organized】Desk cable management tray holds all your power cords, outlet strips, USB hubs and computer transformers hidden from your feet, and the data cables will not enter the vacuum cleaner to keep your desk clean and tidy. Desk wire organizer is also suitable for use in the kitchen and outdoors.
  • 【Reduce Safety Risks】Cable tray under desk keeps all plugs away from your kids, no more worry about tripping. Using 2 holes wire tray saves extra space, helps you easily cabling and wire protection. The mesh design is not easy to accumulate dust, but avoids safety accidents caused by messy wires.

Preserve evidence before resetting state

Before resetting replication metadata, deleting relay logs, or purging source files, preserve the source and replica binary logs, command output, status output, error logs, snapshot identifier, and the operator’s chosen coordinates. Those artifacts are the only reliable record of what happened if validation later finds a discrepancy.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Manual replay versus restarting replication

The right recovery method depends on the topology and on how precisely you must control the interval.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Decision factor Manual replay with mysqlbinlog Restarting configured replication
Range control Direct control over an exact file and position range, including a reviewed stop point. Normally follows the receiver’s configured coordinates and relay-log flow.
Source reachability Can use preserved local files or remote reading when the source is available through a protected connection. Requires a functioning replication connection and compatible source/replica settings.
Topology model Works as an explicit event stream in either a file-position recovery workflow or a carefully managed GTID workflow. Uses file-position metadata or GTID auto-positioning already configured on the replica.
Privileges The apply account needs BINLOG_ADMIN or deprecated SUPER, or REPLICATION_APPLIER plus event-specific privileges. Uses the privileges required by the replication connection and applier configuration.
Transaction risk The operator chooses boundaries; an incorrect coordinate can split or duplicate a transaction. The replication machinery advances through its event stream, but schema, filtering, and data conflicts can still stop it.
Auditability Command lines, inspected output, and preserved files provide a clear record of the selected interval. Audit evidence is distributed across replication metadata, relay logs, and server logs.
Rollback options There is no automatic undo for successfully executed data changes; restoration or compensating work may be required. Restarting also does not undo applied changes, although normal metadata handling avoids some manual coordinate mistakes.
Snapshot requirement Must match the source snapshot and starting coordinate exactly. Still depends on a consistent initial copy; restarting cannot repair a fundamentally mismatched snapshot.

Common failure modes and remedies

The command stops on a privilege error

Check the target account’s BINLOG_ADMIN, deprecated SUPER, or REPLICATION_APPLIER privileges and the privileges needed by the specific DDL or DML event. Grant only the minimum approved permissions, then restart from a verified transaction boundary rather than blindly rerunning the entire file.

The replica reports duplicate-key or missing-row errors

Stop the applier and compare the target with the snapshot and source coordinates. Duplicate keys often indicate that an event was already applied or that another writer changed the target. Missing rows can indicate an earlier skipped transaction, filtering, or data drift. Do not suppress the error until you know which transaction should be present.

Readable output does not resemble SQL

Row-based events are encoded in the binary-log format. --base64-output=DECODE-ROWS --verbose makes them understandable to a reviewer, but the decoded comments are not a replacement for the generated replay stream. Apply the original mysqlbinlog output.

Remote streaming fails during TLS setup

Verify the source hostname, certificate chain, trust store, and port. Prefer VERIFY_CA or VERIFY_IDENTITY rather than a mode that only encrypts traffic without authenticating the peer. Confirm that the binlog-reading account can connect remotely and that network controls allow the connection.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Replication starts but later diverges

Recheck the snapshot coordinate, all files in the selected order, filtering rules, GTID execution sets, and whether a second applier or application writer ran during replay. Compare affected rows or checksums and retain the logs before changing replication state again.

Operational checklist

  • Record the MySQL versions and whether the topology is file-position or GTID based.
  • Verify binary logging and unique nonzero server_id values.
  • Identify the consistent snapshot and its matching source file and position.
  • Stop or isolate normal replication threads and other writers.
  • Confirm the apply account’s privileges and secure password handling.
  • Inspect the selected range, especially transaction boundaries and row events.
  • Replay local files in chronological order or use remote reading with verified TLS.
  • Preserve command output, logs, status, and original binlog files.
  • Configure the next file-position coordinates or GTID auto-positioning, never both.
  • Run SHOW REPLICA STATUS and application-level row or checksum checks before declaring recovery complete.

Bottom line

Manual application is the controlled path when you must replay a known MySQL binary-log interval: match the snapshot to its source coordinate, inspect before executing, apply with mysqlbinlog piped to mysql, and prevent concurrent appliers. Resume with deliberate file-position or GTID settings, then verify both replication metadata and the affected data. Treat every skipped transaction or coordinate change as a documented recovery decision, because binary-log replay reexecutes data modifications and has no automatic undo.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.