To create mysql foreign key the table engine must be InnoDB and the version is 5.
Command
------
CREATE TABLE `bookings` ( id INT , customer_id INT , FOREIGN KEY `customer_id` REFERENCES customer(id))ENGINE=INNODB;
ALTER TABLE `bookings` ADD CONSTRAINT FOREIGN KEY `customer_id` REFERENCES customer(id);