DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run Scan×
Skip to content
VGSources
Blog

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

A restored MySQL datadir can still fail if mysqld reads the wrong path, lacks permission, or is missing matching InnoDB files. This evidence-first guide shows how to identify the first fatal error, repair reversible problems, and use binary logs for point-in-time recovery without destroying the only copy.
Length11 min Posted Quest giverVGSources Team

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.

When MySQL will not start after a restore, do not delete InnoDB files or keep restarting the service. The first fatal line in the error log determines the correct branch: a permissions error needs access repair, a wrong datadir needs configuration correction, a missing tablespace or redo log needs a complete, version-matched restore, and corruption usually requires replacing the copy with a known-good backup before applying binary logs.

This procedure keeps the failed files intact while you identify what the running service is actually reading, repair reversible problems, and escalate destructive recovery only when you have a separate preserved copy.

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.

Start with evidence, not another restart

Repeated restart attempts can overwrite useful log context, trigger recovery actions more than once, or make it harder to distinguish the original failure from later cascade messages. Stop the service and preserve the state before changing files.

1. Stop the restart loop

  1. Stop the MySQL service using the service manager for the host. On a systemd Linux host, an example is sudo systemctl stop mysql; the unit may instead be named mysqld.
  2. Disable an automated restart policy temporarily if it is bringing the service back immediately. Make the change only for the affected unit and record the original setting so it can be restored.
  3. Copy the error log and service output to a separate location. Do not edit or truncate the original log.
  4. Make a read-only or otherwise protected copy of the restored datadir before attempting repairs. The copy is your rollback and forensic reference.

2. Locate the first fatal message

Read the error log from the beginning of the failed startup attempt and identify the first message that stops initialization. Later messages often describe consequences rather than causes. Common branches include:

#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.
  • Errcode 13 or “permission denied”
  • “Can’t open file,” “No such file or directory,” or an operating-system I/O error
  • “Unknown variable” or another option-file parsing error
  • “Address already in use” or a bind failure
  • Missing tablespace, undo, or redo-log messages
  • InnoDB corruption, page-read, checksum, or assertion errors

Oracle’s MySQL startup troubleshooting documentation treats these as different failure classes. Follow the branch indicated by that first fatal line instead of applying a generic “repair” command.

3. Record the restore context

Write down the MySQL server version and release, operating system, backup product and method, restore completion time, service-unit name, expected datadir, and the location of the error log. Also record whether the backup was a logical SQL dump or a physical copy of the MySQL files. Those details determine which files should exist and which restore procedures are valid.

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

Prove that the running service is using the restored directory

A successful file copy does nothing for the instance if mysqld is pointed at a different datadir, basedir, option file, socket, or port. This is one of the most common reasons a restore appears to have “failed.”

Inspect the service definition

Display the unit and its startup command, for example:

sudo systemctl cat mysql
sudo systemctl status mysql --no-pager

Look for an explicit --datadir, --basedir, alternate defaults file, or an included configuration directory. If the unit is named mysqld, use that name in the commands. The effective configuration can also be inspected with the MySQL option-defaults utility when it is installed:

my_print_defaults mysqld

Compare every path shown by the service and option files with the directory that was actually restored. Check included files rather than reading only the main configuration file; an included fragment can override the value you expected.

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.

Check datadir contents without changing them

List the candidate directory and confirm that it contains the files expected for the backup type. A logical dump normally consists of SQL text and must be imported into an initialized server; it does not become a datadir merely by being copied into one. A physical InnoDB restore should contain the system tablespace and the other files required by that version, discussed below.

Also verify the configured Unix socket and TCP port. A server can be running against the restored files while a client or service check is pointed at another socket or port, creating the appearance that MySQL is still down.

Why a wrong target produces misleading symptoms

If the service starts against an old or empty directory, it may report missing tables, an uninitialized data directory, incompatible options, or a clean startup with none of the restored data. If it fails, the error describes that other directory, not the backup you intended to test. Correct the service target first, then make one controlled startup attempt and capture the new first fatal line.

Fix the permission branch without opening the server to everyone

For Errcode 13, Oracle’s documentation is explicit: “If you get Errcode 13 (which means Permission denied) when starting mysqld, this means that the privileges of the data directory or its contents do not permit server access.” The mysqld account must be able to traverse every parent directory and read, write, and create the files required during startup.

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

Identify the account that runs mysqld

Read the service unit for its User= and Group= values, or inspect the process definition if a process briefly starts. Do not assume the account is named mysql on every operating system or installation.

Check the whole path, not only the datadir

A directory can have correct ownership while a parent directory denies traversal. Check permissions on each parent component of the configured datadir, the datadir itself, and the files and subdirectories restored beneath it. Pay special attention to the directories configured for undo tablespaces, redo logs, temporary files, and sockets if they are outside the main 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.

Repair ownership and mode narrowly

After confirming the service account and the exact datadir, repair ownership only on the intended MySQL files. For example, on a Linux installation that demonstrably runs as mysql and uses /var/lib/mysql, an administrator might use:

sudo chown -R mysql:mysql /var/lib/mysql

Use the account and path found in your service configuration, not these values blindly. Avoid making the tree world-writable or granting broad access simply to make the error disappear. Preserve special permissions and any files intentionally owned by another account.

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

Check mandatory access controls

SELinux, AppArmor, and comparable security policies can deny access even when ordinary Unix ownership looks correct. Inspect the policy audit log and the profile or label assigned to the datadir and any external InnoDB paths. Apply the distribution’s documented policy procedure rather than disabling the security framework. After a targeted correction, start the service once and capture the new first fatal message.

Rule out a competing mysqld process or port conflict

“Address already in use” means another process owns the configured TCP port. It may be a separate MySQL instance, a leftover process, or an unrelated service. Check the process list and listening sockets before killing anything:

ps -ef | grep '[m]ysqld'
ss -ltnp | grep 3306

Use the actual configured port if it is not 3306. Confirm which datadir each mysqld process uses. Never start a second server against the same physical files while the first process is active; concurrent access can worsen an already damaged restore. Stop the correctly identified conflicting process through its own service manager, or change the test instance’s port and socket when you intentionally need two isolated servers.

Validate a physical InnoDB restore as a complete set

Physical backups are not interchangeable collections of convenient-looking files. InnoDB initialization can fail when related files are missing, mixed from different backup points, or located somewhere other than the paths in the configuration.

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.

Files that must agree

Restore component Why startup depends on it What to verify
System tablespaces such as ibdata* They contain shared InnoDB metadata and data structures required to initialize the engine. They came from the same physical backup set as the other InnoDB files and are in the configured location.
Per-table tablespaces such as .ibd files Tables configured to use file-per-table need their tablespace files to match the dictionary metadata. Expected files were restored together; do not substitute files from another server or backup point.
Undo tablespaces InnoDB may need undo data during crash recovery and transaction rollback. Undo files were included and their configured directory exists and is accessible.
Redo logs Redo records allow InnoDB to recover committed changes and complete interrupted work. The redo files from the backup are present, readable, and in the path expected by this MySQL release.

A missing redo log can stop startup; a documented restore case reports failure when redo logs were absent. An operating-system file error or an incorrect configured path can produce a similar symptom, so verify both existence and path before concluding that the files are corrupt.

Do not mix backup generations

Copying a system tablespace from one backup with .ibd, undo, or redo files from another can leave the internal metadata inconsistent. Compare restore manifests, timestamps, and backup-tool instructions. If the backup tool produced a coordinated snapshot, restore the complete set it defines rather than selecting files by extension.

Respect MySQL release and layout differences

InnoDB file names and locations change between MySQL releases. Newer releases use redo-log files named with the #ib_redo pattern, while older layouts use different names and directory conventions. A familiar-looking file is not proof that it belongs to your release or that it can be recreated safely.

Match the restore procedure to the exact server version and the backup tool that created the copy. Confirm the release before moving, renaming, deleting, or generating any InnoDB file. Do not apply instructions written for another major version merely because the error message appears similar.

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

When the log indicates corruption

Oracle’s InnoDB recovery documentation warns: “If hardware failure or severe system error corrupted InnoDB data, MySQL might refuse to start.” Messages about corrupted pages, failed checksum validation, unreadable pages, assertions, or unrecoverable redo processing belong to this branch.

Preserve the failed copy

Stop making changes to the only restored directory. Keep the protected copy made during triage, and perform experiments on a separate duplicate or isolated host. Record the exact version and configuration used for every test so a later result can be reproduced.

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.

Test a known-good base backup

Restore the newest backup that is known to be complete and internally consistent into an isolated instance. Keep its datadir separate from production and use a different port and socket. If that copy starts, the problem is localized to the failed restore rather than the server binary or host configuration.

Apply binary logs for point-in-time recovery

When binary logs cover the interval after the known-good base backup, apply the events in order to reach the desired recovery point. A typical pattern is:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
mysqlbinlog --start-datetime='2026-10-14 00:00:00' --stop-datetime='2026-10-15 12:00:00' /path/to/binlog.000123 | mysql -u root -p

Use the actual binlog files, coordinates or timestamps, credentials, and stop point for your environment. Review the generated stream and test the restored instance before directing applications to it. Binary logs cannot reconstruct transactions that were never recorded or whose files no longer cover the required interval.

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

Choose the recovery path that matches the backup type

Approach What is restored Version and file considerations Best fit
Logical SQL dump SQL statements that recreate schemas, tables, and data on a running, initialized server. It does not require copying InnoDB redo, undo, or tablespace files; the target server still needs compatible SQL features and sufficient time and space for import. Environments that can tolerate a new instance and an import, or migrations where physical layout compatibility is uncertain.
Physical file backup The server’s datadir and associated InnoDB files as a coordinated backup set. System tablespaces, per-table tablespaces, undo, redo, configured paths, and MySQL release must align with the backup method. Faster recovery when the backup tool supports the exact release and the complete file set is available.
Base backup plus binary logs A sound base backup followed by recorded transaction events up to a selected point. Binary logs must cover the interval and be readable; ordering and stop coordinates or timestamps must be controlled. Point-in-time recovery after replacing a corrupt or incomplete physical restore.

Downtime tolerance and evidence preservation affect the choice. A logical import may take longer but avoids guessing which physical files belong together. A physical restore can return a large instance faster, but only when its layout and version requirements are satisfied. If the original files may be needed for forensic recovery, keep them untouched while testing the alternative.

Destructive actions are a last-resort rebuild, not a startup fix

Deleting ibdata*, .ibd, undo, or redo files from the only restored copy can permanently remove data or metadata needed for recovery. A missing-file error does not prove that deletion will recreate a valid database.

File deletion belongs only to a controlled reinitialization or rebuild procedure in which:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • A separate, preserved copy of the failed restore exists.
  • You have confirmed that the intended outcome is to create a new empty instance or replace the files from a complete known-good backup.
  • The MySQL version’s official procedure explicitly permits the operation.
  • You have a tested path to reload a logical dump or restore a complete physical backup.

If those conditions are not met, stop and obtain experienced MySQL recovery assistance. Do not “clean up” a damaged datadir in place.

Use the first fatal line as the decision tree

First fatal evidence Most likely branch Safe next move
Errcode 13 or permission denied The mysqld account cannot traverse or access the datadir or a required path. Identify the service account, check parent directories and security policies, repair access narrowly, and retry once.
Missing file, tablespace, undo, or redo message The physical restore set is incomplete, misplaced, or inconsistent with configuration. Compare the manifest and configured paths; restore the coordinated set for the exact release.
Unknown variable or option-file error The restored configuration is not valid for this server version or contains an unintended override. Inspect included option files and remove or correct only the invalid setting after preserving the original.
Address already in use Another process owns the configured port, or a second instance is being started. Map processes to datadirs, stop the correct conflicting service, or isolate the test instance on another port.
InnoDB corruption or page-read failure The restored data is damaged or recovery cannot complete. Preserve the copy, test a known-good backup in isolation, then use binary logs for point-in-time recovery when available.

When to hand the incident to a specialist

Escalate before changing files when the only copy is affected, the backup manifest is incomplete, multiple MySQL versions have been mixed, encryption or external tablespace paths are involved, or corruption appears in system tablespaces. Provide the specialist with the preserved datadir, the complete error log, service-unit and option-file copies, version information, restore method, and a timeline of every command already run. That evidence is more valuable than an improvised deletion that removes the clues.

A successful recovery is not merely a service that starts. Verify that the instance is using the intended datadir, that expected schemas and tables are present, that applications can connect through the correct socket or port, and that the recovered data reaches the required point in time. Keep the failed copy until those checks and a fresh backup have completed.

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.
$208.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.
$208.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.

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.

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 quests from Patch Notes

  1. How to Set Up a RedM (RDR2) Server in 2026: License Key, txAdmin and server.cfg, Step by StepBlog11min
  2. Best RedM (RDR2) Server Hosting in 2026: Comparing Four Hosts on Slots, Memory and PriceBlog10min
  3. How to Host a Mindustry Server in 2026: server-release.jar, Port 6567 and the Commands That MatterBlog7min
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
PC Slower Than It Used to Be?Free scan - under a minute

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.