Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Show processlist host is percent sign (%)

2025-02-22 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Today, users report a question:

The following occurs when you show full processlist;:

| |

| | 46977247 | common |% | common | Connect | 391 | updating |

| | 46977311 | common |% | common | Connect | 331 | updating |

| | 46977312 | common |% | common | Connect | 330 | updating |

| | 46977406 | common |% | common | Connect | 237 | updating |

| | 46977413 | common |% | common | Connect | 231 | updating |

| | 46977446 | common |% | common | Connect | | updating |

| | 46977459 | common |% | common | Connect | 189th | updating |

| | 46977462 | common |% | common | Connect | 46977462 | updating |

| | 46977477 | common |% | common | Connect | 46977477 | updating |

| | 46977489 | common |% | common | Connect | 159th | updating |

| | 46977490 | common |% | common | Connect | 158th | updating |

| | 46977493 | common |% | common | Connect | 46977493 | updating |

| | 46977496 | common |% | common | Connect | | updating |

| | 46977511 | common |% | common | Connect | 46977511 | updating |

| | 46977519 | common |% | common | Connect | 129th | updating |

| | 46977523 | common |% | common | Connect | 46977523 | updating |

| | 46977526 | common |% | common | Connect | 123 | updating |

| | 46977530 | common |% | common | Connect | 119th | updating |

| | 46977532 | common |% | common | Connect | 46977532 | updating |

| | 46977533 | common |% | common | Connect | 46977533 | updating |

| | 46977537 | common |% | common | Connect | 46977537 | updating |

The host column shows only a% number, not the ip address.

This seems a little inappropriate. I thought about the reason: I didn't expect it, and I didn't find the answer on the Internet.

Inspiration comes in an instant:

Use the following ways to simulate:

Delimiter

CREATE DEFINER= `root` @ `% `PROCEDURE `insert_ pro` ()

Begin

DECLARE counter INT DEFAULT 0

Insert_loop: loop

Set counter=counter+1

Insert into test values (counter,counter,counter)

If counter=10000 then

Leave insert_loop

End if

End loop insert_loop

End

CREATE EVENT IF NOT EXISTS e_test

ON SCHEDULE EVERY 10 SECOND

ON COMPLETION PRESERVE

DO CALL test.insert_pro ()

Then go to show full processlist.

Mysql > show full processlist

+-+-- + -- +

| | Id | User | Host | db | Command | Time | State | Info |

+-+-- + -- +

| | 1 | event_scheduler | localhost | NULL | Daemon | 2 | Waiting for next activation | NULL |

| | 64 | root | localhost:34176 | test | Sleep | 52 | | NULL |

| | 65 | root | localhost:34177 | NULL | Query | 0 | System lock | show full processlist | |

| | 74 | root |% | test | Connect | 0 | query end | insert into test values (counter,counter,counter) |

| | 75 | root |% | test | Connect | 0 | query end | insert into test values (counter,counter,counter) |

+-+-- + -- +

5 rows in set (0.00 sec)

This situation can be simulated.

It is actually the result of the event call.

Please indicate the source of the reprint.

QQ 273002188 Welcome to study together.

QQ group 236941212

Oracle,mysql,mongo communicate with each other

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report