I have a Database in Local server named ’empData’ and i want that all the data from that database to be copied to another Database, which is in the another server(web server) with the name ’empDataBackup’.
I have tried this code mysql_query("INSERT INTO empData.backup_emp SELECT * FROM empData.emp");
But it did not work as both the databases are not in the same server…(as in our case one is in local and another is in web server)..
please help..
I have a Database in Local server named ’empData’ and i want that all
Share
Dump your data out using
mysqldumpand then pipe that file intomysqlto import the data somewhere else.On server1:
On server2:
If you want to get fancy, you could use pipes and ssh to pipe the data directly from server1 to server2.