My mistake on the SQL. If the table is there then change that SQL to this:   REPAIR TABLE `sessions`   If the table is not there then run this instead:   DROP TABLE IF EXISTS sessions; CREATE TABLE sessions ( sesskey varchar(32) NOT NULL, expiry int(11) unsigned NOT NULL, value text NOT NULL, PRIMARY KEY (sesskey) );