View the database version and what is currently logged on user?

Source: Internet
Author: User
Tags readline

To view the current version of the database:

select version (); ==> View MySQL version (view in library) +------------+| Version ()  |+------------+| 5.5.32-log |+------------+1 row in Set (0.00 sec)

  

status; ==> View current database status, including database version, current user, socket, etc.--------------mysql  Ver 14.14 distrib 5.5.32, for Linux (x86_64) using ReadLine 5.1Connection id:7current user:[email protected]server version:5.5.32-log Source distributionprotocol version : 10UNIX socket:/data/3306/mysql.sockuptime:48 min. sec

  

mysql-v ==> to view the database version in the command line MySQL  Ver 14.14 distrib 5.5.32, for Linux (x86_64) using ReadLine 5.1

  

MySQL--help|grep-i distribmysql  Ver 14.14 distrib 5.5.32, for Linux (x86_64) using ReadLine 5.1

  

To view the currently logged in User:

1) mysql> Select User (); ==> view current user; +----------------+| User ()         |+----------------+| [Email protected] |+----------------+1 row in Set (0.00 sec)

  

2) status; The current user is also included in the state information;

  

View the database version and what is currently logged on user?

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.