数据库迁移到云服务遇到1075 - Incorrect table definition
这几天把数据库迁移到云服务上,一直报这个错[ERR] 1075 - Incorrect table definition; 查了一下好像是数据库版本的问题?之前数据库版本是mysql5.6.现在云服务器上的版本是mysql5.7. 不知道要如何解决,请大神们帮忙. 具体报错信息如下:
[ERR] 1075 - Incorrect table definition; there can be only one auto column and it must be defined as a key
--
-- AUTO_INCREMENT for table `pre_common_member_security`
--
ALTER TABLE `pre_common_member_security`
MODIFY `securityid` mediumint(8) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `pre_common_member_stat_field`
--
ALTER TABLE `pre_common_member_stat_field`
MODIFY `optionid` mediumint(8) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- Indexes for table `pre_home_doing`
--
ALTER TABLE `pre_home_doing`
ADD PRIMARY KEY (`doid`),
ADD KEY `uid` (`uid`,`dateline`),
ADD KEY `dateline` (`dateline`);
[ERR] 1075 - Incorrect table definition; there can be only one auto column and it must be defined as a key
--
-- AUTO_INCREMENT for table `pre_common_member_security`
--
ALTER TABLE `pre_common_member_security`
MODIFY `securityid` mediumint(8) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `pre_common_member_stat_field`
--
ALTER TABLE `pre_common_member_stat_field`
MODIFY `optionid` mediumint(8) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- Indexes for table `pre_home_doing`
--
ALTER TABLE `pre_home_doing`
ADD PRIMARY KEY (`doid`),
ADD KEY `uid` (`uid`,`dateline`),
ADD KEY `dateline` (`dateline`);