Solution :-
1.) Open my.ini file
2.) locate [mysqld]
# The TCP/IP Port the MySQL Server will listen on port=3306
You can change the port mysql listens to my by assigning a new value to port. After that make sure to restart mysql server.
# The TCP/IP Port the MySQL Server will listen on port=3306
#2002 cannot log in to the MYSQL server
$cfg['Servers'][$i]['port'] = 'x';