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?