How to view MySql running resources

TheCompWiz

Well-known member
Registered
Joined
Apr 20, 2016
Messages
130
Points
18
If your server's mysql always in high resources or down, what commands or tools can I use to trace out which database that eat up your MySql resource?
Please share your suggestions. Thanks!
 

sh-admin

Active member
Registered
Joined
Sep 29, 2016
Messages
66
Points
0
Very first thing is to check the mysql version that you are running , make sure its upto date ..MariaDB is the perfect replacement for mysql so it would fix all the resource usages ... further use mysqladmin proc command to see which database is being queries , which are the slow queries and what they are doing...

the command will give you all the process list...
 

steitieh

Well-known member
Joined
Apr 23, 2014
Messages
113
Points
18
steitieh
Can you share more details on how to do this? what exact commands to use and where to execute them?
I also want to monitor my Mysql server resources
 

LJSHost

Well-known member
Hosting Provider
Registered
Joined
Jul 5, 2016
Messages
1,031
Points
63
Login to your mysql console:

mysql -u root -p

SHOW PROCESSLIST;

Look in the time field for any processes that have been running for a long time.
Also check your slow query log /var/log/mysql/mysql-slow.log (file location depends on distribution and configuration)

You many also need to enable the slow query log.
 

UWH-David

Member
Registered
Joined
Jan 18, 2016
Messages
45
Points
8
Code:
mytop
is a great command to view the top mysql processes live.
 
Older Threads
Latest Threads
Replies
0
Views
32
Replies
1
Views
40
Replies
0
Views
234
Replies
1
Views
50

Latest Hosting OffersNew Reviews

Sponsors

Tag Cloud

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top