Search blog

Friday, September 5, 2014

Drupal cache_rules error, Error: Tablespace for table abc exists. Please DISCARD the tablespace before IMPORT

I got these queer error today with my site viz:

Error #1. 'cache_rules does not exist in database'
Error #2: 'Error: Tablespace for table abc exists. Please DISCARD the tablespace before IMPORT' in XAMPP using phpMyAdmin & MySQL.

There are various ways to fix these errors. I've listed them below:

Solution 1. Manually create the table using the following SQL query:

DROP TABLE cache_rules ;
CREATE TABLE IF NOT EXISTS `cache_rules` (
  `cid` varchar(255) NOT NULL DEFAULT '' COMMENT 'Primary Key: Unique cache ID.',
  `data` longblob COMMENT 'A collection of data to cache.',
  `expire` int(11) NOT NULL DEFAULT '0' COMMENT 'A Unix timestamp indicating when the cache entry should expire, or 0 for never.',
  `created` int(11) NOT NULL DEFAULT '0' COMMENT 'A Unix timestamp indicating when the cache entry was created.',
  `serialized` smallint(6) NOT NULL DEFAULT '0' COMMENT 'A flag to indicate whether content is serialized (1) or not (0).',
  PRIMARY KEY (`cid`),
  KEY `expire` (`expire`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Cache table for the rules engine to store configured items.';


Solution 2: If the above solution doesn't work for you and you get error relating to 'tablespace' saying 'Error: Tablespace for table abc exists. Please DISCARD the tablespace before IMPORT' in XAMPP using phpMyAdmin & MySQL.'

There might be either one of the two or both the files 'tablename.ibd' or 'tablename.frm' files left in the location 'C:\xampp\mysql\data\database_name\' Delete those files, in our case it will be 'cache_rules.ibd' or 'cache_rules.frm.' Your problem should be resolved now and you should be able to create/import the 'cache_rules' table.

You might also check the following solution for your 'tablespace' issue: http://tinyurl.com/me69h6x

Wednesday, September 3, 2014

How I Drastically Improved My Windows 7 Startup Time/Boot Time

Since quite sometime my computer had begun to boot up quite slowly. It was taking a good three and half minutes for my HP DV6 laptop, which has the following specification to boot up:
  • Core i7 processor
  • 4 GB RAM
  • Windows 7 (64 bit)
Finally today I decided to fix this menace, once and for all:

Here's what worked for me after several rounds of trials and tribulations:

1. Goto Start and type Run.
2. Once in run type 'msconfig'
3. Click on the Services tab and also check the option 'Hide all Microsoft services'; this will help you in filtering and viewing only the services of software you installed.  I tested and found out that usually not the Microsoft services that causes the delay, but you can disabled services you aren't using such as Fax and Parental Controls. (see fig. below)

4. Now, you can enable a list of services,  Click on Apply and restart and test. You can disable some items from the Startup also. Click on the Startup tab to do this.You might have to try this a couple of times to find the main culprit. Once you've identified it disable that buggy service and things should be fine for you.

I used a software called Glary Utilities to check my Boot time and you can see I've made a massive improvement with my Startup Time.





Top 5 Posts (Weekly)