This will happen if the table contains an existing record with an id of 0 (or negative). Updating all existing records to use positive values will allow auto_increment to be set on that column.
Edit: Some people asked how that 0 got in there. For clarification, the MySQL Reference Manual states that "For numeric types, the default is 0, with the exception that for integer or floating-point types declared with the AUTO_INCREMENT attribute, the default is the next value in the sequence." So, if you performed an insert on a table without providing a value for the numeric column before the auto_increment was enabled, then the default 0 would be used during the insert. More details may be found at https://dev.mysql.com/doc/refman/5.0/en/data-type-defaults.html.
So what Restrict and Cascade mean : First thing to know is, Google Definition : The table containing the foreign key is called the child table, and the table containing the candidate key is called the referenced or parent table.
Here Foreign key is set as child of a Parent table,
Restrict on delete : it mean that you are restricted to delete a row in parent row ( record ) that is a reference of a foreign key.
Cascade on update: if a parent record ( reference column ) is updated, cascade will auto update the child row as well.