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
https://forums.phpfreaks.com/topic/8531-backup-mysql-using-php/
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
https://forums.phpfreaks.com/topic/8531-backup-mysql-using-php/#findComment-31234
Share on other sites

Archived

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

×
×
  • 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.