How to get mysql server info using command line?

Viewed 85124

Is there a direct command line command that provides all mysql server information like below...This is provided using Mysql GUI administrator. Do we have some direct command to get this info ussing command line ?

Username:
Hostname:
Port:
Server Information
MySQL Version:
Network Name:
IP:
Client Information
Version:
Network name:
IP:
Operating System:
Hardware:

2 Answers

Try just status:

mysql> status
--------------
mysql  Ver 14.14 Distrib 5.5.33, for osx10.7 (i386) using readline 5.1

Connection id:      3
Current database:   somedb
Current user:       someuser@localhost
SSL:            Not in use
Current pager:      stdout
Using outfile:      ''
Using delimiter:    ;
Server version:     5.5.33 Source distribution
Protocol version:   10
Connection:     127.0.0.1 via TCP/IP
Server characterset:    utf8
Db     characterset:    utf8
Client characterset:    utf8
Conn.  characterset:    utf8
TCP port:       3306
Uptime:         38 min 53 sec

Threads: 2  Questions: 196  Slow queries: 0  Opens: 87  Flush tables: 1  Open tables: 80  Queries per second avg: 0.084
--------------
Related