I have this situation. The site that I'm working with has MySQL configured without InnoDB. My Ubuntu localhost has MySQL server running with InnoDB.

Question: If I export the MySQL database of the remote site and import it to my local Ubuntu MySQL , will that work without any issues? Supposing I export it using the mysql command line mysqldump and restore it via command line too. The database is a bit large so I need to check first whether this will work.

I'm planning to import it locally so I can test the site for the functionalities needed. Please let me know if this plan will work. Thanks :)

有帮助吗?

解决方案

First if mysqldump have engine=InnoDB statement in CREATE TABLE block, Then it could possible to import failure if Local MySQL is not configured to use InnoDB (I personally think InnoDB is always available, However it could be non default engine).

After successful import, It may be automatically converted to default MyISAM Engine. So All foreign keys and InnoDB related objects will not imported in this case. Now if your application very much depend on DB based Foreign keys mechanism, Then it can broke. Otherwise things should work like before.

Personally I imported InnoDB databases before end they automatically converted to MyISAM. Application work seemlessly as That manage constraints on Application side (in MVC Models).

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top