LordLanky Posted July 2, 2009 Share Posted July 2, 2009 Hi All, my apologies if this isn't supposed to be on this forum - but the site i've designed is PhP and mySQL (the two most awesomest languages/platforms in the world;)). My website has been going for a while but i've just finished writing some major upgrades. This has involved changing a couple of database tables to add columns, adding new tables etc. The trouble i'm having is finding out how to preserve the data in the current live database and migrate it into the new database. As the tables have been modified, i assume it's not as simple as a sqldump then upload. Sorry if this is confusing, but any advice is appreciated. Chris Quote Link to comment https://forums.phpfreaks.com/topic/164576-managing-mysql-data-between-versions/ Share on other sites More sharing options...
Adam Posted July 2, 2009 Share Posted July 2, 2009 Actually, it is. You can just export the table structure and data, then either import the .sql file or paste it into SQL tab of your new database. Quote Link to comment https://forums.phpfreaks.com/topic/164576-managing-mysql-data-between-versions/#findComment-868035 Share on other sites More sharing options...
LordLanky Posted July 2, 2009 Author Share Posted July 2, 2009 Yoyoyo MrAdam. so even if a table structure has changed, if i just 'insert' the records i dumped from version-old into version-new, it'll know where to put the data? Maaaaaaaaan... my respect for mySQL just goes up and up... ORACLE has got to stop being so prudish! Quote Link to comment https://forums.phpfreaks.com/topic/164576-managing-mysql-data-between-versions/#findComment-868038 Share on other sites More sharing options...
Adam Posted July 2, 2009 Share Posted July 2, 2009 Whoops, I mis-read the title, thought it said "migrating". Erm no, not so easy. You'd probably be better creating a custom mysql_query function that will run it on both databases. Why does it need to be on 2 by the way? Would perhaps not hourly, daily or weekly backups not do the trick? Quote Link to comment https://forums.phpfreaks.com/topic/164576-managing-mysql-data-between-versions/#findComment-868041 Share on other sites More sharing options...
Adam Posted July 2, 2009 Share Posted July 2, 2009 Ha wait, after re-reading your post again I keep gettign confused, must be tired! Is it migrating data across from a previous version of MySQL, to a new one? NOT 'managing' two versions? Quote Link to comment https://forums.phpfreaks.com/topic/164576-managing-mysql-data-between-versions/#findComment-868046 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.