Change Port of Mysql Server in Phpmyadmin Change Port of Mysql Server in Phpmyadmin unix unix

Change Port of Mysql Server in Phpmyadmin


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';


From the PhpMyAdmin documentation...

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'].


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

$cfg['Servers'][$i]['host'] = '127.0.0.1'; $cfg['Servers'][$i]['port']= 'your preferred port number';