I changed mysql port in xampp, now how can I listen to the new port?

I 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 another program that I am using.

So, I am setting up the mysql xampp port to 3307 (3306 by default) inside the my.ini file. However, now my localhost / phpmyadmin seems to be reading the database installed by another program, not the one located in xampp, and also when I test using some php files, it shows that I am connected to the database, even if xampp off (xampp mysql is also disabled).

How to change the setting of my phpmyadmin and localhost to connect to mysql port 3307?

I am new to these issues and do not understand how all these ports and databases work very well. Any comments are welcome. Hope someone can tell me a little about this. thanks in advance

+13
source share
3 answers

Go to xampp>phpMyAdmin Reference.

Locate the config.inc.php file.

Now change this line:

 $cfg['Servers'][$i]['host'] = '127.0.0.1'; 

For

 $cfg['Servers'][$i]['host'] = '127.0.0.1:3307'; 
+27
source

To configure phpMyAdmin to connect to a different default port, edit the config.inc.php file and add a line, for example:

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

(naturally replacing any port number as necessary). You can also see the official documentation .

+3
source

The following worked for me, I just added my port code:

$cfg['Servers'][$i]['host'] = '127.0.0.1:3308';

0
source

Source: https://habr.com/ru/post/983211/


All Articles