Four Methods for viewing the mysql version in Linux _ MySQL

Source: Internet
Author: User
Tags mysql functions
This article mainly introduces four methods for viewing the mysql version in Linux, this article describes four methods, including using mysql-V in the terminal, using mysqlstatus, searching in help, and using mysql functions. For more information, see 1: in the terminal: mysql-V. The following is a code snippet:

The code is as follows:


[Shengting @ login ~] $ Mysql-V
Mysql Verver 14.7 Distrib 4.1.10a, for redhat-linux-gnu (i686)


2: In mysql: mysql> status;
The following is a code snippet:

The code is as follows:


Mysql> status;
--------------
Mysql Verver 14.7 Distrib 4.1.10a, for redhat-linux-gnu (i686)
Connection id: 416
SSL: Not in use
Current pager: stdout
Using outfile :''
Using delimiter :;
Server version: 3.23.56-log
Protocol version: 10
Connection: Localhost via UNIX socket
Client characterset: latin1
Server characterset: latin1
UNIX socket:/tmp/mysql_3311.sock
Uptime: 62 days 21 hours 21 min 57 sec
Threads: 1 Questions: 584402560 Slow queries: 424 Opens: 59664208 Flush tables: 1 Open tables: 64 Queries per second avg: 107.551


3: search
The following is a code snippet:

The code is as follows:


[Shengting @ login ~] $ Mysql -- help | grep Distrib
Mysql Verver 14.7 Distrib 4.1.10a, for redhat-linux-gnu (i686)


4: use mysql functions
The following is a code snippet:

The code is as follows:


Mysql> select version ();
+ ------------- +
| Version () |
+ ------------- +
| 3.23.56-log |
+ ------------- +
1 row in set (0.00 sec)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.