Doctor_Cox Posted March 20, 2008 Share Posted March 20, 2008 Gentlemen, The problem of how to generate a MySQL backup quickly via PHP quickly and efficiently has been stumping me for a while. I know the mysqldump trick, but for some reason under cPanel it generates needlessly bloated SQL I cannot even feed into phpMyAdmin. I have examined phpMyAdmin's code, but cannot figure out the exact part which enables it to export SQL so quickly. So I have been left with no choice to write code that generates insert statements one at a time. Very inefficient, and now my boss is getting maximum execution timeouts on one particularly large database. Any insight that you might be able to offer would be much appreciated. Quote Link to comment Share on other sites More sharing options...
teng84 Posted March 20, 2008 Share Posted March 20, 2008 not quite sure but try to cut your file try using outfile.. Quote Link to comment Share on other sites More sharing options...
cunoodle2 Posted March 20, 2008 Share Posted March 20, 2008 I did a search on google and came up with this... http://programsdb.com/script/742/15192/MySQL_database_backup.html Quote Link to comment Share on other sites More sharing options...
Doctor_Cox Posted March 26, 2008 Author Share Posted March 26, 2008 not quite sure but try to cut your file try using outfile.. From the looks off this will save a file to the server, which is not really what we want. I want a download backup option. I did a search on google and came up with this... http://programsdb.com/script/742/15192/MySQL_database_backup.html This performs backups the same way I do - but selecting all the lines then building insert queries with them. Works OK on small tables, but not when you are trying to download a series of tables containing no less than 249204 lines total, you need something a bit more efficient. Thanks for the effort though, will keep looking. Quote Link to comment 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.