DBA Hub

📋Steps in this guide1/1

Find mysql db service restart time

Find the last MySQL / MariaDB Database service restarted / server reboot time

mysql configurationintermediate
by MYSQL
13 views
1

Find mysql db service restart time

-- In older version: -- In latest mysql version:

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
Find the last MySQL / MariaDB Database service restarted / server reboot time
MariaDB [(none)]>
status
--------------
mysql Ver 15.1 Distrib 10.4.18-MariaDB, for Win64 (AMD64), source revision 53123dfa3e365138591fd2f160c6057aca00a3e6
Connection id: 33
Current database:
Current user: root@localhost
SSL: Not in use
...........
Uptime: 6 days 2 hours 3 min 3 sec
MariaDB [(none)]>
select TIME_FORMAT(SEC_TO_TIME(VARIABLE_VALUE ),'%Hh %im') as Uptime from information_schema.GLOBAL_STATUS where VARIABLE_NAME='Uptime';
+----------+
| Uptime   |
+----------+
| 146h 03m |
+----------+
1 row in set (0.009 sec)
MariaDB [(none)]>
SHOW GLOBAL STATUS LIKE 'Uptime';
+---------------+--------+
| Variable_name | Value |
+---------------+--------+
| Uptime        | 525859 |
+---------------+--------+
1 row in set (0.001 sec)

Comments (0)

Please to add comments

No comments yet. Be the first to comment!