The default port number of mysql is 3306. Check the method: 1. Open the cmd command line; 2. Execute the "mysql -u root -p" command and enter the password to connect to the mysql service; 3. Execute "show global variables like 'port';" command to view.
The operating environment of this tutorial: windows10 system, mysql8 version, Dell G3 computer.
The default port number of mysql is 3306.
Specific viewing method:
First you need to bring up the dos interface, enter cmd in the computer's search box, and press Enter. (Of course, you can also use the shortcut Windows key r key to directly bring up the run box and enter cmd and press Enter)
Then in Enter mysql -u root -p
in the dos interface. If the version number and other contents in the picture appear, it means that the mysql service has been connected.
At this time, enter another sentenceshow global variables like 'port';
You can check the port number. Friendly reminder, pay attention to whether there is a semicolon in the command line
【Related recommendations: mysql video tutorial】
The above is the detailed content of What is the mysql port number?. For more information, please follow other related articles on the PHP Chinese website!