How to check MySQL Server Status on Linux

This article explains to get MySQL Server status information on Linux using mysqladmin command or the mysql init script. The information return uptime of the MySQL Server,Version, Open Tables, Socket type,..

Method 1:Using Status option

mysqladmin -u root -p status

Output

Enter password: Uptime: 98350 Threads: 1 Questions: 18 Slow queries: 0 Opens: 107 Flush tables: 1 Open tables: 26 Queries per second avg: 0.000

Method 2: Using Version option

mysqladmin -u root -p version

Output

Enter password: mysqladmin Ver 8.42 Distrib 5.7.20, for Linux on x86_64 Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Server version 5.7.20-0ubuntu0.16.04.1 Protocol version 10 Connection Localhost via UNIX socket UNIX socket /var/run/mysqld/mysqld.sock Uptime: 1 day 3 hours 21 min 20 sec Threads: 1 Questions: 20 Slow queries: 0 Opens: 107 Flush tables: 1 Open tables: 26 Queries per second avg: 0.000

Method 2: Using init script

sudo /etc/init.d/mysql status

Output

[sudo] password for prvr: ● mysql.service - MySQL Community Server Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled) Active: active (running) since Tue 2017-12-26 19:19:04 PST; 1 day 3h ago Main PID: 1200 (mysqld) CGroup: /system.slice/mysql.service └─1200 /usr/sbin/mysqld Dec 26 19:18:49 ubuntu systemd[1]: Starting MySQL Community Server... Dec 26 19:19:04 ubuntu systemd[1]: Started MySQL Community Server.

Related Posts

CheapSexCams
Responses are currently closed, but you can trackback from your own site.

Comments are closed.

Powered by k2schools
%d bloggers like this: