CREATE TABLE IF NOT EXISTS `locations` (
  `locid` mediumint(8) unsigned NOT NULL,
  `latitude` float(8,4) NOT NULL,
  `longitude` float(8,4) NOT NULL,
  `ipcount` int(10) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`locid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `locations` (
  `locid` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  `latitude` float(8,4) NOT NULL,
  `longitude` float(8,4) NOT NULL,
  `ipcount` int(10) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`locid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=0;

Change Location table to use Auto Increment key.
Change Location table to use Auto Increment key.
