I do have lots of data stored in my local开发者_JAVA技巧 server in MySQL database and I want to transfer the same to newly purchased server. this server comes with PHP mySQl installation so how can I transfer the data and later say after 1 month update the whole data with new data. How can I do this?
Create a binary backup from your local MySQL database server, copy the backup file to your newly purchased server, and restore the backup file. Repeat this in one month with your new data.
You didn't specify what version of MySQL you are using, but other database backup methods from MySQL 5.1 can be found here: http://dev.mysql.com/doc/refman/5.1/en/backup-methods.html
You can retrieve information from your local server and - via AJAX protocol - send it to the new server's url. Example: Your localhost server:
//local_host/localdatabaseconection.php
... retrieve data in xml format
jquery ajax SQL to new server:
$.get("http://new_server_url.php", {get xml data as JSON notation }, function(result){
$("div").html(result);
}
The trick is to set the right url address. You can even set real-time backups between two different servers. Hope it helps, bye.
精彩评论