In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Let's learn about the real-time viewing method of the current number of connections in mysql. I believe you will benefit a lot after reading it. The text is not much in essence. I hope this short article on the current number of connections in mysql is what you want.
How to view the current number of connections in mysql in real time? 1. View the details of all current connections:. / mysqladmin-uadmin-p-h20.140.1.1 processlist2, view only the current number of connections (Threads is the number of connections.):. / mysqladmin-uadmin-p-h20.140.1.1 status, View the details of all current connections: mysqladmin-uroot-proot processlistD:\ MySQL\ bin > mysqladmin-uroot-proot processlist+-+-+ | Id | User | Host | Db | Command | Time | State | Info | +-+-+ | root | localhost:3544 | bbs | Sleep | 25 | | 701 | root | localhost:3761 | | uery | | 0 | | show processlist | +-+-+ 2, Only view the current number of connections (Threads is the number of connections.): mysqladmin-uroot-proot statusD:\ MySQL\ bin > mysqladmin-uroot-proot statusUptime: 2102 Threads: 3 Questions: 15531 Slow queries: 0 Opens: 0 Flush tables: 1 Open tables: 61 Queries per second avg: 7.3893, modify mysql maximum number of connections: open my.ini Modify max_connections=100 (default is 100). Today, there is a sudden increase in the number of connections to a mysql cloud server and waiting for all the processes to be locked. I was scolded because the problem was not solved properly. OTL summary: to quickly locate errors in the future, after assigning the solution to log in to the mysql client, you can also use the status command to get the number of thread connections and the id of the current connection, or use show full processlist to take a look at all the connected processes. Pay attention to check the waiting time of the process and whether it is in locked. If there are too many processes, print the process, and then check the mysql-e 'show full processlist. Looking for non-locked processes is generally the reason why the following processes are queued up because they are stuck in the current execution. In addition, the method to modify the maximum number of mysql connections is to edit the MySQL (best combination with PHP) configuration file my.cnf or my.ini to add: max_connections = 1000 to save in the [MySQL (best combination with PHP) d] configuration section, and restart MySQL (the best combination with PHP) service. Then use the command: MySQL (the best combination with PHP) admin-uroot-p variables to enter the password of the root database account and you can see | max_connections | 1000 | View the number of MySQL connections and the number of current user Mysql connections first enter the mysql prompt as an administrator. # mysql-uroot-pxxxxmysql > show processlist; can display the first 100 connection information show full processlist; can display all of them. By the way, if you log in with an ordinary account, only this user's. Note that there is a semicolon after the command. If we want to view the settings of this CVM. # vi / etc/my.cnfset-variable=max_user_connections=30 this is the number of connections per user set-variable=max_connections=800 this is the global limit on the number of connections
After reading this article on how to view the current number of connections in mysql in real time, many readers will want to know more about it. For more industry information, you can follow our industry information section.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un