Here two more methods:
Linux: Mysql view version: from PHP
From a PHP function, we can see the version used:
mysql_get_server_info ([resource $ link_identifier = NULL]): string
Linux: Mysql view version: Package version
For RedHat / CentOS operating systems:
rpm -qa | grep mysql
For Debian / Ubuntu operating systems:
rpm -qa | grep mysql
Extracted from: https://www.sysadmit.com/2019/03/linux-mysql-ver-version.html