同步MySQL远程&使用phpMyAdmin的本地数据库 [英] Synchronize MySQL remote & local database using phpMyAdmin

查看:106
本文介绍了同步MySQL远程&使用phpMyAdmin的本地数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个本地MySQL数据库,该数据库偶尔会更改,当它更改时,我想将其与远程数据库同步.我正在使用PhpMyAdmin的同步选项.

I have local MySQL database which changes occasionally, when it changes I want to synchronize it with Remote database. I am using PhpMyAdmin's synchronize option for it.

我已授予所有IP远程连接的权限.

I have given permissions to all IP to connect remotely.

问题: 当我想使用PhpMyAdmin的syncize选项将远程数据库与本地数据库同步时.它仅显示数据库结构差异,但两个数据库上的数据也不同,但未显示该差异.

Problem: When I want to synchronize remote database with local database using synchronize option of PhpMyAdmin. It only shows the database structure difference but data is also different on both the databases but it is not showing that difference.

当我通过单击Synchronize Database按钮同步数据库并再次进行同步时.再次显示相同的结构同步.

And when I synchronize the database by clicking Synchronize Database button and again do synchronization. It again shows same structure synchronization.

请参见下图

如果有人有替代解决方案,请也告诉我. 本地详细信息 操作系统:Windows7 软体:EasyPHP12.0 远程详细信息 服务器:Linux Cpanel PhpMyAdmin

If anyone have alternate solution for it please also tell that. Local Details OS: Windows7 Software: EasyPHP12.0 Remote Details Server: Linux Cpanel PhpMyAdmin

推荐答案

打开phpMyAdmin/config.inc.php并添加有关服务器配置" 的这些行.

Open phpMyAdmin/config.inc.php and add these lines about "Server Configuration".

$i++;
$cfg['Servers'][$i]['host']          = '<remote-server-address>'; // Remote MySQL hostname or IP address
$cfg['Servers'][$i]['port']          = '';          // MySQL port - leave blank for default port
$cfg['Servers'][$i]['socket']        = '';          // Path to the socket - leave blank for default socket
$cfg['Servers'][$i]['connect_type']  = 'tcp';       // How to connect to MySQL server ('tcp' or 'socket')
$cfg['Servers'][$i]['extension']     = 'mysql';     // The php MySQL extension to use ('mysql' or 'mysqli')
$cfg['Servers'][$i]['compress']      = FALSE;       // Use compressed protocol for the MySQL connection
$cfg['Servers'][$i]['auth_type']     = 'config';    // Authentication method (config, http or cookie based)?
$cfg['Servers'][$i]['user']          = '<db-username>';     // Remote MySQL user
$cfg['Servers'][$i]['password']      = '<db-password>';     // Remote MySQL password

现在,您的phpMyAdmin主页上有一个服务器"下拉列表.选择您的服务器和宾果游戏!

Now there is a 'servers' dropdown on your phpMyAdmin front page. Pick your sever and bingo!

信用: codejourneymen

还有很多例子,也许有帮助:

And, there are a lot of example, maybe help:

phpadmin远程数据库

这篇关于同步MySQL远程&amp;使用phpMyAdmin的本地数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆