rugzo Posted April 18, 2009 Share Posted April 18, 2009 Hi all, i made a teribble mistake by replacing values in my table. I used the replacement function in sql and made a query --> replace(field_name, 'value which should be replaced', value which i want to replace'). I made a mistake and choose a wrong field and was also stupid to make no backup. Is there any way to undo this. Maybe a log file or i don't know something. I am using xampp & phpmyadmin. I know i cannot do an undo with phpmyadmin but is there maybe any log file which shows the last query in xx place where i can copy paste the content and delete the bay statement query... Please if someone do a trick so please tell me. I am talking about 1300 values and this is not for my own use but at work... thanks in advance... Quote Link to comment https://forums.phpfreaks.com/topic/154677-solved-mysql-undo/ Share on other sites More sharing options...
premiso Posted April 18, 2009 Share Posted April 18, 2009 A backup would have been your only way. Unfortunate but no one can help you. I do not think that without using transactions you can un-do this in MySQL. Moving to the MySQL forum as someone there may know a way and that is the proper place for this. Quote Link to comment https://forums.phpfreaks.com/topic/154677-solved-mysql-undo/#findComment-813391 Share on other sites More sharing options...
Mchl Posted April 18, 2009 Share Posted April 18, 2009 DO you have binary logging enabled? Quote Link to comment https://forums.phpfreaks.com/topic/154677-solved-mysql-undo/#findComment-813392 Share on other sites More sharing options...
rugzo Posted April 18, 2009 Author Share Posted April 18, 2009 where can i check it if its enabled or not? Quote Link to comment https://forums.phpfreaks.com/topic/154677-solved-mysql-undo/#findComment-813396 Share on other sites More sharing options...
Mchl Posted April 18, 2009 Share Posted April 18, 2009 Search your my.ini file for log-bin If you don't know if you have it enabled, it's almost sure you haven't. Still there's a chance.. Quote Link to comment https://forums.phpfreaks.com/topic/154677-solved-mysql-undo/#findComment-813402 Share on other sites More sharing options...
rugzo Posted April 18, 2009 Author Share Posted April 18, 2009 i searched my whole computer but i couldn't find the my.ini file. I am using xampp can you please tell me where i can find it. Quote Link to comment https://forums.phpfreaks.com/topic/154677-solved-mysql-undo/#findComment-813411 Share on other sites More sharing options...
Mchl Posted April 18, 2009 Share Posted April 18, 2009 It seems that in xampp it's called my.cnf Quote Link to comment https://forums.phpfreaks.com/topic/154677-solved-mysql-undo/#findComment-813447 Share on other sites More sharing options...
rugzo Posted April 18, 2009 Author Share Posted April 18, 2009 ok, right now i am not on my pc, but lets assume i found it and its activated, what do i have to do then, please tell me... Quote Link to comment https://forums.phpfreaks.com/topic/154677-solved-mysql-undo/#findComment-813471 Share on other sites More sharing options...
rugzo Posted April 19, 2009 Author Share Posted April 19, 2009 i couldn't find the my.cnf file the only logs i found are in c:\xampp\mysql folder --> ibdata1 18.432KB ib_logfile1 5.120KB ib_logfile0 5.120KB Quote Link to comment https://forums.phpfreaks.com/topic/154677-solved-mysql-undo/#findComment-813672 Share on other sites More sharing options...
Mchl Posted April 19, 2009 Share Posted April 19, 2009 Alas, these aren't binary logs. These are recovery data for InnoDB tables in case of server crash. If you had binary log enabled, you could use mysqlbinlog to restore data. Quote Link to comment https://forums.phpfreaks.com/topic/154677-solved-mysql-undo/#findComment-813703 Share on other sites More sharing options...
rugzo Posted April 19, 2009 Author Share Posted April 19, 2009 Ok this was a good lesson for me. I did find a backup from 3 weeks ago. I just had to make the rest bymyself and did 3200 entries manually Thanks for the help Quote Link to comment https://forums.phpfreaks.com/topic/154677-solved-mysql-undo/#findComment-813833 Share on other sites More sharing options...
Mchl Posted April 20, 2009 Share Posted April 20, 2009 Try MySQL GUI Tools (downloadable from mysql.com). There's MySQL Administrator in there, where you can set up automated backups. Quote Link to comment https://forums.phpfreaks.com/topic/154677-solved-mysql-undo/#findComment-814308 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.