Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get mysql server info using command line?

Tags:

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:

like image 913
user476554 Avatar asked Oct 15 '10 05:10

user476554


People also ask

How do I find MySQL server details?

To display MySQL host via SQL command, use system variable “hostname”. Or you can use “show variables” command to show MySQL host via SQL command.


1 Answers

Look at following MySQL documentation:

SHOW VARIABLES

Following command will show you most of your desired information:

SHOW VARIABLES; 

Only version:

select version(); 

EDIT:

What is the difference between show variables and show status?

SHOW STATUS provides server status information like Connections, Opened_tables, Bytes_received, Bytes_sent, etc.

More Info

SHOW VARIABLES shows the values of MySQL system variables like time_zone, version, max_connections, etc.

More Info

like image 66
Naveed Avatar answered Oct 07 '22 18:10

Naveed