1. First, connect the linux host and connect the mysql service through the mysql connection instruction.
2. Input: display global variables such as "port"; , press enter.
3. At this time, the port number of mysql will be printed. For example, the Value of value is 3306.