[英]Transfering database from local server to remote webserver?
I do have lots of data stored in my local server in MySQL database and I want to transfer the same to newly purchased server. 我确实有很多数据存储在本地服务器的MySQL数据库中,并且我希望将其传输到新购买的服务器。 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. 此服务器随附PHP mySQl安装,因此我该如何传输数据,后来又说1个月后用新数据更新整个数据。 How can I do this? 我怎样才能做到这一点?
You can retrieve information from your local server and - via AJAX protocol - send it to the new server's url. 您可以从本地服务器检索信息,并通过AJAX协议将其发送到新服务器的url。 Example: Your localhost server: 示例:您的本地主机服务器:
//local_host/localdatabaseconection.php
... retrieve data in xml format ...以xml格式检索数据
jquery ajax SQL to new server: jQuery Ajax SQL到新服务器:
$.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. 诀窍是设置正确的URL地址。 You can even set real-time backups between two different servers. 您甚至可以在两个不同的服务器之间设置实时备份。 Hope it helps, bye. 希望能有所帮助,再见。
Create a binary backup from your local MySQL database server, copy the backup file to your newly purchased server, and restore the backup file. 从本地MySQL数据库服务器创建二进制备份,将备份文件复制到新购买的服务器,然后还原备份文件。 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 您没有指定要使用的MySQL版本,但是可以从以下位置找到MySQL 5.1的其他数据库备份方法: http : //dev.mysql.com/doc/refman/5.1/en/backup-methods.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.