MySQL Server port number?

If you will install MySQL on your system, then you will get the default MySQL server port number i.e. 3306.

To know the MySQL server port number, you can use the following query. Here, we have used the SHOW VARIABLES command. The query is as follows −

mysql> SHOW VARIABLES WHERE Variable_Name = 'port';

The following is the output −

| Variable_Name | Value |
| port          | 3306  |
1 row in set (0.04 sec)

Updated on: 30-Jul-2019


Kickstart Your Career

Get certified by completing the course

Get Started