ds111 Posted January 23, 2009 Share Posted January 23, 2009 Hey, Can anyone please show me a PHP script that backs up a database without using the system command mysqldump? I need table structure as well as the table data. Edit: Looks like i can do this with: SELECT * INTO OUTFILE ..... but when i do that it throws out error: #1 - Can't create/write to file '/Library/Application Support/living-e/MAMP PRO/db/mysql/http:/localhost:8888/v2.0/db_backups/dbtest.txt' (Errcode: 2) how do i make it so that it is an absolute path? so that it doesn't have the library/application.... in front of it? Thanks! Thanks! Ben Quote Link to comment Share on other sites More sharing options...
dvd420 Posted January 23, 2009 Share Posted January 23, 2009 Where & how u r defining the PATH for this? Quote Link to comment Share on other sites More sharing options...
hobeau Posted January 23, 2009 Share Posted January 23, 2009 hi ds111, Instead of using a script, why not make it easy on yourself and use something like sqlyog (http://www.webyog.com/en/screenshots_sqlyog.php[/url)? That would make it much easier to either export a sql dump (data structure AND data) or into a csv or even transferring a table to another database instance. Quote Link to comment Share on other sites More sharing options...
ds111 Posted January 23, 2009 Author Share Posted January 23, 2009 this is part of a content management system. im defining the path by using the base_url that i have set up (its the http url to their website) and a /db_text.txt. i will take a look at that program. thanks! Edit: Oh, that program looks like its a GUI program to be downloaded and installed on the computer. Not good. I need it in PHP. 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.