Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan Now×
Skip to content
World desk11 min

MySQL Won’t Start After Restoring a Backup: A Safe, Evidence-First Fix

A restored MySQL datadir may fail because the service points elsewhere, the mysqld account lacks access, InnoDB files are incomplete, or the copy is corrupt. This evidence-first guide shows how to identify the branch, preserve the failed copy, validate physical and logical restores, and recover with binary logs when possible.

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.

Do not delete database files or keep restarting the service. The first fatal message in the MySQL error log identifies the correct recovery branch. Check that the service is using the restored datadir and the same configuration, repair access problems such as Errcode 13, verify that every required InnoDB tablespace and redo/undo file is present, and treat corruption as a restore-and-recover event rather than a file-cleanup task.

If the restored copy is corrupt, preserve it, bring up a known-good backup on an isolated instance, and apply binary logs for point-in-time recovery when those logs cover the missing interval.

As an Amazon Associate I earn from qualifying purchases.

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

Stop the restart loop and preserve evidence

Repeated start attempts can overwrite useful log context and make it harder to distinguish the original failure from cascading errors. Stop the service and work from a copy of the restored directory whenever possible.

  1. Stop automatic retries. Disable a restart loop temporarily in the service manager, or stop the MySQL service and leave it stopped while you collect evidence.
  2. Copy the error log. Save the complete log, not only the last screenful. The earliest fatal entry is normally the cause; later messages may only report consequences.
  3. Record the environment. Write down the exact MySQL release, operating system, service-unit name, backup product or method, restore completion time, intended datadir, basedir, socket, and TCP port.
  4. Protect the restored files. Make a read-only or storage-level copy before changing ownership, moving files, attempting recovery, or reinitializing a directory. Keep the original failed copy available for forensic work.

On a systemd installation, these commands usually expose service output. Substitute the unit name used by your distribution if it is different:

#1 Best Overall
Seagate 2TB Portable Hard Drive | USB 3.0 (STGX2000400) | Everyday HDD storage. Plug-and-play backup. Windows & macOS. Adobe CC trial included. 1-Year Warranty
  • Easily store and access 2TB to content on the go with the Seagate Portable Drive, a USB external hard drive
  • Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop
  • To get set up, connect the portable hard drive to a computer for automatic recognition no software required
  • This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
  • The available storage capacity may vary.
sudo systemctl status mysql --no-pager
sudo journalctl -u mysql -b --no-pager
sudo systemctl cat mysql

Some installations write the error log to a file while others send it to the journal. The configured log_error value, the service output, and the operating-system package documentation together identify the authoritative log.

Use the first fatal line to choose the branch

Read from the beginning of the failed startup and classify the first message that stops initialization. Do not jump directly to an InnoDB remedy because a later line mentions InnoDB; an incorrect path or permission failure can produce those later messages.

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

Errcode 13 or “Permission denied”

This means the account running mysqld cannot access the datadir or one of its files or directories. Access can fail on a parent directory even when the database files themselves appear correctly owned. Security controls such as SELinux or AppArmor can also deny access after a file restore.

“Can’t open file,” “No such file,” or a missing tablespace

The path in the configuration may not match the restored location, or the restore set may be incomplete. Identify the exact filename and path in the message before moving anything. A missing per-table .ibd, system tablespace, undo tablespace, or redo file requires a restore-set investigation rather than a permissions change.

“Unknown variable” or an option-file error

The restored server may be starting with a configuration from a different release or host. Remove or correct only the offending option after confirming which option files the service actually includes. Do not copy a production configuration blindly onto a different MySQL release.

“Address already in use”

Another process owns the configured TCP port, or a second MySQL instance is being started. Determine which process owns the port and whether it uses the same datadir before stopping anything.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
Seagate Portable 5TB External Hard Drive HDD – USB 3.0 for PC, Mac, PS4, & Xbox - 1-Year Rescue Service (STGX5000400), Black
  • Easily store and access 5TB of content on the go with the Seagate portable drive, a USB external hard Drive
  • Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop
  • To get set up, connect the portable hard drive to a computer for automatic recognition software required
  • This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
  • The available storage capacity may vary.

Redo, undo, or InnoDB initialization errors

These messages commonly indicate that physical files are missing, from different backup points, or located somewhere other than the paths configured for InnoDB. Release-specific redo naming matters: newer releases use files such as #ib_redo, so a filename alone is not evidence that a file is disposable.

Corruption, checksum, or page-read errors

Hardware failure or severe system errors can corrupt InnoDB data badly enough to prevent startup. Preserve the failed copy and move to a known-good backup and an official recovery procedure. Do not attempt to “repair” the only copy by deleting files.

Confirm that mysqld is using the restored instance

A successful file copy has no effect if the service starts a different datadir, basedir, socket, or port. Verify the running service definition and every included option file, then compare those values with the directory you restored.

  1. Inspect the service command line and drop-in files with systemctl cat. Look for an explicit --defaults-file, --datadir, or another wrapper script.
  2. Search the option files that your operating system uses for datadir, basedir, socket, port, and InnoDB path options. A typical inspection command is sudo grep -R '^[[:space:]]*(datadir|basedir|socket|port|innodb)' /etc/mysql /etc/my.cnf 2>/dev/null; adjust the directories for your installation.
  3. Compare the configured datadir with the restored directory using an absolute path. Check for a nested directory created by the restore, such as a restored directory containing another directory with the same name.
  4. Check the configured socket and port so that client tests do not accidentally connect to a different running instance.

If you can start a disposable copy of the service, query its effective settings with SHOW VARIABLES. Do not use a live production instance merely to test an uncertain restore. The objective is to prove that the files you inspected are the files this service will open.

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

Repair access without widening permissions unnecessarily

For an access failure, first identify the operating-system account and group used by the service:

sudo systemctl show mysql -p User -p Group

If the output is empty, inspect the unit file or package defaults. Then check every directory component, not just the datadir:

Rank #3
Seagate Portable 1TB External Hard Drive HDD – USB 3.0 for PC, Mac, PlayStation, & Xbox, 1-Year Rescue Service (STGX1000400) , Black
  • Easily store and access 1TB to content on the go with the Seagate Portable Drive, a USB external hard drive.Specific uses: Personal
  • Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop. Reformatting may be required for Mac
  • To get set up, connect the portable hard drive to a computer for automatic recognition no software required
  • This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
  • The available storage capacity may vary.
namei -l /path/to/datadir
ls -ld /path/to/datadir
find /path/to/datadir -maxdepth 2 -printf '%M %u:%g %pn' | head

Correct the owner, group, and mode only after confirming the intended service account and the files that should be writable. A recursive ownership change can damage a deliberately mixed layout, so take the preserved copy first and avoid granting world-write access. The service account needs execute permission on parent directories and the access required for the database files, temporary files, sockets, and configured log locations.

On systems with mandatory access control, restore the expected security labels or update the narrowly scoped policy for the new location. A datadir moved to a different mount point can be denied even when Unix ownership looks correct. After one controlled correction, start the service once and capture the new first fatal line. If the message changes from permission denied to a missing file, continue with the path and restore-set branch rather than repeatedly changing modes.

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

Rule out a competing process or duplicate instance

A restored server can fail because an existing mysqld already owns the port, or because the service is launching a second process against files that another process has open. Check both the process list and the listening socket:

ps -ef | grep '[m]ysqld'
sudo ss -ltnp
sudo lsof -nP -iTCP:3306 -sTCP:LISTEN

Use the configured port instead of 3306 when it differs. For every mysqld process, identify its command line, datadir, socket, and service owner. Stop only the process you have positively identified as the conflicting instance. Never kill a process solely because its name contains “mysqld”; it may be the healthy production server.

Also check for stale automation: a second service unit, container, orchestration job, or watchdog may restart the old instance while you are testing the restored one. One datadir must have one owner at a time.

Validate a physical restore as a complete, consistent set

A physical backup is more than a collection of table files. InnoDB startup depends on the system tablespaces, per-table tablespaces, undo tablespaces, redo logs, and the paths that point to them. Confirm that the backup method produced a consistent set and that all components were restored from the same backup point.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
Seagate Portable 4TB External Hard Drive HDD – USB 3.0, 1-Year Rescue | Everyday HDD storage. Plug-and-play backup. Windows & macOS. Adobe CC trial included. 1-Year Warranty
  • Easily store and access 4TB of content on the go with the Seagate Portable Drive, a USB external hard drive.Specific uses: Personal
  • Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop
  • To get set up, connect the portable hard drive to a computer for automatic recognition no software required
  • This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
  • The available storage capacity may vary.

Check the configured locations

Review the options that control the datadir and InnoDB storage locations, including settings for the system tablespace, per-table data, undo directory, and redo-log directory. Compare each path with the actual restored files. A file in the right backup archive but the wrong filesystem location is functionally missing.

Check for missing or mismatched components

  • System tablespace files must be present where the server expects them.
  • Each restored per-table .ibd file must match the dictionary metadata and the backup point that produced the rest of the files.
  • Undo tablespaces must be restored when the physical backup procedure requires them.
  • Redo logs must be present in the configured location and belong to the same consistent backup set. Depending on the release, names and layout can differ, including #ib_redo files.

Do not infer compatibility from timestamps alone. A restore assembled from files copied at different times can look complete while still being internally inconsistent.

Check the backup tool’s restore procedure

Physical backup products may require a prepare, apply-log, catalog, or metadata step before mysqld can open the files. Follow the procedure for the exact backup tool and MySQL release. A file-level copy taken while InnoDB was changing may not be a usable physical backup unless the tool created a consistent snapshot.

Respect MySQL release and layout differences

Startup files and option names change across MySQL releases. Redo-log naming and locations are one visible example, but tablespace metadata and supported configuration options can also differ. Match all of these before attempting a restore:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Source and target MySQL release, including the distribution build where relevant.
  • Backup method and the release for which that method was designed.
  • Whether the restore is a logical SQL dump or a physical datadir restore.
  • Configured locations for system, undo, per-table, and redo storage.
  • Required preparation or upgrade steps documented for that release.

Do not rename, recreate, or delete a redo file because its name resembles a file from another installation. If the server reports a layout mismatch, stop and use the release-specific restore instructions with a preserved copy.

Choose the recovery path that matches the backup type

Backup type What is restored Redo, undo, and tablespaces Version and layout considerations Point-in-time recovery
Logical SQL dump SQL statements that recreate databases, objects, and rows on a prepared MySQL instance Not copied as physical InnoDB files; the target instance creates its own storage The target server must accept the dump’s syntax, character sets, authentication definitions, and object features Binary-log events can be applied after a sound base import when the required interval and coordinates are available
Physical file backup Datadir files and the storage structures captured by the backup method Required components must be restored together and in the paths referenced by configuration Tightly coupled to the MySQL release, backup tool, file layout, and preparation procedure Binary-log events can be applied after the physical base is made consistent and the covered interval is known

A logical restore is often the cleaner fallback when the physical copy is incomplete, but it can take substantially longer because objects and rows are recreated. A physical restore can reduce downtime when it is valid, yet it fails hard when required files are absent or mismatched. Preserve the failed physical copy even if you switch to a logical dump; it may contain the only evidence needed to identify the failure.

Best Value
Sale
UnionSine 500GB Ultra Slim Portable External Hard Drive HDD-USB 3.0 | for PC, Mac, Laptop, PS4, Xbox one, Xbox 360-(Black)
  • [Upgraded Version] - This external hard drive features a mirrored logo stripe combined with a striped anti-slip design, and the rounded corners of the casing make it easier to grip. The stripes also have a heat dissipation function, ensuring stable and fast data transfer.
  • 【Ultra-thin and quiet】 - The motherboard adopts JMicron 578 noise-free solution, giving you a quiet working environment. Lightweight and portable size designed to fit in your pocket for easy portability.
  • 【Ultra-Fast Data Transfers】 - Pairing this external hard drive with JMicron 578 solution USB 3.0 and USB 2.0 interfaces enables blazing-fast data transfer. It boasts theoretical read speeds of up to 125MB/s and write speeds of up to 103MB/s.
  • 【Plug and Play】 - With no software to install, just plug it in and the drive is ready to use.The hard disk chip is wrapped with an aluminum anti-interference layer to increase heat dissipation and protect data.
  • 【What You Get】 - 1 x Portable Hard Drive, 1 x USB 3.0 Cable, 1 x User Manual, Gift-type shell packaging ,Three-year manufacturer's warranty and free technical support services.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Recover from a corrupt physical restore

When the error log reports corruption or InnoDB refuses to initialize, treat the restored directory as a failed recovery artifact. Do not write new data into it while investigating.

  1. Preserve the failed copy. Take a storage snapshot or byte-for-byte copy and record its checksum, size, and location.
  2. Test a known-good backup in isolation. Use a separate datadir, host, container, or virtual machine with networking restricted so applications cannot write to it accidentally.
  3. Match the original release and configuration. Start with the same MySQL release and compatible option files, then verify that the known-good backup opens before introducing application traffic.
  4. Follow the official InnoDB recovery sequence. If temporary read-only extraction is required, use the documented recovery settings at the lowest level that permits it, export what can be read, and never treat a forced start as proof that the underlying files are repaired.
  5. Rebuild from the sound base. Once the known-good backup is running, restore schema and data as directed by the backup method and validate representative tables before cutover.

Hardware failure or severe system error can make InnoDB refuse to start even when many files remain readable. A server that starts only with emergency settings may still contain latent corruption, so run consistency checks and application validation before declaring the recovery complete.

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

Use binary logs for point-in-time recovery

Binary logs can bring a restored base backup forward to a chosen time, but only when they cover the interval between the backup and the target point and are available with intact order and coordinates.

  1. Identify the exact backup position or timestamp from the backup metadata.
  2. Confirm that every required binary-log file exists from that point through the desired recovery time.
  3. Restore the sound base backup on an isolated instance and verify that it starts cleanly.
  4. Use mysqlbinlog to extract the required events and pipe them to the matching MySQL client, following the release-specific syntax and filtering rules.
  5. Validate row counts, application invariants, and the final event time before exposing the recovered instance.

If the logs begin after the failure, contain gaps, or do not cover the backup point, they cannot reconstruct the missing transactions. Record the unrecoverable interval rather than claiming a complete point-in-time restore.

When a logical dump is the safer fallback

If a usable SQL dump exists, create a new, clean target instance rather than trying to make a damaged datadir boot. Initialize it with the intended MySQL release, apply the required configuration, import the dump, and then apply binary logs if the dump’s position and the logs provide a continuous recovery window.

Logical imports also help when a physical backup was taken for a different release or when the physical restore lacks redo or undo files. They do not preserve every physical detail automatically: review users, grants, events, routines, triggers, generated columns, character sets, and SQL modes, and test application behavior before cutover.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

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

Destructive actions that should not be first steps

Deleting ibdata*, per-table .ibd files, undo tablespaces, or redo logs destroys recovery evidence and can make a valid backup unusable. Such deletion belongs only to a documented reinitialization or rebuild procedure, performed on a separate preserved copy after you have accepted data loss for that path.

Do not “fix” a missing redo-log message by creating an empty file, renaming files from another server, or deleting the existing set. Do not initialize over the only restored directory. If a clean rebuild is required, move the failed directory aside, retain it unchanged, and create a new datadir on separate storage.

Final validation before returning the service

  • The service starts without emergency recovery settings and remains running through a controlled restart.
  • The effective datadir, basedir, socket, port, and InnoDB paths point to the intended restored instance.
  • The error log shows no new permission, missing-file, redo, undo, tablespace, or corruption errors.
  • Representative databases, tables, views, routines, events, and user privileges are present.
  • Application reads and writes succeed in a staging or controlled production test.
  • Binary-log position, backup timestamp, and any unrecoverable interval are documented.
  • A fresh backup is taken after validation, and its restore procedure is tested separately.

The reliable sequence is deliberately conservative: preserve evidence, identify the first fatal line, prove which instance is starting, repair only the diagnosed condition, validate the complete restore set, and rebuild from a known-good base when corruption remains.

Quick Recap

Bestseller No. 1
Seagate 2TB Portable Hard Drive | USB 3.0 (STGX2000400) | Everyday HDD storage. Plug-and-play backup. Windows & macOS. Adobe CC trial included. 1-Year Warranty
Seagate 2TB Portable Hard Drive | USB 3.0 (STGX2000400) | Everyday HDD storage. Plug-and-play backup. Windows & macOS. Adobe CC trial included. 1-Year Warranty
This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable; The available storage capacity may vary.
$129.99
Bestseller No. 2
Seagate Portable 5TB External Hard Drive HDD – USB 3.0 for PC, Mac, PS4, & Xbox - 1-Year Rescue Service (STGX5000400), Black
Seagate Portable 5TB External Hard Drive HDD – USB 3.0 for PC, Mac, PS4, & Xbox - 1-Year Rescue Service (STGX5000400), Black
This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable; The available storage capacity may vary.
$219.99
Bestseller No. 3
Seagate Portable 1TB External Hard Drive HDD – USB 3.0 for PC, Mac, PlayStation, & Xbox, 1-Year Rescue Service (STGX1000400) , Black
Seagate Portable 1TB External Hard Drive HDD – USB 3.0 for PC, Mac, PlayStation, & Xbox, 1-Year Rescue Service (STGX1000400) , Black
This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable; The available storage capacity may vary.
$119.80
Bestseller No. 4
Seagate Portable 4TB External Hard Drive HDD – USB 3.0, 1-Year Rescue | Everyday HDD storage. Plug-and-play backup. Windows & macOS. Adobe CC trial included. 1-Year Warranty
Seagate Portable 4TB External Hard Drive HDD – USB 3.0, 1-Year Rescue | Everyday HDD storage. Plug-and-play backup. Windows & macOS. Adobe CC trial included. 1-Year Warranty
This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable; The available storage capacity may vary.
$189.99

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.

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

Leave a Reply

Your email address will not be published. Required fields are marked *

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

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.