MySQL Server port number?

MySQLMySQLi Database

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)
Published on 24-Dec-2018 11:41:39