在Phpmyadmin中更改Mysql Server的端口

我在我的服务器上运行了两个MySql(5.1.73-1-log)实例,一个在端口3306上(默认),一个在端口3307上.现在,我想更改PhpMyAdmin(3.3.7deb7)以获取第二个实例,在3307,而不是默认的.
因此,我将以下行添加到config.inc.php:

    $cfg['Servers'][$i]['port'] = '3307';

现在,虽然PhpMyAdmin说localhost:3307(看截图),但它访问的数据库仍然是来自默认端口上运行的实例的数据库.

如何更改设置以使端口更改成为现实?

最佳答案
从PhpMyAdmin documentation …

If you use localhost as the hostname,MySQL ignores this port number and connects with the socket,so if you want to connect to a port different from the default port,use 127.0.0.1 or the real hostname in $cfg['Servers'][$i]['host'].

dawei

【声明】:淮南站长网内容转载自互联网,其相关言论仅代表作者个人观点绝非权威,不代表本站立场。如您发现内容存在版权问题,请提交相关链接至邮箱:bqsm@foxmail.com,我们将及时予以处理。