查看Mysql版本信息
无法登陆
windows
切换至mysql的bin目录,运行cmd
![image-20220801170427530](https://1000bd.com/contentImg/2022/08/04/003858208.png)
可以看到mysql的版本为5.7.37
或者任意目录直接运行
![image-20220801165011885](https://1000bd.com/contentImg/2022/08/04/003858321.png)
Linux
[root@iZ2zeimljbbhm4nhfwkvuaZ ~]# mysql --help | grep Distrib
![image-20220801164700226](https://1000bd.com/contentImg/2022/08/04/003858448.png)
可以登陆
select version();
![image-20220801170116435](https://1000bd.com/contentImg/2022/08/04/003858619.png)
status;
或者
\s
![image-20220801165206608](https://1000bd.com/contentImg/2022/08/04/003858758.png)
![image-20220801170213493](https://1000bd.com/contentImg/2022/08/04/003859053.png)
- 在命令行连接mysql是直接显示
![image-20220801170301889](https://1000bd.com/contentImg/2022/08/04/003859307.png)
- show variables like ‘%version%’;
![image-20220801165355810](https://1000bd.com/contentImg/2022/08/04/003859454.png)
当然还可以在mysql客户端工具中查看 ,如Navicat等。