Get rid of your single quotes or as @Joachim Isaksson said, use backticks `.
CREATE TABLE categories (id SMALLINT NOT NULL AUTO_INCREMENT, category VARCHAR(30) NOT NULL, PRIMARY KEY (id), UNIQUE KEY(category) ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
Also next time, simplify your problem. You have a problem with the first CREATE TABLE
statement. There is no need to print everything else. Also some formatting would be nice too :-).