Jag löste min 'utländsk nyckel-begränsning misslyckades problem genom att lägga till följande kod i början av SQL-koden (detta var för att importera värden till en tabell)
SET @example@sqldat.com@CHARACTER_SET_CLIENT;
SET @example@sqldat.com@CHARACTER_SET_RESULTS;
SET @example@sqldat.com@COLLATION_CONNECTION;
SET NAMES utf8;
SET @example@sqldat.com@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @example@sqldat.com@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @example@sqldat.com@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO';
SET @example@sqldat.com@SQL_NOTES, SQL_NOTES=0;
Lägg sedan till den här koden i slutet av filen
SET example@sqldat.com_SQL_MODE;
SET example@sqldat.com_FOREIGN_KEY_CHECKS;
SET example@sqldat.com_UNIQUE_CHECKS;
SET example@sqldat.com_CHARACTER_SET_CLIENT;
SET example@sqldat.com_CHARACTER_SET_RESULTS;
SET example@sqldat.com_COLLATION_CONNECTION;
SET example@sqldat.com_SQL_NOTES;