是否可以使用phpMyAdmin连接到远程主机,但将配置数据库保留在本地主机

时间:2017-12-21 06:46:32

标签: phpmyadmin

我已经在互联网上搜索,到目前为止我找不到与我的问题100%相关的内容

我希望在我们公司部署一个phpMyAdmin(PMA)服务器,供开发人员访问各种数据库。但是我希望在本地PMA服务器上保留PMA额外功能。

我已从CentOS 7上的CentOS回购安装了PMA 4.4.15.10。

我已经设置了PMA的config.inc.php以允许连接到远程数据库主机,我可以登录。

我已经为localhost(pma1)启用并配置了额外的功能,但我无法让它为远程主机工作。

我当前的config.inc.php看起来像(出于安全原因的一些混淆)

<?php
$cfg['blowfish_secret'] = '***';

$cfg['DisplayServersList'] = TRUE;
$cfg['ZeroConf'] = TRUE;
$i = 0;

$i++;
$cfg['Servers'][$i]['host']          = 'localhost';
$cfg['Servers'][$i]['port']          = '';
$cfg['Servers'][$i]['socket']        = '';
$cfg['Servers'][$i]['connect_type']  = 'tcp';
$cfg['Servers'][$i]['extension']     = 'mysqli';
$cfg['Servers'][$i]['compress']      = FALSE;
$cfg['Servers'][$i]['controlhost']   = 'localhost';                         
$cfg['Servers'][$i]['controluser']   = '***';
$cfg['Servers'][$i]['controlpass']   = '***';
$i++;
$cfg['Servers'][$i]['host']          = 'DB1';
$cfg['Servers'][$i]['port']          = '';
$cfg['Servers'][$i]['socket']        = '';
$cfg['Servers'][$i]['connect_type']  = 'tcp';
$cfg['Servers'][$i]['extension']     = 'mysqli';
$cfg['Servers'][$i]['verbose']       = 'DB1';
$cfg['Servers'][$i]['controlhost']   = 'localhost';
$cfg['Servers'][$i]['pmadb']         = 'phpmyadmin_db1';
$cfg['Servers'][$i]['controluser']   = '***';
$cfg['Servers'][$i]['controlpass']   = '***';
$i++;
$cfg['Servers'][$i]['host']          = 'DB2';
$cfg['Servers'][$i]['port']          = '';
$cfg['Servers'][$i]['socket']        = '';
$cfg['Servers'][$i]['connect_type']  = 'tcp';
$cfg['Servers'][$i]['extension']     = 'mysqli';
$cfg['Servers'][$i]['verbose']       = 'DB2';
$cfg['Servers'][$i]['controlhost']   = 'localhost';
$cfg['Servers'][$i]['pmadb']         = 'phpmyadmin_db2';
$cfg['Servers'][$i]['controluser']   = '***';
$cfg['Servers'][$i]['controlpass']   = '***';
$i++;
$cfg['Servers'][$i]['host']          = 'DB3';
$cfg['Servers'][$i]['port']          = '';
$cfg['Servers'][$i]['socket']        = '';
$cfg['Servers'][$i]['connect_type']  = 'tcp';
$cfg['Servers'][$i]['extension']     = 'mysqli';
$cfg['Servers'][$i]['verbose']       = 'DB3';
$cfg['Servers'][$i]['controlhost']   = 'localhost';
$cfg['Servers'][$i]['pmadb']         = 'phpmyadmin_db3';
$cfg['Servers'][$i]['controluser']   = '***';
$cfg['Servers'][$i]['controlpass']   = '***';
$i++;
$cfg['Servers'][$i]['host']          = 'DB4';
$cfg['Servers'][$i]['port']          = '';
$cfg['Servers'][$i]['socket']        = '';
$cfg['Servers'][$i]['connect_type']  = 'tcp';
$cfg['Servers'][$i]['extension']     = 'mysqli';
$cfg['Servers'][$i]['verbose']       = 'DB4';
$cfg['Servers'][$i]['controlhost']   = 'localhost';
$cfg['Servers'][$i]['pmadb']         = 'phpmyadmin_db4';
$cfg['Servers'][$i]['controluser']   = '***';
$cfg['Servers'][$i]['controlpass']   = '***';

$cfg['UploadDir'] = '/var/lib/phpMyAdmin/upload';
$cfg['SaveDir']   = '/var/lib/phpMyAdmin/save';

$cfg['PmaNoRelation_DisableWarning'] = FALSE;
?>

在PMA服务器(localhost)上,我创建了这些数据库以保存配置

phpmyadmin
phpmyadmin_db1
phpmyadmin_db2
phpmyadmin_db3
phpmyadmin_db4

如果我登录db1,我会收到以下错误

The phpMyAdmin configuration storage is not completely configured, some extended features have been deactivated. Find out why. 
  Or alternately go to 'Operations' tab of any database to set it up there.

点击链接“找出原因” $ cfg ['Servers'] [$ i] ['pmadb'] ......好的     $ cfg ['Servers'] [$ i] ['relation'] ...不行     一般关系特征:已禁用

$cfg['Servers'][$i]['table_info'] ...   not OK
Display Features: Disabled

$cfg['Servers'][$i]['table_coords'] ... not OK
$cfg['Servers'][$i]['pdf_pages'] ...    not OK
Designer and creation of PDFs: Disabled

$cfg['Servers'][$i]['column_info'] ...  not OK
Displaying Column Comments: Disabled
Browser transformation: Disabled

$cfg['Servers'][$i]['bookmarktable'] ...    not OK
Bookmarked SQL query: Disabled

$cfg['Servers'][$i]['history'] ...  not OK
SQL history: Disabled

$cfg['Servers'][$i]['recent'] ...   not OK
Persistent recently used tables: Disabled

$cfg['Servers'][$i]['favorite'] ... not OK
Persistent favorite tables: Disabled

$cfg['Servers'][$i]['table_uiprefs'] ...    not OK
Persistent tables' UI preferences: Disabled

$cfg['Servers'][$i]['tracking'] ... not OK
Tracking: Disabled

$cfg['Servers'][$i]['userconfig'] ...   not OK
User preferences: Disabled

$cfg['Servers'][$i]['users'] ...    not OK
$cfg['Servers'][$i]['usergroups'] ...   not OK
Configurable menus: Disabled

$cfg['Servers'][$i]['navigationhiding'] ... not OK
Hide/show navigation items: Disabled

$cfg['Servers'][$i]['savedsearches'] ...    not OK
Saving Query-By-Example searches: Disabled

$cfg['Servers'][$i]['central_columns'] ...  not OK
Managing Central list of columns: Disabled

然而,相关表确实在PMA1中存在:phpmyadmin_db1

pma__bookmark
pma__central_columns
pma__column_info
pma__favorite
pma__history
pma__navigationhiding
pma__pdf_pages
pma__recent
pma__relation
pma__savedsearches
pma__table_coords
pma__table_info
pma__table_uiprefs
pma__tracking
pma__userconfig
pma__usergroups
pma__users

这告诉我它没有从控制主机中获取表。

我尝试将控制主机更改为PMA服务器的主机名,而不是欢乐。

也谷歌搜索我似乎无法确定这是否可能,所以任何指针或配置更改将不胜感激。

亲切的问候

0 个答案:

没有答案
相关问题