Jump to content

Backup MySQL using PHP


apitto

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.
Link to comment
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.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.