CREATE DATABASE IF NOT EXISTS test; USE test; CREATE TABLE IF NOT EXISTS test_insert ( test_insert_id int NOT NULL AUTO_INCREMENT, some_string varchar(255), primary key (test_insert_id) ) ENGINE=InnoDB; CREATE TABLE IF NOT EXISTS test_trigger ( id int auto_increment, some_string varchar(255), primary key (id) )