Cardale Posted December 4, 2009 Share Posted December 4, 2009 I need to restore some database files so I can use them. I don't mean a backup from mysql I mean the actual database files (using ubuntu) in var/lib/mysql/dbname anyone know how to do this? Quote Link to comment https://forums.phpfreaks.com/topic/183923-restore-database-from-actual-db-files/ Share on other sites More sharing options...
rajivgonsalves Posted December 4, 2009 Share Posted December 4, 2009 just copy the files to the folder, does that not work ? Quote Link to comment https://forums.phpfreaks.com/topic/183923-restore-database-from-actual-db-files/#findComment-970928 Share on other sites More sharing options...
Cardale Posted December 4, 2009 Author Share Posted December 4, 2009 They are showing up as empty databases. Maybe permissions are wrong? What should they be. Quote Link to comment https://forums.phpfreaks.com/topic/183923-restore-database-from-actual-db-files/#findComment-970929 Share on other sites More sharing options...
Cardale Posted December 4, 2009 Author Share Posted December 4, 2009 Well got it working, but I am sure permissions are messes up now. What are the recommened permissions here? Quote Link to comment https://forums.phpfreaks.com/topic/183923-restore-database-from-actual-db-files/#findComment-970930 Share on other sites More sharing options...
rajivgonsalves Posted December 4, 2009 Share Posted December 4, 2009 Yes you'll have to change the permissions also the ownership to mysql:mysql see the other databases in the file system your listing starting should look like this -rw-r----- mysql mysql thats 640 I think if I am right, but make sure the owner is mysql (chown mysql:mysql *) Quote Link to comment https://forums.phpfreaks.com/topic/183923-restore-database-from-actual-db-files/#findComment-970933 Share on other sites More sharing options...
Cardale Posted December 4, 2009 Author Share Posted December 4, 2009 It is letting me read database, but not delete... even when files are chown to mysql mysql and 777 even it doesn't allow any deleting....any other ideas? Thanks by the way. Quote Link to comment https://forums.phpfreaks.com/topic/183923-restore-database-from-actual-db-files/#findComment-970936 Share on other sites More sharing options...
rajivgonsalves Posted December 4, 2009 Share Posted December 4, 2009 you might want to restart your mysql deamon, also check the privileges for the table just copying them over might have damaged some of the information I'm not sure about this its been a long time since I have tried this out. Quote Link to comment https://forums.phpfreaks.com/topic/183923-restore-database-from-actual-db-files/#findComment-970937 Share on other sites More sharing options...
Cardale Posted December 4, 2009 Author Share Posted December 4, 2009 ahh reboot did it. Gonna have to remember that Thanks rajivgonsalves. Quote Link to comment https://forums.phpfreaks.com/topic/183923-restore-database-from-actual-db-files/#findComment-970941 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.