Nice to be back with another solution for a common (not so) problem which google takes some time to find a proper solution. As mentioned in the title of the post, this thing happens when i was installing xampp server on my office computer. After successfully installing the xampp server, i was trying to start the mysql service using the control panel. But when i start the mysql service, it was trying to start but finally it was failing to start on port 3306. It gave some error about port 3306.
After few hours of google search i realized that the root cause for this issue was that port 3306 is using by another mysql service which was installed from another application. Then i had to change the port number to another one to start the mysql service on xampp server.
To change the port successfully, i had to change the port number in following files in the mentioned manner.
You can change the port number to 3308 from 3306 in \xampp\mysql\bin\my.ini file in a couple of places.
There is also a couple of default MySQL port settings in the \xampp\php\php.ini file that would also need changing.
Save the files and restart Apache and MySQL to test.