Yep, I've seen that too on my XAMPP installation when MySQL isn't shut down properly. Any tables that are of Type
InnoDB are easily corrupted and show "In use" in their Collation column when viewing all tables in the database.
In your localhost phpMyAdmin, click on the database name to view all tables in the database. For a standard installation, there are three tables that are created with an InnoDB type: customers_to_groups, customer_groups and sessions.
If any of those tables show
In use, view the /{xampp-directory}/mysql/data/{database-name} directory. For each of the
In use tables, you'll see two files: {table-name}.frm and {table-name}.ibd. Delete them both.
Stop and then re-Start MySQL via the XAMPP console. Navigate to the localhost phpMyAdmin, click on the database's name (to select it) and enter the following in the SQL tab's textarea input
Code:
CREATE TABLE IF NOT EXISTS customer_groups (
group_id int UNSIGNED NOT NULL AUTO_INCREMENT,
group_name varchar(191) NOT NULL,
group_comment varchar(255),
date_added timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
updated_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (group_id),
UNIQUE KEY idx_groupname_zen (group_name)
);
CREATE TABLE IF NOT EXISTS customers_to_groups (
id int UNSIGNED NOT NULL AUTO_INCREMENT,
group_id int UNSIGNED NOT NULL,
customer_id int UNSIGNED NOT NULL,
date_added timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
updated_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (id),
UNIQUE KEY idx_custid_groupid_zen (customer_id, group_id),
KEY idx_groupid_custid_zen (group_id, customer_id)
);
CREATE TABLE IF NOT EXISTS sessions (
sesskey varchar(191) NOT NULL default '',
expiry int(11) unsigned NOT NULL default 0,
value mediumblob NOT NULL,
PRIMARY KEY (sesskey)
) ENGINE=InnoDB;
Bookmarks