一、命令查看
[root@hecs-71705 ~]# mysql --version
mysql Ver 8.0.28 for Linux on x86_64 (MySQL Community Server - GPL)
输入命令mysql --version
可以查看到MySQL版本为8.0.28 (MySQL Community Server - GPL)
二、登录查看
[root@hecs-71705 ~]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 328
Server version: 8.0.28 MySQL Community Server - GPL
登录MySQL后可以看到服务版本为8.0.28 (MySQL Community Server - GPL)