在Phpmyadmin中更改Mysql Server的端口 [英] Change Port of Mysql Server in Phpmyadmin

查看:174
本文介绍了在Phpmyadmin中更改Mysql Server的端口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在服务器上运行了两个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屋!

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