---
title: "phpmyadmin 管理远程数据库"
author: "vb2005xu"
date: "2014-09-20T16:22:34Z"
tags: ["Linux", "MySQL", "PHP", "mysql客户端"]
categories: ["开源软件"]
slug: "phpmyadmin"
draft: false
lastmod: "2014-09-21T18:04:55Z"
id: 2118497
url: "https://vb2005xu.iteye.com/blog/2118497"
---

在我刚学linux的时候，大虾们是这么说的，很强大，什么都有，什么都能找到，有问题去社区提问，

 

3年后，我终于懂了，

 

linux 上什么都有，功能很强大，软件很多，我悟了：

 

服务器端软件很强大

 

可以去社区提问，去找答案，但是你的英文要足够好，你要有耐心，可能一上午你都在各大论坛翻旧帖子中，可能这个东西已经不更新了，等等，你要耐得住寂寞，就像我发这个贴子也是在linux上发出来的。。

 

如果你想学好linux，就不要在 windows上装个虚拟机，里面装个linux，没用，那样你永远适应不过来，

更不要在linux下装个虚拟机跑windows，这样就更坑爹，因为类比之下你会觉得这妈蛋的宿主机真是个渣

 

 

 

 

客户端软件好的也有，比如 vim,chrome ， firefox ， eclipse ， netbeans ， phpstorm系列 ，firebrid，小企鹅

输入法，wps for linux。。。

 

 

但是 除此之外，貌似就米有了， 

比如 没有坑爹的企鹅，米有很多其它的东西，是有替代品，但是不是给人用的。。。 那种粗糙的做工，无专门设计的思路，让人恨之不急，爱之难堪

 

在此处竭力希望 linux 粉们能再接再厉，开发出功能符合大众的程序，希望它更昌盛。。。

 

 

诸位极力搜索linux上mysql客户端的朋友请记住了。。。

 

基本是木有，除非用 wine这种坑爹玩意。。。

 

色色在这里还是极力推荐phpmyadmin，这玩意其实也没有什么不好用的，不管是 本地数据库还是远程数据库都是可以管理的，默认只能管理本地数据库。

 

按如下进行配置即可

写道

/*  
\* Servers configuration  
\*/  
$i = 0;

/*  
\* First server  
\*/  
$i++;  
/* Authentication type \*/  
$cfg\['Servers']\[$i]\['auth\_type'] = 'cookie';  
/* Server parameters \*/  
$cfg\['Servers']\[$i]\['host'] = '127.0.0.1';  
$cfg\['Servers']\[$i]\['connect\_type'] = 'tcp';  
$cfg\['Servers']\[$i]\['compress'] = false;  
$cfg\['Servers']\[$i]\['AllowNoPassword'] = false;

/*  
\* phpMyAdmin configuration storage settings.  
\*/

/* User used to manipulate with storage \*/  
$cfg\['Servers']\[$i]\['controlhost'] = '127.0.0.1';  
$cfg\['Servers']\[$i]\['controlport'] = '3306';  
$cfg\['Servers']\[$i]\['controluser'] = 'pma';  
$cfg\['Servers']\[$i]\['controlpass'] = 'pmapass';

/* Storage database and tables \*/  
$cfg\['Servers']\[$i]\['pmadb'] = 'phpmyadmin';  
$cfg\['Servers']\[$i]\['bookmarktable'] = 'pma\_\_bookmark';  
$cfg\['Servers']\[$i]\['relation'] = 'pma\_\_relation';  
$cfg\['Servers']\[$i]\['table\_info'] = 'pma\_\_table\_info';  
$cfg\['Servers']\[$i]\['table\_coords'] = 'pma\_\_table\_coords';  
$cfg\['Servers']\[$i]\['pdf\_pages'] = 'pma\_\_pdf\_pages';  
$cfg\['Servers']\[$i]\['column\_info'] = 'pma\_\_column\_info';  
$cfg\['Servers']\[$i]\['history'] = 'pma\_\_history';  
$cfg\['Servers']\[$i]\['table\_uiprefs'] = 'pma\_\_table\_uiprefs';  
$cfg\['Servers']\[$i]\['tracking'] = 'pma\_\_tracking';  
$cfg\['Servers']\[$i]\['designer\_coords'] = 'pma\_\_designer\_coords';  
$cfg\['Servers']\[$i]\['userconfig'] = 'pma\_\_userconfig';  
$cfg\['Servers']\[$i]\['recent'] = 'pma\_\_recent';  
$cfg\['Servers']\[$i]\['favorite'] = 'pma\_\_favorite';  
$cfg\['Servers']\[$i]\['users'] = 'pma\_\_users';  
$cfg\['Servers']\[$i]\['usergroups'] = 'pma\_\_usergroups';  
$cfg\['Servers']\[$i]\['navigationhiding'] = 'pma\_\_navigationhiding';  
$cfg\['Servers']\[$i]\['savedsearches'] = 'pma\_\_savedsearches';  
/* Contrib / Swekey authentication \*/  
// $cfg\['Servers']\[$i]\['auth\_swekey\_config'] = '/etc/swekey-pma.conf';

/*  
\* Second server  
\*/  
$i++;  
/* Authentication type \*/  
$cfg\['Servers']\[$i]\['auth\_type'] = 'cookie';  
/* Server parameters \*/  
$cfg\['Servers']\[$i]\['host'] = '122.126.174.232';  
$cfg\['Servers']\[$i]\['port'] = '18481';  
$cfg\['Servers']\[$i]\['connect\_type'] = 'socket';  
$cfg\['Servers']\[$i]\['compress'] = false;  
$cfg\['Servers']\[$i]\['AllowNoPassword'] = false;

/*  
\* phpMyAdmin configuration storage settings.  
\*/

/* User used to manipulate with storage \*/  
$cfg\['Servers']\[$i]\['controlhost'] = '127.0.0.1';  
$cfg\['Servers']\[$i]\['controlport'] = '3306';  
$cfg\['Servers']\[$i]\['controluser'] = 'pma';  
$cfg\['Servers']\[$i]\['controlpass'] = 'pmapass';

/* Storage database and tables \*/  
$cfg\['Servers']\[$i]\['pmadb'] = 'phpmyadmin';  
$cfg\['Servers']\[$i]\['bookmarktable'] = 'pma\_\_bookmark';  
$cfg\['Servers']\[$i]\['relation'] = 'pma\_\_relation';  
$cfg\['Servers']\[$i]\['table\_info'] = 'pma\_\_table\_info';  
$cfg\['Servers']\[$i]\['table\_coords'] = 'pma\_\_table\_coords';  
$cfg\['Servers']\[$i]\['pdf\_pages'] = 'pma\_\_pdf\_pages';  
$cfg\['Servers']\[$i]\['column\_info'] = 'pma\_\_column\_info';  
$cfg\['Servers']\[$i]\['history'] = 'pma\_\_history';  
$cfg\['Servers']\[$i]\['table\_uiprefs'] = 'pma\_\_table\_uiprefs';  
$cfg\['Servers']\[$i]\['tracking'] = 'pma\_\_tracking';  
$cfg\['Servers']\[$i]\['designer\_coords'] = 'pma\_\_designer\_coords';  
$cfg\['Servers']\[$i]\['userconfig'] = 'pma\_\_userconfig';  
$cfg\['Servers']\[$i]\['recent'] = 'pma\_\_recent';  
$cfg\['Servers']\[$i]\['favorite'] = 'pma\_\_favorite';  
$cfg\['Servers']\[$i]\['users'] = 'pma\_\_users';  
$cfg\['Servers']\[$i]\['usergroups'] = 'pma\_\_usergroups';  
$cfg\['Servers']\[$i]\['navigationhiding'] = 'pma\_\_navigationhiding';  
$cfg\['Servers']\[$i]\['savedsearches'] = 'pma\_\_savedsearches';  
/* Contrib / Swekey authentication \*/  
// $cfg\['Servers']\[$i]\['auth\_swekey\_config'] = '/etc/swekey-pma.conf';

 

这样设置之后，登录时就可以选择服务器来进行登录了 哈哈

 

\-----------------------------------------------------------------------------------------------------------------------------------

备注：

 

phpmyadmin 4.2的版本对非mysql5.5的数据库回爆出很坑爹的错误：

# 您应升级到 MySQL 5.5.0 或更高版本。

 

使用 phpmyadmin 4.0 就木有问题，。。。。

 ![](http://dl2.iteye.com/upload/attachment/0101/3156/5334cc61-78a7-377b-af8e-ad4ce3fdd640.png)