简体   繁体   English

将数据库从本地服务器传输到远程Web服务器?

[英]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.

相关问题 从远程Web服务器连接到本地数据库 - Connecting to local Database from remote web server 写入本地数据库但从远程数据库/mysql-server 读取 - Write to local database but read from remote database/mysql-server 如何从远程服务器上的MySql数据库获取本地字符 - How to get local characters from MySql database on remote server 如何从godaddy中托管的远程服务器访问本地MySql数据库 - How to Access a local MySql database from a remote server hosted in godaddy 需要在php Web服务器中安装mysql才能访问远程服务器mysql数据库吗? - Need to install mysql in php webserver to access remote server mysql database? 使用PHP将表内容从localserver传输到远程服务器DB的代码 - Code for transfering the table content from localserver to remote server DB using PHP 如何在远程服务器上移动本地 MySql 数据库 - How to move a local MySql database on a remote server 使用本地域名将邮件从Web服务器发送到外部邮件服务器 - Sending mail from webserver to external mail server with local domain name 无法将文件从一台服务器传输到另一台服务器 - Trouble transfering file from a server to another server 将站点从演示服务器转移到实时服务器 - Transfering site from demo server to live server
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM