I must be missing something obvious, but still…
I get MySQL ERROR 1064 (42000) when I try to run the following:
CREATE TABLE `mgr_user`
(
`id` INT NOT NULL AUTO_INCREMENT,
`customer_id` INT NOT NULL,
`username` VARCHAR(25),
`password` VARCHAR(100),
INDEX(`customer_id`),
FOREIGN KEY `customer_id` REFERENCES `customer`(`id`) ON UPDATE CASCADE ON DELETE RESTRICT
);
You need to wrap around the foreign key name with parenthesis. Also your auto column must be a key. See bellow
After these 2 changes, I got
Query OK, 0 rows affected (0.07 sec)