我在XAMPP中更改了MySQL端口,现在该如何监听新端口? [英] I changed MySQL port in XAMPP, now how do I listen to the new port?
问题描述
我已经安装了带有MySQL版本14.14 Distrib 5.6.21的最新XAMPP,问题出在我的计算机上,我已经在使用其他程序安装了MySQL数据库.
I have installed the latest XAMPP with MySQL version 14.14 Distrib 5.6.21, the problem is in my computer, I already have a MySQL database installed by other program that I am using.
因此,我将my.ini
文件中的XAMPP MySQL端口配置为3307(默认为3306).但是,现在我的localhost/phpmyadmin似乎正在读取其他程序安装的数据库,而不是XAMPP中安装的数据库,而且当我使用某些PHP文件进行测试时,它表明即使XAMPP已关闭,我也已连接到数据库( XAMPP MySQL也已断开连接).
So I configure the XAMPP MySQL port to 3307 (default is 3306) inside the my.ini
file. However, now my localhost/phpmyadmin seems to read the database installed by the other program, not the one in XAMPP, and also when I test using some PHP files, it shows that I am connected to the database even though XAMPP is turned off (XAMPP MySQL also disconnected ).
如何更改phpmyadmin和localhost的设置以连接到mysql端口3307?
How do I change the setting of my phpmyadmin and localhost to connect to the mysql port 3307 ?
在这些问题上,我是新手,我不太了解所有这些端口和数据库的工作方式.欢迎任何评论.希望任何人都可以在这些问题上给我一些教育.提前谢谢
I am a newbie in these matters and don't really understand how all these port and database works very clearly. Any comments are welcomed. Hope that anyone could educate me a little on these matters. Thx in advance
推荐答案
转到xampp>phpMyAdmin
目录.
找到config.inc.php
文件.
现在更改此行:
$cfg['Servers'][$i]['host'] = '127.0.0.1';
收件人
$cfg['Servers'][$i]['host'] = '127.0.0.1:3307';
这篇关于我在XAMPP中更改了MySQL端口,现在该如何监听新端口?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!