I have two instances of MySql (5.1.73-1-log
) running on my server, one on port 3306 (default), one on port 3307. Now, I want to change PhpMyAdmin (3.3.7deb7
) to take the second instance, on 3307, instead the default one.
Thus, I add the following line to config.inc.php
:
$cfg['Servers'][$i]['port'] = '3307';
Now, though PhpMyAdmin says localhost:3307
(look Screenshot), the databases that it accesses are still those from the instance that runs on the default port.
How do I change the settings in order to make the port change real?
Edit the my. cnf file to change the built-in MySQL port. In the [mysqld] section, change the value for port .
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'] .
Another way to find out the port which MySQL Server is using on Windows is , Go to my. ini file that is MySQL configuration file and you can check the port. To find the my. ini file for MySQL Server, you can go to services and then go to properties.
You can change this line:
$cfg['Servers'][$i]['host'] = '127.0.0.1';
with this line:
$cfg['Servers'][$i]['host'] = '127.0.0.1:3307';
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With