Find my.ini in the MYSQL installation directory, such as my local address is D:\mySQL
Ctrl+F Find port and find port=3306. Note that both must be changed to
3306, which is the default port, and the port you want.
After the modification is completed and saved, restart the MYSQL service to
restart the MYSQL service method:
windows start-->run-->cmd
stop the service: net stop mysql
start the service: net start mysql
or manually restart:
right click on my computer-->management-->service and applications --> services --> mysql --> right click to restart