在 phpmyadmin 中更改 Mysql Server 的端口 [英] Change Port of Mysql Server in Phpmyadmin
问题描述
我的服务器上运行了两个 MySql (5.1.73-1-log
) 实例,一个在端口 3306(默认)上,一个在端口 3307 上.现在,我想更改 PhpMyAdmin(3.3.7deb7
) 在 3307 上采用第二个实例,而不是默认实例.因此,我将以下行添加到 config.inc.php
:
I have two instances of MySql (5.1.73-1-log
) running on my server, one on port 3306 (default), one on port 3307. Now, I want to change PhpMyAdmin (3.3.7deb7
) to take the second instance, on 3307, instead the default one.
Thus, I add the following line to config.inc.php
:
$cfg['Servers'][$i]['port'] = '3307';
现在,虽然 PhpMyAdmin 说 localhost:3307
(看截图),它访问的数据库仍然是来自在默认端口上运行的实例的数据库.
Now, though PhpMyAdmin says localhost:3307
(look Screenshot), the databases that it accesses are still those from the instance that runs on the default port.
如何更改设置以使端口更改真实?
How do I change the settings in order to make the port change real?
推荐答案
您可以更改这一行:
$cfg['Servers'][$i]['host'] = '127.0.0.1';
用这一行:
$cfg['Servers'][$i]['host'] = '127.0.0.1:3307';
这篇关于在 phpmyadmin 中更改 Mysql Server 的端口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!