1

My issue is the following : I have a local database running on EasyPhp server :

  • WEB server : Apache/2.4.7 (Win32) PHP/5.5.8
  • DB server : 5.6.15-log - MySQL Community Server (GPL)
  • PHPMYADMIN : version 4.1.4

And a remote rented server :

  • WEB server : Apache/2.4.18
  • DB server : 5.5.49-0+deb8u1-log (Debian)
  • PHPMYADMIN : version 4.6.3

When I export my database in a .sql.zip file from the local phpmyadmin it correctly creates a file containing the references creating lines :

Example :

ALTER TABLE `t_transaction`
  ADD CONSTRAINT `t_transaction_ibfk_2` FOREIGN KEY (`fkEvent`) REFERENCES `t_event` (`idEvent`),
  ADD CONSTRAINT `t_transaction_ibfk_1` FOREIGN KEY (`fkSociete`) REFERENCES `t_societe` (`idSociete`);

As well, in the local phpmyadmin "conceptor" tab, I can see the relations displayed with colored lines.

But when I import this file into the remote server (using phpmyadmin) it ignores any relation : they simply vanish from the conceptor window and the "table structure" tab.

All tables (local ones as well as remote ones) work with InnoDB engine.

I tried to recreate the relations with the conceptor It simply doesn't work, no error messages or anything.

I tried to create the relations with SQL query it doesn't work either. I get no error message (Your request has been executed with success) on first attempt and on second attempt it throws the message "Error creating the foreign Key, check data type" as if the relation existed somewhere.

Both columns are INT(8).

The foreign key is an index and the reference is primary.

I made tons of research but this seems to be quite a unique case...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.