I tried this but to no avail. What I surmise is that one of the following is holding this up from being an option. 1) I'm on a shared server so I will have to specify the location of the file to save in order to get to it afterwards. I tried specifying the path and the file name in the examples below but didn't get the resulting file as I expected. 2) Its possible that the web server does not have the command available as the mysql server is on another box, thus I won't be able to execute it. I am not familiar with mysql, so I'm not sure if this could be the case, is it possible to have the drivers and not the supporting utilities installed? 3) Somehow shell execution is not enabled (exec()). I do not think this is the case as I am not thrown an error. It would be possible though I would think that the php script process doesn't have access to execute that process maybe? Any suggestions or another method? Thanks a ton! Nate nnielsen@xxxxxxxxx -----Original Message----- From: Jason Wong [mailto:php-db@xxxxxxxxxxxx] Sent: Wednesday, November 17, 2004 12:11 AM To: php-db@xxxxxxxxxxxxx Subject: Re: mysql db dump with php On Wednesday 17 November 2004 13:51, Nate Nielsen wrote: > i need a script that will connect to a db with a username and password, and > then export to the screen scripts to both recreate the database structure > (the create table commands) and then create insert statements to populate > that information into the database. then of course, i need to run those > scripts on the other server to create the db and populate it. >From the command line of the system holding source database: mysqldump --opt -u username -p password nameofdatabase > nameofdatabase.sql Now take the created file nameofdatabase.sql and place onto the system holding destination database. Then from the command line of the system holding destination database: mysql -u username -p password < nameofdatabase.sql If you don't have direct access to the command line use php's program execution functions. > if you can hook me up i'll paypal you $20 bucks to buy you and yours a few > pints of your favorite ale on me. Donate it to your local Red Cross/Red Crescent or equivalent. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * ------------------------------------------ Search the list archives before you post http://marc.theaimsgroup.com/?l=php-db ------------------------------------------ /* Logoff in progress... */ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php