Hey I wondering if it is posible and how I can let a php file download a complete dump of an database. someone has acces to import and delete users with it, but I want him to back-up it. That person don't have acces to cpanel.
so the user should click a link and then it will be able to download it the .sql file
thanks in advance
//golles
Last edited by golles on Fri Nov 18, 2005 9:59 am; edited 1 time in total
probable youll hav phpmyadmin on yozur account.
so select 'dump', make you configurations and hit the ok button for the first time.
now look in the upper half of the following page for the sql-code mysql executed in integrate it in your page
Like I told above I don't want that person to have acces to the cpanel.
I want a link on a page (I will password protect it) with something like this:
Download back-up. and if you click on it it will download the .sql file
//golles
Last edited by golles on Fri Nov 18, 2005 10:00 am; edited 2 times in total
youll only have to go the way through phpmyadmin for the first time to geht the sql-code for the dump
sth like:
| Code: |
| DUMP * FROM table param1, param2 |
then you take this code an put it into your own php script and link with "create dump" on it
Like I said: that it should be done with a .PHP file not via phpmyadmin coz that person where I'm making this for has no acces to it.
what do you not understand about this?
I bolded the important things. you should understand what I mean if you read the bold text
| Quote: |
| what do you not understand about this? |
what do YOU not understand about my solution?
you only have to go in phpmyadmin for the first time to get the code,
you do it once, and nobody has to do it ever again
the sql changes ever 24 hours so that is not posible. I'm not stupid I know how I can download it...
i'll stop posting here. you still don't understand me 
http://www.php-mysql-tutorial.com/perform-mysql-backup-php.php
^ read that it will tell you ways to do it.
But the other guys where not telling you that you have to access phpmyadmin every time only that by doing so once you can get the query phpmyadmin uses to dump the database. Once you know what the query is you mimick it and never need to access it again.
why not use free mysql backup utilities outthere?
there are many phpscripts can do this.
eg.
http://www.0php.com/MySQL-Backup.php