Skip to content
Home » MySQL » How to Check MySQL Version and Listen Port

How to Check MySQL Version and Listen Port

MySQL Version

To know what release of MySQL currently use, we can do this:

[root@test ~]# mysql -V
mysql  Ver 8.0.11 for Linux on x86_64 (MySQL Community Server - GPL)

MySQL Port

To know the specific port that MysQL uses, we need to login the database.

[root@test ~]# mysql -u root -p'12345678'
...
mysql> SHOW GLOBAL VARIABLES LIKE 'PORT';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| port          | 3306  |
+---------------+-------+
1 row in set (0.02 sec)

Leave a Reply

Your email address will not be published. Required fields are marked *