this is a popular error in drupal that you guys might have seen this before :
PDOException: SQLSTATE[42S02]: Base table or view not found, table .... does not exist.
when I'm trying to install drupal7, it reports an error that semaphore table does not exist. I tried to create it manually by this query
CREATE TABLE IF NOT EXISTS `semaphore` (
`name` varchar(255) NOT NULL DEFAULT '' COMMENT 'Primary Key: Unique name.',
`value` varchar(255) NOT NULL DEFAULT '' COMMENT 'A value for the semaphore.',
`expire` double NOT NULL COMMENT 'A Unix timestamp with microseconds indicating when the semaphore should expire.',
PRIMARY KEY (`name`),
KEY `value` (`value`),
KEY `expire` (`expire`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Table for holding semaphores, locks, flags, etc. that...';
it reported the same error. I changed InnoDB
to myISAM
and it worked!!!
I found out that tables with the InnoDB
engine are not supported in mysql on the server and unfortunately drupal7 creates all the tables with this engine by default. is there any way to change this default to MyISAM
?