2. Then enter a command line such as mysql -u root -p in the dos interface, and the version number in the figure will appear, indicating that mysql service has been connected.
3. At this time, enter a display global variable such as' port'; You can check the port number and friendly reminder, and pay attention to whether there is a semicolon on the command line.
4. If you need to continue to enter other contents after knowing the port number, you can ctrl+c to exit the current state.
5. Then you can continue to enter the command line in the dos interface, which is more convenient.
6. Of course, you can also directly shut down and re-enter the dos interface. You can know the port number in two command lines.