更改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
(查看屏幕截图),但它访问的数据库仍然是来自在默认端口上运行的实例。
如何更改设置以使端口更改实现?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
您可以更改此行:
使用此行:
You can change this line:
with this line:
来自 phpmyadmin文档 ...
From the PhpMyAdmin documentation...
首先打开XAMPPP控制面板单击配置按钮,在下一页上单击服务和端口设置,在该页面上,您可以为所有服务设置所有端口。
另外,您应该更改phpmyadmin(config.inc.php)文件的内容如下
first open Xamppp Control Panel click on Config Button, at the next page click on Services and Port Settings, at that page you can set all ports for all of your services.
also you should change content of Phpmyadmin(config.inc.php) file as below
不知何故,连接到Localhost会自动通过套接字连接而不是端口连接(默认3306)的陈述似乎不是正确的。我安装了几台用于测试的服务器,在我的phpmyadmin页面中,我在Topline中看到了其中的一些服务器:“服务器:localhost”,在其他我看到的“服务器:localhost:3306”中。我猜想没有端口号的一个是通过套接字连接的,而其他端口号是通过IP端口3306连接的。我仍在寻找如何配置它。在我看来,脚本config.inc.php不是一个地方。我怀疑这是一些.conf或.cnf或.ini文件,但我尚未找到哪个文件。
Somehow the statement that connecting to localhost automatically connects through socket rather than port (default 3306) does not seem to be true. I have several servers installed for testing and in my phpMyAdmin page of some of them I see in the topline: "server: localhost" and in others I see "server: localhost:3306". I am guessing that the one without the port number is connected through socket and the others are through IP port 3306. I am still looking how to configure that. It seems obvious to me that the script config.inc.php is not the place to be. I suspect it is some .conf or .cnf or .ini file but I am yet to find which one.