Reinstalling Magento database
This is an old revision of the document!
During beta stage Magento will validate version of database structure against the modules versions to address frequent version updates.
This will happen every time a page loads and configuration file or one of the core tables in db has been changed.
When it sees that module version is greater than one installed in database it will run upgrade scripts module provides.
If there’s no indication that this module has been installed, it will run first the most recent available install script.
It is possible to reinstall the database from scratch at any time.
The simplest way is just to drop the database and recreate it.
If you do not have permissions to delete database, you will need to run mode change before running your drop tables statement and then return as it was before.
Here’s one way to do this:
- SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
- SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
After the database is clean, point your browser to one of the Magento pages.
It will take up to a minute, depending on your machine performance, to recreate the database.
When the page loads, you database will have the original installation structure updated to the most recent version of modules.