一个客户给了我他的 mysqldump(通过 phpmyadmin)要在我们的服务器上导入,但我在导入时收到以下错误:
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TABLE `agvGalerias` ADD CONSTRAINT `agvGalerias_ibfk_1` FOREIGN KEY (`idAutor' at line 3
运行错误的行是:
ALTER TABLE `agvGalerias`
ADD CONSTRAINT `agvGalerias_ibfk_1` FOREIGN KEY (`idAutor`) REFERENCES `agvUsuarios` (`idUsuario`) ON DELETE SET NULL ON UPDATE CASCADE,
ALTER TABLE `agvGalerias`
ADD CONSTRAINT `agvGalerias_ibfk_1` FOREIGN KEY (`idAutor`) REFERENCES `agvUsuarios` (`idUsuario`) ON DELETE SET NULL ON UPDATE CASCADE, ADD CONSTRAINT `agvGalerias_ibfk_2` FOREIGN KEY (`idModificador`) REFERENCES `agvUsuarios` (`idUsuario`) ON DELETE SET NULL ON UPDATE CASCADE;
客户端:
phpMyAdmin version: 2.9.0
Mysql version: 5.1.38
我这边:
Mysql version: 5.1.69
我将不胜感激一些帮助或指导来解决这个问题。