Jump to content

Archived

This topic is now archived and is closed to further replies.

apitto

Backup MySQL using PHP

Recommended Posts

hai... could you help me with this problem. i just want to make a PHP script that could backing up mysql remotely. i dont want to access my server directly just to do this task.. please.
also any suggestion on how to upload file larger than 8MB using php..i can only upload about 6MB only...please.

Share this post


Link to post
Share on other sites
for backing up your MySQL db, you should check out the console command for mysqldump (or mysql_dump, I forgot) in combination with the exec() function.

for uploading bigger files, check the following

in php.ini

post_max_size = 8M; (set this to a higher number)
file_uploads = On; (make sure this is 'On')
upload_max_filesize = 8M (set this to a higher number)
memory_limit = 10M (set this somewhat higher than post_max_size)
max_execution_time (depending on the upload speed of client, you might want to set this to several minutes)

in httpd.conf (or whatever your apache config file is)
limitrequestbody = XXX (set this to your convenience)

Koen.

Share this post


Link to post
Share on other sites
i sorry, but i didn't work. only the upload is work but backup is not..please...
if you could post the code for backp...

Share this post


Link to post
Share on other sites
if you do not want to write the code yourself, take a look at this:

[a href=\"http://www.phpclasses.org/browse/package/2779.html\" target=\"_blank\"]http://www.phpclasses.org/browse/package/2779.html[/a]

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.