FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


making sql dump wit php





golles
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
ml
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
golles
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
ml
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
golles
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
ml
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
golles
the sql changes ever 24 hours so that is not posible. I'm not stupid I know how I can download it...
ml
i'll stop posting here. you still don't understand me Smile
Rhysige
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.
tojo
why not use free mysql backup utilities outthere?
there are many phpscripts can do this. Very Happy
eg.
http://www.0php.com/MySQL-Backup.php
Related topics
script backup database
SLOW UPLOADING AN SQL FILE
got this error..
Executing a .sql file through PHP
SQL
Baza danych
Need help with restoring phpBB!
[help] como mudar una BD?
Sql/Phpbb error...
what is dump?
How Tough is PHP - Part II
SQL import error
Using my local SQL dump on frihost
php sql import
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.