How to Restore Old MySQL Databases to New XAMPP Installation?

Summary: You may need to restore old MySQL databases to new XAMPP installation when migrating or upgrading to new XAMPP server version. This post explains the step-by-step procedure to restore the old MySQL databases to new XAMPP installation. It also mentions a specialized MySQL repair tool that can come in handy if your MySQL database gets corrupted.

You usually need to install a new server when you’re facing issues with your existing installation or when you’re upgrading to a higher version. Whatever be the case, you need to also restore databases from old server to the new server. So, if you’re using XAMPP with MySQL and installed a new server and need to restore old MySQL databases to new XAMPP installation, then read this post. Here, we will discuss the methods with stepwise instructions to restore MySQL databases to a new XAMPP installation.

Methods to Restore MySQL Database to New XAMPP Installation

If you’ve backup of the database, then you can use PhpMyAdmin utility in your XAMPP server to restore the database. However, if PhpMyAdmin fails to restore the database, then you can use backup directories to restore the database. Below, we will discuss these methods in detail.

Method 1: Use PhpMyAdmin to Restore the Database

If you’ve an updated backup of MySQL database, you can use PhpMyAdmin to restore the database to new XAMPP server. You can access the PhpMyAdmin utility only from the same host that XAMPP is running on http://localhost Follow the steps given below to restore database using PhpMyAdmin:

Now, you can export the restored database to the new XAMPP server to access it. To export the database, follow the same steps but instead of Import, click the Export option.

Method 2: Use Backup Directories to Restore MySQL Databases

PhpMyAdmin may fail to restore MySQL database when there is some issue with the backup database file (it is corrupted or in incorrect format). In such a case, you can use directories to restore the MySQL database manually. In this method, you need to copy the MySQL database from the Backup Directories to the new location. Here are the steps to restore old MySQL databases to new XAMPP installation using Directories:

Note: The data folder contains all the MySQL files (data file and log file) that you need to restore your database.

What if you Fail to Restore the MySQL Database?

You may fail to restore the old MySQL databases or encounter issues after restoring the databases, if the database files are corrupted, damaged, or inaccessible. In such a case, you need to repair the corrupted/damaged MySQL database. For this, the best option is to use an advanced MySQL database repair tool, like Stellar Repair for MySQL. With this tool, you can repair the corrupt MySQL databases and restore all the data quickly and efficiently. It can repair corrupt InnoDB and MyISAM tables of the MySQL database. It helps restore all the database objects, including primary keys, triggers, etc., with complete integrity.  

With this advanced MySQL repair software, you can:

Conclusion

Above, we’ve explained the methods to restore old MySQL databases to new XAMPP installation.  You can import MySQL database from the backup file using PhpMyAdmin or use the backup directories to restore the databases manually. If the database is corrupted or damaged, then you can repair it using Stellar Repair for MySQL. It is a specialized MySQL database repair tool that can repair database created in MyISAM or InnoDB and recover all the data while preserving the original table structure and formatting. The tool supports MySQL versions 8.0.36 and lower, including MariaDB up to 11.3.2.

Related Post

Exit mobile version