Upgrading MySQL 5.1 to 5.6 service failed to start

After upgrading from MySQL 5.1 to 5.6 , mysql service failed to start.InnoDB: auto-extending data file ./ibdata1 is of a different size 640 pages (rounded down to MB) than specified in the .cnf file: initial 768 pages, max 0 (relevant if non-zero) pages!

Source: Upgrading MySQL 5.1 to 5.6 service failed to start