dlebowski Posted April 7, 2009 Share Posted April 7, 2009 Hello. I have been using mysql and phpmyadmin for quite a while and came across a question the other day that I couldn't answer. Is it possible to import in a new database structure (i.e. - i added some new tables, and modified other tables) without overriding the existing database data? Basically I have a number of different databases that all have the same structure. If I update the database structure, it would be much easier to be able to import the new structure without compromising the existing data. Please let me know if anyone is aware of a way to do this. Thanks. Ryan Quote Link to comment https://forums.phpfreaks.com/topic/153013-solved-phpmyadmin-mysql-db-structure-update-without-overwriting-data/ Share on other sites More sharing options...
revraz Posted April 7, 2009 Share Posted April 7, 2009 The only way you would mess up existing data is if you actually UPDATE those tables. If you add new tables, then your old tables don't get touched. Hard to tell exactly what you are asking. Quote Link to comment https://forums.phpfreaks.com/topic/153013-solved-phpmyadmin-mysql-db-structure-update-without-overwriting-data/#findComment-803653 Share on other sites More sharing options...
dlebowski Posted April 7, 2009 Author Share Posted April 7, 2009 I am referring to the import feature in phpmyadmin. Sorry I'm unclear. I'm not good with explaining myself on here. If I am in phpmyadmin, can I use that import feature to import new db structures without overwriting the existing data? Quote Link to comment https://forums.phpfreaks.com/topic/153013-solved-phpmyadmin-mysql-db-structure-update-without-overwriting-data/#findComment-803656 Share on other sites More sharing options...
revraz Posted April 7, 2009 Share Posted April 7, 2009 Well are the table names different? What exactly are you importing? You can always test it with a test database first. Quote Link to comment https://forums.phpfreaks.com/topic/153013-solved-phpmyadmin-mysql-db-structure-update-without-overwriting-data/#findComment-803660 Share on other sites More sharing options...
dlebowski Posted April 7, 2009 Author Share Posted April 7, 2009 I would just want to update the table structure. The table names would never be different. It would just be adding new tables or new fields to existing tables. Basically I have my development database and then my "live" databases. I want to make changes to the development database structure, export it, then import it into the live databases without messing up the existing data in the database. Quote Link to comment https://forums.phpfreaks.com/topic/153013-solved-phpmyadmin-mysql-db-structure-update-without-overwriting-data/#findComment-803664 Share on other sites More sharing options...
fenway Posted April 14, 2009 Share Posted April 14, 2009 No, phpmyadmin won't give you an ALTER "diff" that you can run. Quote Link to comment https://forums.phpfreaks.com/topic/153013-solved-phpmyadmin-mysql-db-structure-update-without-overwriting-data/#findComment-809664 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.