1

I am having a big problem with a project. I have a database un dev with some data and a database in production, with another data. I want to migrate the data from dev to production keeping de hierarchy of the tables. Real case: I want to move one creche from dev to production, creche has students, students have parents, etc.

What could I do for make that possible? Export an SQL from a database with X primary key and insert in another having autoincremental value and child relationship

Thanks in advance, If you do not understand, please write a comment and I will redo de question hehe.

Tapasa
  • 66
  • 7
  • Possible duplicate of [MySQL: How to export and import a .sql file from command line?](https://stackoverflow.com/questions/11407349/mysql-how-to-export-and-import-a-sql-file-from-command-line) – Aaron Thompson Oct 16 '17 at 14:50
  • I want to export data too – Tapasa Oct 16 '17 at 14:53
  • 1
    For MySQL, you could use PHPMyAdmin to export the production database, with all the data. Then import back into DEV. That is if you want to copy the whole database. If you only need partial extract, and want to maintain referential integrity, you will have to write SELECT - INSERT statements based on the logic of your database. I doubt there are tools that do this for you (others might know of one?). – Nic3500 Oct 16 '17 at 14:59

0 Answers0