用了好幾個第三方軟件,最後還是喜歡用phpMyAdmin
1.打開phpMyadmin目錄,找到config.inc.php
,若不存在,將config.sample.inc .php
更名爲config.inc.php
2.將以下代碼註釋或刪除
3.改成以下內容即可:
/**
* Servers configuration
*/
$server_hosts = array(
'1' => array('server_name' => 'localhost', 'host' => '127.0.0.1', 'user'=>'', 'password' => ''),
'2' => array('server_name' => 'test', 'host' => 'xxx.xxx.x.xx', 'user'=>'', 'password' => ''),
'3' => array('server_name' => 'test2', 'host' => 'xxx.xxx.x.xxx', 'user'=>'', 'password' => '')
);
foreach($server_hosts as $key => $sh)
{
$cfg['Servers'][$key]['verbose'] = $sh['server_name'];
$cfg['Servers'][$key]['auth_type'] = 'cookie';
$cfg['Servers'][$key]['host'] = $sh['host'];
$cfg['Servers'][$key]['user'] = $sh['user'];
$cfg['Servers'][$key]['password'] = $sh['password'];
$cfg['Servers'][$key]['connect_type'] = 'tcp';
$cfg['Servers'][$key]['compress'] = false;
$cfg['Servers'][$key]['extension'] = 'mysqli';
$cfg['Servers'][$key]['AllowNoPassword'] = false;
}
$cfg['ServerDefault'] = 1;
4.保存、重啓
5.效果: