mysql 查看版本

岔开那版本的几个方法:

一、在linux终端 [test@DNS-sv01 ~]$ mysql -V

mysql  Ver 14.14 Distrib 5.6.12, for linux-glibc2.5 (i686) using  EditLine wrapper

PS:必须是大写的V,并且只能在安装mysql的服务器上执行


二、在help开头里查找[test@login ~]$ mysqldump --help 

[test@DNS-sv01 ~]$ mysqldump --help
mysqldump  Ver 10.13 Distrib 5.6.12, for linux-glibc2.5 (i686)
Copyright (c) 2000, 2013, 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.


Dumping structure and contents of MySQL databases and tables.
Usage: mysqldump [OPTIONS] database [tables]
OR     mysqldump [OPTIONS] --databases [OPTIONS] DB1 [DB2 DB3...]
OR     mysqldump [OPTIONS] --all-databases [OPTIONS]


Default options are read from the following files in the given order:
/etc/my.cnf /etc/mysql/my.cnf /usr/local/mysql/etc/my.cnf ~/.my.cnf 
The following groups are read: mysqldump client
The following options may be given as the first argument:
--print-defaults        Print the program argument list and exit.
--no-defaults           Don't read default options from any option file,
                        except for login file.
--defaults-file=#       Only read default options from the given file #.
--defaults-extra-file=# Read this file after the global files are read

mysql相关的命令,在终端查看help,开头都会输出版本的信息的


三、在mysql命令符下:mysql> status;

mysql> status;
--------------
mysql  Ver 14.14 Distrib 5.6.12, for linux-glibc2.5 (i686) using  EditLine wrapper


Connection id:          2026378
Current database:       vpnmsxianwang
Current user:           root@localhost
SSL:                    Not in use
Current pager:          stdout
Using outfile:          ''
Using delimiter:        ;
Server version:         5.6.12-enterprise-commercial-advanced MySQL Enterprise Server - Advanced Edition (Commercial)
Protocol version:       10
Connection:             Localhost via UNIX socket
Server characterset:    utf8
Db     characterset:    utf8
Client characterset:    latin1
Conn.  characterset:    latin1
UNIX socket:            /home/vpnmysql/mysql/mysql.sock
Uptime:                 666 days 1 hour 54 min 55 sec


Threads: 168  Questions: 2459907008  Slow queries: 225523  Opens: 190580  Flush tables: 2  Open tables: 1833  Queries per second avg: 117.375
--------------

status只能mysql>命令符下执行

四、在mysql命令符下:mysql> select version();

mysql> select version();

+---------------------------------------+
| version()                             |
+---------------------------------------+
| 5.6.12-enterprise-commercial-advanced |
+---------------------------------------+
1 row in set (0.00 sec)


五、在mysql命令符下:mysql> show variables like  'version'

mysql> show variables like  'version';
+---------------+---------------------------------------+
| Variable_name | Value                                 |
+---------------+---------------------------------------+
| version       | 5.6.12-enterprise-commercial-advanced |
+---------------+---------------------------------------+
1 row in set

select version(),show variables like  'version'这2个方法,都可以在命令行客户端,以及图形化客户端执行。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值