我在 XAMPP 中更改了 MySQL 端口,现在如何监听新端口? [英] I changed MySQL port in XAMPP, now how do I listen to the new port?

查看:44
本文介绍了我在 XAMPP 中更改了 MySQL 端口,现在如何监听新端口?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经安装了最新的 XAMPP 和 MySQL 版本 14.14 Distrib 5.6.21,问题出在我的电脑上,我已经用我正在使用的其他程序安装了一个 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 don't understand how all these ports and the database work.

推荐答案

转到 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屋!

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