Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I need to migrate a website to another host. I have only FTP server access and MySQL name+pass (the MySQL server's IP I was provided is 127.0.0.1, and there's neither PhpMyAdmin nor SSHell to use). A web app run there can access the DB using credentials I know and localhost server. So I'd need a PHP script, that will correctly dump all the available databases of the MySQL server so that they can be imported on the new server. Can you recommend a good one?

share|improve this question
add comment

2 Answers

Mysqldump is what you are looking for, though its written in perl (all nix's have perl)

share|improve this answer
    
I'll try if I find no other solution, but that's a strictly sandboxed shared PHP hosting (the ISP provides only static, PHP and ASP tariffs), it may not have Perl enabled (but may have, worth a try). –  Ivan Oct 4 '10 at 5:11
add comment

Hmmm my first mind was:

<?php
$command = 'mysqldump -h hostname -u user -p password db_name > dumped_db.db';
system($command);
?>

Anyway here is a class:

http://www.phpclasses.org/browse/file/16861.html

And ready tool (Bigdump is really cool!):

http://www.ozerov.de/bigdump.php

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.