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)