Avatar of ncw
ncw
 asked on

Php script to copy MySql database from one server to another via a remote connection

Is there a free Php script available that will copy a MySql database from a remote server to a host server via a remote connection? I can't do this using mysqldump because I don't have SSH access on the remote server. At the moment I'm having to download the Db via PhpMyadmin and upload on the new server via PhpMyadmin.
PHP

Avatar of undefined
Last Comment
gr8gonzo

8/22/2022 - Mon
Ray Paseur

How often do you want to do this?
gr8gonzo

If you have remote MySQL access on your remote server and SSH access on the new server, then you can simply run mysqldump from the new server and give it credentials to the old/remote server.

If you just need to do this on occasion with small databases, then I recommend you use HeidiSQL. It's a free MySQL GUI tool for Windows, and it has a feature that allows you to copy databases between servers (although the tool itself is labeled as "Export database to SQL" and you have to choose the new database as the destination in the popup). It's far superior to phpMyAdmin, in my opinion.
ncw

ASKER
As the title suggests, I'm looking for a Php script.

> How often do you want to do this?
May be once a month.
Your help has saved me hundreds of hours of internet surfing.
fblack61
ncw

ASKER
I've requested that this question be deleted for the following reason:

No solution found.
ASKER CERTIFIED SOLUTION
gr8gonzo

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.