How to see what services MySQL has run under Linux

Source: Internet
Author: User

Ps-ef|grep MySQL//current investigation of PID

And then

Lsof-p +pid can see the MySQL run service

Baidu out of other people's way

When encountering MySQL card, and then want to know why, I often use the following methods to find the problem

Show Processlist\g;    or show full processlist\g; Put this command in to indicate that there is no such command.

5. Row ***************************

id:197343

User:root

host:127.0.0.1:41354

Db:xxx

Command:query

time:0

State:sleep

Info:show Process List

After getting to the port, you can check the lower port access status

# Netstat-anp|grep 41354

TCP 0 0 127.0.0.1:41354 127.0.0.1:3307 established 1167/php test.php

So we know that PHP test.php is connected to the database, and the PID is 1167.

Position can be found lsof-p pid

This method is used to analyze what similar programs are connected to the database, resulting in a database card

Http://www.cpokooo.com
http://www.minzkw.com/
Http://www.kcfsyz.com
Http://www.jdsjsj.com
Http://www.fivezj.com
http://www.hhyeyp.com/
Ttp://www.lfgzjt.com
Http://www.wlgchem.com

How to see what services MySQL has run under Linux

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.