一、命令方式:
1、Linux服务器上查看mysql的版本
方法一:
[root@mysql usr]# mysql -V
mysql Ver 14.14 Distrib 5.7.30, for linux-glibc2.12 (x86_64) using EditLine wrapper
方法二:
[root@mysql usr]# mysql --version
mysql Ver 14.14 Distrib 5.7.30, for linux-glibc2.12 (x86_64) using EditLine wrapper
方法三:
[root@mysql usr]# mysql --help |grep Distrib
mysql Ver 14.14 Distrib 5.7.30, for linux-glibc2.12 (x86_64) using EditLine wrapper
方法四:登录mysql
[root@mysql ~]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 177613
Server version: 5.7.30 MySQL Community Server (GPL)
Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.
方法五:登录mysql,执行查询语句
mysql> select version();
+-----------+
| version() |
+-----------+
| 5.7.30 |
+-----------+
1 row in set (0.00 sec)
2、windows上查看本地mysql的版本(与linux相近)
方法一:
C:Usersttt>mysql -V
mysql Ver 14.14 Distrib 5.5.62, for Win64 (AMD64)
方法二:
C:Usersttt>mysql --version
mysql Ver 14.14 Distrib 5.5.62, for Win64 (AMD64)
方法三:
C:Usersttt>mysqladmin --version
mysqladmin Ver 8.42 Distrib 5.5.62, for Win64 on AMD64
方法四:登录mysql
C:Usersttt>mysql -u root -p
Enter password: ****
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 9
Server version: 5.5.62 MySQL Community Server (GPL)
Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.
方法五:登录mysql,执行查询语句
mysql> select version();
+-----------+
| version() |
+-----------+
| 5.5.62 |
+-----------+
1 row in set (0.00 sec)
二、通过mysql工具Navicat
方法一:进入数据库,执行以下语句即可查询版本情况
select version() from dual;
或
select version();
方法二:
鼠标右键链接名或者数据库,点击【命令列界面】,输入查询语句
mysql> select version();
+-----------+
| version() |
+-----------+
| 5.5.62 |
+-----------+
1 row in set (0.02 sec)
好多好多,以下总结六点……