Web application have a unique way of killing themselves it seems. Thankfully, magento has a nice database repair utility where you can compare a clean and working database against a corrupt database. If there are any indiscretions in the corrupted database, they will be resolved like magic! The best database to use as the "clean" one is a brand-spanking new database from a fresh off the press magento installation. However, magento is bloated and takes forever to install and maybe we simply don't want to wait.

Amazingly enough, we have finally compiled various magento version databases! No longer do you need to wait for things to install and consume bandwidth and disk space on your local machines or servers. It's as easy as downloading, extracting, and then importing the database on your local machine or server.

  • Installed on Win 7 x64_86
  • Installed via XAMPP 1.8.0
  • Apache 2.4.2
  • MySQL 5.5.25a
  • Exported in UTF-8 Encoding

SSH Access

Run the following commands:

mysql -u username -p

CREATE DATABASE mage_XXXX_clean; # Replace XXXX with the four-digit version
CREATE USER 'user_name'@'localhost' IDENTIFIED BY 'some_pass'; # Replace user_name with a username and some_pass with a password
GRANT ALL PRIVILEGES ON mage_XXX_clean.* TO 'user_name'@'localhost'; # Make sure mage_XXXX_clean is the name of the database you just created
quit

mysql -u user_name -p mage_XXXX_clean < mage_XXXX.sql

That's it, the database is now imported and ready to be used. Open up the database repair script, enter your credentials for your two databases and wait for the script to run.

cPanel

If you are fortunate enough to have cPanel then follow the steps below:

  1. Create a database
  2. Create a user
  3. Add user to database with all privileges
  4. Extract clean magento database
  5. Rename clean mage database to the database that was just created e.g. somethin_mageclean.sql (most cPanel installs will have the first 8 letters of your domain name as the user portion)
  6. Navigate to backup in cPanel and find the restore database option
  7. Upload the clean database .sql file

phpMyAdmin

  1. Click on databases and create a new database as Collation
  2. Navigate to users and either create a new user or add an existing user to the newly created database
  3. Select the recently created database and navigate to the import tab
  4. Upload database

In the event you encounter errors using this method, disable foreign key checks:

  1. With the database selected, go the the SQL field and enter in: SET foreign_key_checks = 0;
  2. Upload database
  3. When upload is complete run SET foreign_key_checks = 1;

Note: If your version isn't here, it will be soon! All databases will be gzipped. You will need a utility to extract them such as 7-zip

Magento Version Database Download Link
Magento CE 1.7.0.2 Magento CE 1.7.0.2 Database (901)
Magento CE 1.7.0.1 Magento CE 1.7.0.1 Database (576)
Magento CE 1.7.0.0 Magento CE 1.7.0.0 Database (574)
Magento CE 1.6.2.0 Magento CE 1.6.2.0 Database (635)
Magento CE 1.6.1.0 Magento CE 1.6.1.0 Database (632)
Magento CE 1.6.0.0 Magento CE 1.6.0.0 Database (615)
Magento CE 1.5.1.0 Magento CE 1.5.1.0 Database (586)
Magento CE 1.5.0.1 Magento CE 1.5.0.1 Database (617)
Magento CE 1.4.2.0 Magento CE 1.4.2.0 Database (612)
Magento CE 1.4.1.1 Magento CE 1.4.1.1 Database (599)
Magento CE 1.4.1.0 Magento CE 1.4.1.0 Database (603)
Magento CE 1.4.0.1 Magento CE 1.4.0.1 Database (609)
Magento CE 1.4.0.0 Magento CE 1.4.0.0 Database (583)
Be Sociable, Share!